Skip to content

Commit cce37a9

Browse files
authored
docs: Update CONTRIBUTING.md with commit message guidelines
Clarify commit message guidelines and examples for scopes.
1 parent 6aadb6d commit cce37a9

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,28 @@ Create a branch with a descriptive name, such as `add-search`.
4747

4848
### Step 5: Push your feature branch to your fork
4949

50-
We use [semantic-versioning](https://semver.org/) and the [conventional commit message format](https://www.conventionalcommits.org/en/v1.0.0/). Keep a separate feature branch for each issue you want to address. As you develop code, continue to push code to your remote feature branch. Example:
50+
We use [semantic-versioning](https://semver.org/) and the [conventional commit message format](https://www.conventionalcommits.org/en/v1.0.0/). Keep a separate feature branch for each issue you want to address. As you develop code, continue to push code to your remote feature branch.
51+
52+
**Important:** When modifying or adding features for a specific part of the SDK, commits and pull requests should include a scope. The scope must be either `boxsdk` or `boxsdkgen`. For general changes that don't affect a specific part (e.g., documentation updates, build configuration), the scope is optional. Examples:
5153

5254
```
53-
tag: short description
55+
tag(scope): short description
56+
tag: short description (when scope is not applicable)
5457
5558
longer description here if necessary.
5659
```
5760

58-
The message summary should be a one-sentence description of the change, and it must be 72 characters in length or shorter. For a list of tags, please [click here](https://github.com/commitizen/conventional-commit-types/blob/master/index.json). Note that you must include the `!` for breaking changes (e.g. `feat!: removed old apis`).
61+
Examples with scope:
62+
- `feat(boxsdk): add new file upload feature`
63+
- `fix(boxsdkgen): correct type definitions`
64+
- `feat(boxsdk)!: remove deprecated endpoints`
65+
66+
Examples without scope:
67+
- `docs: update README`
68+
- `chore: update build configuration`
69+
- `ci: fix GitHub Actions workflow`
70+
71+
The message summary should be a one-sentence description of the change, and it must be 72 characters in length or shorter. For a list of tags, please [click here](https://github.com/commitizen/conventional-commit-types/blob/master/index.json). Note that you must include the `!` for breaking changes (e.g. `feat(boxsdk)!: removed old apis` or `feat!: breaking change` for general changes).
5972

6073
Shown below are examples of the release type that will be done based on a commit message.
6174

@@ -74,14 +87,14 @@ The rules for commit types are:
7487

7588
In most cases, commits will be a `feat` or `fix`. Make sure to include the `!` in the title if there are non-backwards-compatible changes in the commit.
7689

77-
| Commit message | Release type | New version |
78-
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------- |
79-
| `feat!: remove old files endpoints` | Major ("breaking") | `X+1.0.0` |
80-
| `feat: add new file upload endpoint` | Minor ("feature") | `X.Y+1.0` |
81-
| `fix: file streaming during download` | Patch ("fix") | `X.Y.Z+1` |
82-
| `docs: document files api` | No release | `X.Y.Z` |
83-
| `chore: remove commented code from file upload` | No release | `X.Y.Z` |
84-
| `refactor: rename a variable (invisible change)` | No release | `X.Y.Z` |
90+
| Commit message | Release type | New version |
91+
| ------------------------------------------------------- | ------------------ | ----------- |
92+
| `feat(boxsdk)!: remove old files endpoints` | Major ("breaking") | `X+1.0.0` |
93+
| `feat(boxsdkgen): add new file upload endpoint` | Minor ("feature") | `X.Y+1.0` |
94+
| `fix(boxsdk): file streaming during download` | Patch ("fix") | `X.Y.Z+1` |
95+
| `docs: update README` | No release | `X.Y.Z` |
96+
| `chore: update build configuration` | No release | `X.Y.Z` |
97+
| `refactor(boxsdk): rename a variable (invisible change)`| No release | `X.Y.Z` |
8598

8699
### Step 6: Rebase
87100

0 commit comments

Comments
 (0)