Skip to content

Commit 7ad4100

Browse files
authored
feat(docs): add commit message guide (#1454)
1 parent 96da08e commit 7ad4100

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ To make your contribution, follow these steps:
201201
1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/terraform-provider-stackit/pulls) and [Issues](https://github.com/stackitcloud/terraform-provider-stackit/issues)to make sure the contribution you are making has not been already tackled by someone else.
202202
2. Fork the repo.
203203
3. Make your changes in a branch that is up-to-date with the original repo's `main` branch.
204-
4. Commit your changes including a descriptive message
204+
4. Commit your changes including a descriptive message (see commit message guide below).
205205
5. Create a pull request with your changes.
206206
6. The pull request will be reviewed by the repo maintainers. If you need to make further changes, make additional commits to keep commit history. When the PR is merged, commits will be squashed.
207207

@@ -212,8 +212,44 @@ To make your contribution, follow these steps:
212212
> **Break down large changes into smaller PRs**: Separate new features or bigger changes into multiple smaller Pull Requests.
213213
> This allows us to provide earlier feedback and makes it easier to review your PR.
214214
>
215-
> **Create a draft PR for early feedback**: If you want feedback during the implementation process, create a draft PR so we can have a look.
215+
> **Create a draft PR for early feedback**: If you want feedback during the implementation process, create a draft PR so we can have a look. Make sure to actually [mark](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) your PR as draft in that case.
216216
217+
### Commit messages
218+
219+
Commit messages should follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
220+
221+
This means your commit message should be structured as follows:
222+
223+
```
224+
<type>(<scope>): <description>
225+
226+
[optional body]
227+
228+
[optional footer(s)]
229+
```
230+
231+
- `type`: Required. Must be `feat`, `fix`, `chore`, `refactor`, ...
232+
- `scope`: Required. Must be one or multiple STACKIT services. Should follow the names of the [service modules](https://github.com/stackitcloud/stackit-sdk-go/tree/main/services) in the STACKIT Go SDK.
233+
- Body: Optional. Additional details about your changes.
234+
- Footer: Must include your Jira issue ID or GitHub issue ID (prefixed by a `#`) if there are any. Optional if there are no open issues for your change. For bigger changes please create an issue first.
235+
236+
#### Examples
237+
238+
```
239+
feat(iaas): onboarding of server resource and datasource
240+
241+
relates to STACKITTPR-1234 and #123
242+
```
243+
244+
```
245+
feat(iam, secretsmanager): add secretsmanager IAM rolebinding datasources
246+
247+
relates to STACKITTPR-641
248+
```
249+
250+
#### Notes for maintainers
251+
252+
- When doing a squash merge on GitHub, please make sure you stick to these conventions. Don't just use the default commit message provided by GitHub (especially when you're merging a PR with multiple commits in it).
217253

218254
## Bug Reports
219255

0 commit comments

Comments
 (0)