WebGoat/.github/workflows/master_branch_pr.yml

27 lines
1.1 KiB
YAML

on:
pull_request:
pull_request_target:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 'Comment PR'
uses: actions/github-script@0.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: 'Hello world ! 👋' });
- name: Post PR comment
uses: mshick/add-pr-comment@v1
with:
message: |
Hi @${{ github.event.pull_request.user.login }},
It looks like this pull request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
Since we use Git Flow all commits to master are through are from the develop branch.
You do not need to close this PR, you can change the target branch to `development` by clicking the _"Edit"_ button at the top of this page.
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false