Skip to content

MAINT: Automate renaming of towncrier stubs #31

MAINT: Automate renaming of towncrier stubs

MAINT: Automate renaming of towncrier stubs #31

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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BOT_USERNAME: changelog-bot
defaults:
run:
shell: bash -el {0}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: actions/setup-python@v5
- run: |
pip install --upgrade towncrier pygithub
python ./.github/actions/rename_towncrier/rename_towncrier.py
- uses: stefanzweifel/git-auto-commit-action@v5
id: commit-action
- 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