Debian Codegraph @

ansible_collections/dellemc/powerflex/docs/CONTRIBUTING.md

raw symbols SCIP
1 <!--
2 Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9 -->
10
11 # How to contribute
12
13 Become one of the contributors to this project! We thrive to build a welcoming and open community for anyone who wants to use the project or contribute to it. There are just a few small guidelines you need to follow. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](https://github.com/dell/ansible-powerflex/blob/main/CODE_OF_CONDUCT.md).
14
15 ## Table of contents
16
17 * [Become a contributor](#Become-a-contributor)
18 * [Submitting issues](#Submitting-issues)
19 * [Triage issues](#Triage-issues)
20 * [Your first contribution](#Your-first-contribution)
21 * [Branching](#Branching)
22 * [Signing your commits](#Signing-your-commits)
23 * [Pull requests](#Pull-requests)
24 * [Code reviews](#Code-reviews)
25 * [TODOs in the code](#TODOs-in-the-code)
26
27 ## Become a contributor
28
29 You can contribute to this project in several ways. Here are some examples:
30
31 * Contribute to the Ansible modules for Dell PowerFlex documentation and codebase.
32 * Report and triage bugs.
33 * Feature requests.
34 * Write technical documentation and blog posts, for users and contributors.
35 * Help others by answering questions about this project.
36
37 ## Submitting issues
38
39 All issues related to Ansible modules for Dell PowerFlex, regardless of the service/repository the issue belongs to (see table above), should be submitted [here](https://github.com/dell/ansible-powerflex/issues). Issues will be triaged and labels will be used to indicate the type of issue. This section outlines the types of issues that can be submitted.
40
41 ### Report bugs
42
43 We aim to track and document everything related to Ansible modules for Dell PowerFlex via the Issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process.
44
45 Before submitting a new issue, make sure someone hasn't already reported the problem. Look through the [existing issues](https://github.com/dell/ansible-powerflex/issues) for similar issues.
46
47 Report a bug by submitting a [bug report](https://github.com/dell/ansible-powerflex/issues/new?labels=type%2Fbug%2C+needs-triage&template=bug_report.md&title=%5BBUG%5D%3A). Make sure that you provide as much information as possible on how to reproduce the bug.
48
49 When opening a Bug please include this information to help with debugging:
50
51 1. Version of relevant software: this software, Ansible, Python, SDK, etc.
52 2. Details of the issue explaining the problem: what, when, where
53 3. The expected outcome that was not met (if any)
54 4. Supporting troubleshooting information. __Note: Do not provide private company information that could compromise your company's security.__
55
56 An Issue __must__ be created before submitting any pull request. Any pull request that is created should be linked to an Issue.
57
58 ### Feature request
59
60 If you have an idea of how to improve this project, submit a [feature request](https://github.com/dell/ansible-powerflex/issues/new?labels=type%2Ffeature-request%2C+needs-triage&template=feature_request.md&title=%5BFEATURE%5D%3A).
61
62 ### Answering questions
63
64 If you have a question and you can't find the answer in the documentation or issues, the next step is to submit a [question.](https://github.com/dell/ansible-powerflex/issues/new?labels=type%2Fquestion&template=ask-a-question.md&title=%5BQUESTION%5D%3A)
65
66 We'd love your help answering questions being asked by other Ansible modules for Dell PowerFlex users.
67
68 ## Triage issues
69
70 Triage helps ensure that issues resolve quickly by:
71
72 * Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
73 * Giving a contributor the information they need before they commit to resolving an issue.
74 * Lowering the issue count by preventing duplicate issues.
75 * Streamlining the development process by preventing duplicate discussions.
76
77 If you don't have the knowledge or time to code, consider helping with _issue triage_. The Ansible modules for Dell PowerFlex community will thank you for saving them time by spending some of yours.
78
79 Read more about the ways you can [Triage issues](https://github.com/dell/ansible-powerflex/blob/main/ISSUE_TRIAGE.md).
80
81 ## Your first contribution
82
83 Unsure where to begin contributing? Start by browsing issues labeled `beginner friendly` or `help wanted`.
84
85 * [Beginner-friendly](https://github.com/dell/ansible-powerflex/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22) issues are generally straightforward to complete.
86 * [Help wanted](https://github.com/dell/ansible-powerflex/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues are problems we would like the community to help us with regardless of complexity.
87
88 When you're ready to contribute, it's time to create a pull request.
89
90 ## Branching
91
92 * [Branching Strategy for Ansible modules for Dell PowerFlex](https://github.com/dell/ansible-powerflex/blob/main/BRANCHING.md)
93
94 ## Signing your commits
95
96 We require that developers sign off their commits to certify that they have permission to contribute the code in a pull request. This way of certifying is commonly known as the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). We encourage all contributors to read the DCO text before signing a commit and making contributions.
97
98 GitHub will prevent a pull request from being merged if there are any unsigned commits.
99
100 ### Signing a commit
101
102 GPG (GNU Privacy Guard) will be used to sign commits. Follow the instructions [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/signing-commits) to create a GPG key and configure your GitHub account to use that key.
103
104 Make sure you have your user name and e-mail set. This will be required for your signed commit to be properly verified. Check this references:
105
106 * Setting up your github user name [reference](https://help.github.com/articles/setting-your-username-in-git/)
107 * Setting up your e-mail address [reference](https://help.github.com/articles/setting-your-commit-email-address-in-git/)
108
109 Once Git and your GitHub account have been properly configured, you can add the -S flag to the git commits:
110
111 ```console
112 $ git commit -S -m your commit message
113 # Creates a signed commit
114 ```
115
116 ### Commit message format
117
118 Ansible modules for Dell PowerFlex uses the guidelines for commit messages outlined in [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)
119
120 ## Pull requests
121
122 If this is your first time contributing to an open-source project on GitHub, make sure you read about [Creating a pull request](https://help.github.com/en/articles/creating-a-pull-request).
123
124 A pull request must always link to at least one GitHub issue. If that is not the case, create a GitHub issue and link it.
125
126 To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines:
127
128 * Title and description matches the implementation.
129 * Commits within the pull request follow the formatting guidelines.
130 * The pull request closes one related issue.
131 * The pull request contains necessary tests that verify the intended behavior.
132 * If your pull request has conflicts, rebase your branch onto the main branch.
133
134 If the pull request fixes a bug:
135
136 * The pull request description must include `Fixes #<issue number>`.
137 * To avoid regressions, the pull request should include tests that replicate the fixed bug.
138
139 The team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
140
141 We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
142
143 Make sure that the title for your pull request uses the same format as the subject line in the commit message.
144
145 ### Quality gates for pull requests
146
147 GitHub Actions are used to enforce quality gates when a pull request is created or when any commit is made to the pull request. These GitHub Actions enforce our minimum code quality requirement for any code that get checked into the repository. If any of the quality gates fail, it is expected that the contributor will look into the check log, understand the problem and resolve the issue. If help is needed, please feel free to reach out the maintainers of the project for [support](https://github.com/dell/ansible-powerflex/blob/main/SUPPORT.md).
148
149 #### Code sanitization
150
151 [GitHub action](https://github.com/dell/ansible-powerflex/actions/workflows/ansible-test.yml) that analyzes source code to flag ansible sanity errors and runs Unit tests.
152
153 ## Code reviews
154
155 All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
156
157 A pull request must satisfy following for it to be merged:
158
159 * A pull request will require at least 2 maintainer approvals.
160 * Maintainers must perform a review to ensure the changes adhere to guidelines laid out in this document.
161 * If any commits are made after the PR has been approved, the PR approval will automatically be removed and the above process must happen again.
162
163 ## Code style
164
165 Ensure the added code has the required documenation, examples and unit tests.
166
167 ### Sanity
168
169 Run ansible-test sanity --docker default on your code to ensure sanity. Ensure the code does not have any Andersson script violations and not break any existing unit test workflows.
170
171 ### TODOs in the code
172
173 We don't like TODOs in the code or documentation. It is really best if you sort out all issues you can see with the changes before we check the changes in.