Prepare an automatic changelog from GitHub pull requests.
This project is currently in its alpha stage and might be incomplete or change a lot!
pip install changelistTo categorize merged PRs in the changelist, each PR must have have one of the following labels:
type: Highlightstype: New featurestype: Enhancementstype: Performancetype: Bug fixtype: APItype: Maintenancetype: Documentationtype: Infrastructure
This list will soon be configurable.
To ensure that each PR has an associated type: label, we recommend adding an action that fails CI if the label is missing.
To do so, place the following in .github/workflows/label-check.yaml:
name: Labels on: pull_request: types: - opened - repoened - labeled - unlabeled - synchronize env: LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }} jobs: check-type-label: name: ensure type label runs-on: ubuntu-latest steps: - if: "contains( env.LABELS, 'type: ' ) == false" run: exit 1Often, it is helpful to have milestones that reflect the actual PRs merged. We therefore recommend adding an action that attached the next open milestone to any merged PR.
To do so, place the following in .github/workflows/milestone-merged-prs.yaml:
name: Milestone on: pull_request_target: types: - closed branches: - "main" jobs: milestone_pr: name: attach to PR runs-on: ubuntu-latest steps: - uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420 with: token: ${{ secrets.MILESTONE_LABELER_TOKEN }} force: trueSee https://github.com/scientific-python/attach-next-milestone-action for more information.
export GH_TOKEN='...' changelist scikit-image/scikit-image v0.21.0 mainThe script requires a GitHub personal access token. The token does not need any permissions, since it is used only to increase query limits.