Skip to content

MAINT: Automate renaming of towncrier stubs #35

MAINT: Automate renaming of towncrier stubs

MAINT: Automate renaming of towncrier stubs #35

Workflow file for this run

name: Changelog
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, labeled, unlabeled]
# https://joht.github.io/johtizen/build/2022/01/20/github-actions-push-into-repository.html#git-commit-within-a-pull-request#example-4
jobs:
changelog_checker:
name: Check towncrier entry in doc/changes/devel/
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: actions/setup-python@v5
- run: |
set -eo pipefail
pip install --upgrade towncrier pygithub
python ./.github/actions/rename_towncrier/rename_towncrier.py
- uses: stefanzweifel/git-auto-commit-action@v5
id: commit-action
with:
commit_message: "DOC: Update changelog entry to PR ${{ github.event.pull_request.number }}"
- run: exit 1
if: steps.commit-action.outputs.changes_detected == 'false'
# - uses: larsoner/action-towncrier-changelog@co # revert to scientific-python @ 0.1.1 once bug is fixed
# with:
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# BOT_USERNAME: changelog-bot