-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed branch name to be unique and fail task on master PRs
- Loading branch information
1 parent
211fab1
commit 4a71b39
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,9 @@ jobs: | |
git config --global user.name 'Bram van Heuveln' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git checkout -b auto-format-code | ||
git push --set-upstream origin auto-format-code | ||
branch_name="auto-format-code-$(date +%s)" | ||
git checkout -b $branch_name | ||
git push --set-upstream origin $branch_name | ||
git add . | ||
git diff --cached --exit-code || git commit -am "Automated Java code formatting changes" && git push | ||
|
@@ -47,6 +48,11 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Must approve auto-format pull request | ||
run: | | ||
echo "Please review and approve the appropriate auto-format-code pull request." | ||
exit 1 | ||
format_other_branches: | ||
if: | | ||
github.event.pull_request.base.ref == 'dev' && | ||
|