Skip to content

Commit b8b6976

Browse files
committed
Merge branch 'main' into list-dependencies
2 parents baae77d + d9ac1e4 commit b8b6976

13 files changed

Lines changed: 844 additions & 585 deletions

File tree

.github/workflows/label-check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ on:
44
pull_request:
55
types:
66
- opened
7+
- reopened
78
- labeled
89
- unlabeled
10+
- synchronize
911

1012
env:
1113
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
python-version: ["3.11"]
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up Python ${{ matrix.python-version }}
1616
uses: actions/setup-python@v4
1717
with:

.github/workflows/milestone-merged-prs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: attach to PR
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: scientific-python/attach-next-milestone-action@f94a5235518d4d34911c41e19d780b8e79d42238
15+
- uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420
1616
with:
1717
token: ${{ secrets.MILESTONE_LABELER_TOKEN }}
1818
force: true

CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,81 @@
1+
# changelist 0.3
2+
3+
We're happy to announce the release of changelist 0.3!
4+
5+
## Enhancements
6+
7+
- Add newline before lists in contributor section ([#40](https://github.com/scientific-python/changelist/pull/40)).
8+
9+
## Bug Fixes
10+
11+
- Add newline after PR sections ([#35](https://github.com/scientific-python/changelist/pull/35)).
12+
13+
## Maintenance
14+
15+
- Update setuptools requirement ([#37](https://github.com/scientific-python/changelist/pull/37)).
16+
17+
## Documentation
18+
19+
- Link to example in README ([#36](https://github.com/scientific-python/changelist/pull/36)).
20+
- Fix CHANGELOG format ([#38](https://github.com/scientific-python/changelist/pull/38)).
21+
22+
## Contributors
23+
24+
1 authors added to this release (alphabetically):
25+
26+
- Jarrod Millman ([@jarrodmillman](https://github.com/jarrodmillman))
27+
28+
1 reviewers added to this release (alphabetically):
29+
30+
- Jarrod Millman ([@jarrodmillman](https://github.com/jarrodmillman))
31+
32+
_These lists are automatically generated, and may not be complete or may contain duplicates._
33+
34+
# changelist 0.2
35+
36+
We're happy to announce the release of changelist 0.2!
37+
38+
## Enhancements
39+
40+
- Ensure label check runs on all PR push events / commits ([#22](https://github.com/scientific-python/changelist/pull/22)).
41+
- Remove newlines between pull request summaries and their links ([#27](https://github.com/scientific-python/changelist/pull/27)).
42+
43+
## Bug Fixes
44+
45+
- Format contributor section as lists ([#28](https://github.com/scientific-python/changelist/pull/28)).
46+
47+
## Maintenance
48+
49+
- Refactor into submodules ([#20](https://github.com/scientific-python/changelist/pull/20)).
50+
- Bump scientific-python/attach-next-milestone-action from f94a5235518d4d34911c41e19d780b8e79d42238 to bc07be829f693829263e57d5e8489f4e57d3d420 ([#21](https://github.com/scientific-python/changelist/pull/21)).
51+
- Bump actions/checkout from 3 to 4 ([#31](https://github.com/scientific-python/changelist/pull/31)).
52+
- Bump pre-commit from 3.3.3 to 3.4.0 ([#32](https://github.com/scientific-python/changelist/pull/32)).
53+
- Update README ([#33](https://github.com/scientific-python/changelist/pull/33)).
54+
55+
## Documentation
56+
57+
- Improve release process ([#14](https://github.com/scientific-python/changelist/pull/14)).
58+
- Ensure label check runs on all PR push events / commits ([#22](https://github.com/scientific-python/changelist/pull/22)).
59+
60+
## Contributors
61+
62+
5 authors added to this release (alphabetically):
63+
64+
- [@dependabot[bot]](https://github.com/apps/dependabot)
65+
- Brigitta Sipőcz ([@bsipocz](https://github.com/bsipocz))
66+
- Jarrod Millman ([@jarrodmillman](https://github.com/jarrodmillman))
67+
- Lars Grüter ([@lagru](https://github.com/lagru))
68+
- Stefan van der Walt ([@stefanv](https://github.com/stefanv))
69+
70+
4 reviewers added to this release (alphabetically):
71+
72+
- Eric Larson ([@larsoner](https://github.com/larsoner))
73+
- Jarrod Millman ([@jarrodmillman](https://github.com/jarrodmillman))
74+
- Lars Grüter ([@lagru](https://github.com/lagru))
75+
- Stefan van der Walt ([@stefanv](https://github.com/stefanv))
76+
77+
_These lists are automatically generated, and may not be complete or may contain duplicates._
78+
179
# changelist 0.1
280

381
We're happy to announce the release of changelist 0.1!

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include src/changelist/*.toml

README.md

Lines changed: 106 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# changelist
22

3-
Prepare an automatic changelog from GitHub pull requests.
3+
Changelist helps you write better release notes by automating as much of the
4+
process as possible. For example, see
5+
https://github.com/scientific-python/changelist/blob/main/CHANGELOG.md.
6+
7+
**Features**
8+
9+
- Compile a list of pull requests, code authors and reviewers between any two
10+
valid Git objects (refs).
11+
- Categorize pull requests into sections based on GitHub labels.
12+
- Point it at any repository on GitHub. No need to clone or checkout a
13+
repository locally, a Python package is all that's needed.
14+
15+
We recommend to treat the generated document as a first draft to build
16+
on and not as an already perfect documentation of the release.
417

518
_This project is currently in its alpha stage and might be incomplete or change a lot!_
619

@@ -10,26 +23,101 @@ _This project is currently in its alpha stage and might be incomplete or change
1023
pip install changelist
1124
```
1225

13-
## Set up your repository
26+
## Usage
27+
28+
The script requires a [GitHub personal access
29+
token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
30+
The token does not need any permissions, since it is used only to
31+
increase query limits.
32+
33+
```sh
34+
export GH_TOKEN='...'
35+
changelist scientific-python/changelist v0.2.0 main
36+
```
1437

15-
To categorize merged PRs in the changelist, each PR
16-
must have have one of the following labels:
38+
This will list all pull requests, authors and reviewers that touched commits
39+
between `v0.2.0` and `main` (excluding `v0.2.0`).
40+
Pull requests are sorted into section according to the configuration in
41+
`tool.changelist.label_section_map`.
42+
43+
## Configuration
44+
45+
changelist can be configured from two sources, in order of precedence:
46+
47+
- A local TOML file specified with the `--config` option
48+
- A remote `pyproject.toml` at `stop_rev`
49+
50+
If a configuration option is not specified in either file above, changelist
51+
falls back to the following configuration:
52+
53+
````toml
54+
# Default changelist configuration as supported in pyproject.toml
55+
[tool.changelist]
56+
57+
# A template string that is included as the title of the generated notes.
58+
# "{repo_name}" and "{version}", if given, are replaced by the respective
59+
# values given in the command line.
60+
title_template = "{repo_name} {version}"
61+
62+
# A template string that is included as introductory text after the title.
63+
# "{repo_name}" and "{version}", if given, are replaced by the respective
64+
# values given in the command line.
65+
intro_template = """
66+
We're happy to announce the release of {repo_name} {version}!
67+
"""
68+
69+
# A template string that is included at the end of the generated notes.
70+
# "{repo_name}" and "{version}", if given, are replaced by the respective
71+
# values given in the command line.
72+
outro_template = """
73+
_These lists are automatically generated, and may not be complete or may contain
74+
duplicates._
75+
"""
76+
77+
# Profiles that are excluded from the contributor list.
78+
ignored_user_logins = [
79+
"web-flow",
80+
]
81+
82+
# If this regex matches a pull requests description, the captured content
83+
# is included instead of the pull request title.
84+
# E.g. the default regex below is matched by
85+
#
86+
# ```release-note
87+
# An ideally expressive description of the change that is included as a single
88+
# bullet point. Newlines are removed.
89+
# ```
90+
#
91+
# If you modify this regex, make sure to match the content with a capture
92+
# group named "summary".
93+
pr_summary_regex = "^```release-note\\s*(?P<summary>[\\s\\S]*?\\w[\\s\\S]*?)\\s*^```"
94+
95+
# If any of a pull request's labels matches one of the regexes on the left side
96+
# its summary will appear in the appropriate section with the title given on
97+
# the right side. If a pull request doesn't match one of these categories it is
98+
# sorted into a section titled "Other". Pull request can appear in multiple
99+
# sections as long as their labels match.
100+
[tool.changelist.label_section_map]
101+
".*Highlight.*" = "Highlights"
102+
".*New feature.*" = "New Features"
103+
".*API.*" = "API Changes"
104+
".*Enhancement.*" = "Enhancements"
105+
".*Performance.*" = "Performance"
106+
".*Bug fix.*" = "Bug Fixes"
107+
".*Documentation.*" = "Documentation"
108+
".*Infrastructure.*" = "Infrastructure"
109+
".*Maintenance.*" = "Maintenance"
110+
````
17111

18-
- `type: Highlights`
19-
- `type: New features`
20-
- `type: Enhancements`
21-
- `type: Performance`
22-
- `type: Bug fix`
23-
- `type: API`
24-
- `type: Maintenance`
25-
- `type: Documentation`
26-
- `type: Infrastructure`
112+
## Set up your repository
27113

28-
This list will soon be configurable.
114+
To categorize merged PRs in the changelist with the default configuration, each
115+
PR must have a label that matches one of the regexes on the left side of the
116+
`label_section_map` table, e.g. `type: Highlights`.
29117

30118
### Label checking
31119

32-
To ensure that each PR has an associated `type: ` label,
120+
You may want to ensure that each PR has an associated `type: ` label,
33121
we recommend adding an action that fails CI if the label is missing.
34122

35123
To do so, place the following in `.github/workflows/label-check.yaml`:
@@ -41,8 +129,10 @@ on:
41129
pull_request:
42130
types:
43131
- opened
132+
- repoened
44133
- labeled
45134
- unlabeled
135+
- synchronize
46136

47137
env:
48138
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
@@ -79,22 +169,10 @@ jobs:
79169
name: attach to PR
80170
runs-on: ubuntu-latest
81171
steps:
82-
- uses: scientific-python/attach-next-milestone-action@f94a5235518d4d34911c41e19d780b8e79d42238
172+
- uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420
83173
with:
84174
token: ${{ secrets.MILESTONE_LABELER_TOKEN }}
85175
force: true
86176
```
87177

88178
See https://github.com/scientific-python/attach-next-milestone-action for more information.
89-
90-
## Usage
91-
92-
```sh
93-
export GH_TOKEN='...'
94-
changelist scikit-image/scikit-image v0.21.0 main
95-
```
96-
97-
The script requires a [GitHub personal access
98-
token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
99-
The token does not need any permissions, since it is used only to
100-
increase query limits.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=43.0.0", "wheel"]
2+
requires = ["setuptools>=68.0.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "changelist"
7-
version = "0.1"
7+
version = "0.4rc0.dev0"
88
requires-python = ">=3.9"
99
readme = "README.md"
1010
license = {file = "LICENSE.txt"}
@@ -33,7 +33,7 @@ dependencies = [
3333
changelist = "changelist.__main__:main"
3434

3535
[project.optional-dependencies]
36-
lint = ["pre-commit == 3.3.3"]
36+
lint = ["pre-commit == 3.4.0"]
3737

3838
[tool.ruff]
3939
line-length = 88

0 commit comments

Comments
 (0)