Skip to content

Commit

Permalink
Merge pull request #43 from rmartin16/fixups
Browse files Browse the repository at this point in the history
Delete temp file and correct `BRANCH_NAME` usage
  • Loading branch information
freakboy3742 authored Jun 12, 2023
2 parents c4eb936 + be654fe commit cdf29bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
run: |
pre-commit autoupdate --repo ${{ matrix.hook-repo }} | tee update.log
echo "vers-bump-str=$(grep -ohE '([^ ]+ -> [^ ]+)' update.log | sed 's/->/to/')" >> ${GITHUB_OUTPUT}
rm -f update.log
pre-commit install-hooks
- name: Run pre-commit
Expand Down Expand Up @@ -120,11 +121,11 @@ jobs:
BRANCH_NAME="${{ env.BRANCH_PREFIX }}/${{ steps.pr.outputs.hook-name }}"
git fetch origin
git checkout ${{ env.BRANCH_NAME }}
git checkout "${BRANCH_NAME}"
FILENAME="${{ env.CHANGENOTE_DIR }}/${{ steps.created-pr.outputs.pull-request-number }}.misc.rst"
printf 'The ``pre-commit`` hook for ``${{ steps.pr.outputs.hook-name }}`` was updated to its latest version.\n' > "${FILENAME}"
git add "${FILENAME}"
git commit -m "Add changenote."
git push --set-upstream origin ${{ env.BRANCH_NAME }}
git push --set-upstream origin "${BRANCH_NAME}"

0 comments on commit cdf29bd

Please sign in to comment.