Skip to content

Commit e4e9b26

Browse files
authored
Merge pull request #4211 from github/mario-campos/document-changenotes
Document change-notes process
2 parents 6e7fe2e + fa56eef commit e4e9b26

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 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 file. See [unreleased-change-notes/README.md](unreleased-change-notes/README.md).
5657

5758
## Releasing (write access required)
5859

‎pr-checks/changenotes.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ interface ChangenoteFile {
2828

2929
/**
3030
* Returns the absolute file paths of all files in
31-
* {@link CHANGENOTES_DIR} (except ".gitkeep").
31+
* {@link CHANGENOTES_DIR} (except ".gitkeep" and "README.md").
3232
* */
3333
function listUnreleasedChangenoteDir(): string[] {
3434
return fs
3535
.readdirSync(CHANGENOTES_DIR)
36-
.filter((name) => name !== ".gitkeep")
36+
.filter((name) => ![".gitkeep", "README.md"].includes(name))
3737
.map((name) => path.join(CHANGENOTES_DIR, name));
3838
}
3939

‎unreleased-change-notes/README.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Change notes
2+
3+
Change-notes are Markdown files used to document user-facing changes. When making a change that affects users, create a Markdown file here that describes the change. During the next release, the change-note files in `unreleased-change-notes/` will automatically be added to `CHANGELOG.md`.
4+
5+
### Change-note file format
6+
7+
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.
8+
9+
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.
10+
11+
12+
#### Body
13+
14+
The body of the change-note file must:
15+
16+
- Be written in valid [GitHub-Flavored Markdown](https://github.github.com/gfm/).
17+
- 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.
18+
19+
### Example change-note file
20+
21+
```
22+
- Fixed a bug where a network error while streaming the download of the CodeQL bundle could terminate the `init` Action instead of falling back to downloading the bundle before extracting it. [#4061](https://github.com/github/codeql-action/pull/4061)
23+
- Fix incorrect minimum required Git version for [improved incremental analysis](https://github.com/github/roadmap/issues/1158): it should have been 2.36.0, not 2.11.0. [#3781](https://github.com/github/codeql-action/pull/3781)
24+
```

0 commit comments

Comments
 (0)