Skip to content

Commit

Permalink
Forbid /accept on PR from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lepapareil authored and hurl-bot committed Oct 5, 2023
1 parent 83843b5 commit 02d0ac3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/accept-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ jobs:
git fetch fork
git branch -va
- name: Check if PR source branch is not master
if: env.HEAD_REF == 'master'
run: |
comment="❌ Can not merge this pull request because your working branch is master, please create a new branch as requested in [CONTRIBUTING.md](https://github.com/Orange-OpenSource/hurl/blob/master/CONTRIBUTING.md)."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
- name: Check if pull request state is open
run: |
if [ "${{ env.PR_STATE }}" = "open" ] ; then
Expand Down

0 comments on commit 02d0ac3

Please sign in to comment.