Skip to content

Commit 487bed2

Browse files
Change CONTRIBUTING.md according to new changelog requirements (#2839)
* Mention changelog requirements in CONTRIBUTING * Refer to CONTRIBUTING in changelog workflow * Clarify when changelog entries are necessary --------- Co-authored-by: Martin Nordholts <[email protected]>
1 parent 6f69682 commit 487bed2

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

.github/workflows/require-changelog-for-PRs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
ADDED=$(git diff -U0 "origin/${PR_BASE}" HEAD -- CHANGELOG.md | grep -P '^\+[^\+].+$')
3030
echo "Added lines in CHANGELOG.md:"
3131
echo "$ADDED"
32-
echo "Grepping for PR info:"
32+
echo "Grepping for PR info (see CONTRIBUTING.md):"
3333
grep "#${PR_NUMBER}\\b.*@${PR_SUBMITTER}\\b" <<< "$ADDED"

CONTRIBUTING.md

+28-7
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,42 @@ Thank you for considering to contribute to `bat`!
66

77
## Add an entry to the changelog
88

9-
If your contribution changes the behavior of `bat` (as opposed to a typo-fix
10-
in the documentation), please update the [`CHANGELOG.md`](CHANGELOG.md) file
11-
and describe your changes. This makes the release process much easier and
12-
therefore helps to get your changes into a new `bat` release faster.
9+
Keeping the [`CHANGELOG.md`](CHANGELOG.md) file up-to-date makes the release
10+
process much easier and therefore helps to get your changes into a new `bat`
11+
release faster. However, not every change to the repository requires a
12+
changelog entry. Below are a few examples of that.
13+
14+
Please update the changelog if your contribution contains changes regarding
15+
any of the following:
16+
- the behavior of `bat`
17+
- syntax mappings
18+
- syntax definitions
19+
- themes
20+
- the build system, linting, or CI workflows
21+
22+
A changelog entry is not necessary when:
23+
- updating documentation
24+
- fixing typos
25+
26+
>[!NOTE]
27+
> For PRs, a CI workflow verifies that a suitable changelog entry is
28+
> added. If such an entry is missing, the workflow will fail. If your
29+
> changes do not need an entry to the changelog (see above), that
30+
> workflow failure can be disregarded.
31+
32+
33+
### Changelog entry format
1334

1435
The top of the `CHANGELOG` contains a *"unreleased"* section with a few
1536
subsections (Features, Bugfixes, …). Please add your entry to the subsection
1637
that best describes your change.
1738

18-
Entries follow this format:
39+
Entries must follow this format:
1940
```
2041
- Short description of what has been changed, see #123 (@user)
2142
```
22-
Here, `#123` is the number of the original issue and/or your pull request.
23-
Please replace `@user` by your GitHub username.
43+
Please replace `#123` with the number of your pull request (not issue) and
44+
`@user` by your GitHub username.
2445

2546

2647
## Development

0 commit comments

Comments
 (0)