Skip to content

Commit

Permalink
FIX: Maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Dec 21, 2023
1 parent f5066c3 commit 9b9ec28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .github/actions/rename_towncrier/rename_towncrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,3 @@
print(f"Renaming {fro} to {to}")
if real:
subprocess.check_call(["git", "mv", fro, to])
else:
exit(0)
if real:
subprocess.check_call(
["git", "commit", "-am", f"DOC: Rename towncrier file(s) for PR {pr_num}"]
)
subprocess.check_call(["git", "push"])
print(
"Pushed commit to GitHub, exiting with failing status to prevent further "
"checks"
)
exit(1) # don't proceed with other checks
11 changes: 8 additions & 3 deletions .github/workflows/check_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ jobs:
defaults:
run:
shell: bash -el {0}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
ref: ${{ github.head_ref }}
- run: actions/setup-python@v5
- run: |
pip install --upgrade towncrier pygithub
python ./.github/actions/rename_towncrier/rename_towncrier.py
- uses: larsoner/action-towncrier-changelog@co # revert to scientific-python @ 0.1.1 once bug is fixed
- 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

0 comments on commit 9b9ec28

Please sign in to comment.