Skip to content

Commit 39f1b3f

Browse files
committed
Document change-notes process
1 parent d208ec7 commit 39f1b3f

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Here are a few things you can do that will increase the likelihood of your pull
5353
- Write tests.
5454
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
5555
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
56+
- For user-facing changes, add a [change-note](#change-notes).
5657

5758
## Releasing (write access required)
5859

@@ -129,6 +130,57 @@ To deprecate an older version of the Action:
129130
1. Upgrade the Actions warning for customers using the deprecated version to a non-fatal error, and mention that this version of the Action is no longer supported.
130131
1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [config.ts](pr-checks/config.ts). Once this PR is merged, the release process will no longer backport changes to the deprecated release version.
131132

133+
## Change-notes
134+
135+
Change-notes are Markdown files used to document user-facing changes. When making a change that affects users, create a change-note file in `unreleased-change-notes/` that describes the change. At the next release, the change-note files in `unreleased-change-notes/` will be combined into a new entry in `CHANGELOG.md`.
136+
137+
### Change-note file format
138+
139+
Change-note files must follow a certain format so that they can be automatically validated and processed. Failure to follow the format will result in a failed PR check.
140+
141+
You may validate your change-note file locally by running `npx tsx pr-checks/changenotes.ts validate`. This command will scan all change-note files in `unreleased-change-notes/` and report any errors.
142+
143+
#### File name
144+
145+
Change-note files must be named according to the following pattern: `YYYY-MM-DD-<short-title>.md`, where `YYYY-MM-DD` is the date of the change and `<short-title>` is a short non-spaced description of the change. For example, a change-note file for a JSON-related bug fix that was made on January 1st, 2020 might be named `2020-01-01-fix-json-bug.md`.
146+
147+
#### Frontmatter
148+
149+
The first line of the file must be a YAML frontmatter block, which is delimited by lines containing three dashes (`---`). The frontmatter block must contain a single `category` field, whose value must be one of the following categories:
150+
151+
| Category | Description |
152+
| -------- | ----------- |
153+
| `breaking` | A change that introduces backward-incompatible behavior. |
154+
| `feature` | A new capability or behavior added to the Action. |
155+
| `improvement` | An enhancement to existing functionality or performance. |
156+
| `securityFix` | A change that addresses a security vulnerability. |
157+
| `fix` | A bug fix that corrects unexpected behavior. |
158+
| `unship` | Features or options that have been removed. |
159+
| `deprecation` | Deprecation of features that will be removed in future versions. |
160+
| `knownIssue` | A known issue or limitation in the current release. |
161+
| `misc` | Other changes that do not fit into other categories. |
162+
163+
#### Body
164+
165+
The body of the change-note file must:
166+
167+
- Be written in valid [GitHub-Flavored Markdown](https://github.github.com/gfm/).
168+
- Describe the change in a way that is understandable to users of the Action. Limit the description to 1-2 sentences, and avoid technical details that are not relevant to users.
169+
- Be structured as a single unordered Markdown list with hyphen (`-`) bullets. Each list item should describe a single change. If there are multiple changes, use multiple list items.
170+
171+
### Example change-note file
172+
173+
```
174+
---
175+
category: feature
176+
---
177+
178+
- Added support for the SARIF v2.2 specification in the `github/codeql-action/upload` Action.
179+
- Added a new `sarif-version` input to the `github/codeql-action/upload` Action, allowing users to specify the SARIF version to use when uploading results.
180+
```
181+
182+
183+
132184
## Resources
133185

134186
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

0 commit comments

Comments
 (0)