Skip to content

Commit

Permalink
update gha
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed May 28, 2024
1 parent d9fd92d commit 98874e6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/comment_wrong_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ jobs:
repo: context.repo.repo,
body: 'Warning: we only accept PRs to the `dev` branch. It looks like you've created a PR to the `main` branch. Please edit this PR and select the `dev` branch as the target branch instead. If this was intentional please ignore this message.'
})
comment_warning_internal_pr:
if: ${{ github.event.pull_request.head.ref != 'dev' }}
runs-on: ubuntu-latest
steps:
- name: Comment warning about the wrong branch selected for PR
id: comment_docker_image
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Warning: we only accept PRs to main from the `dev` branch. It looks like you've created a PR from a different branch. Please edit this PR and select the `dev` branch as the source branch instead. If this was intentional please ignore this message.'
})

0 comments on commit 98874e6

Please sign in to comment.