boulder/.github/workflows/main-prs.yml

28 lines
823 B
YAML

name: move PR to main
on:
pull_request:
branches: [ master ]
types: [ opened ]
jobs:
comment_and_update:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v2
with:
script: |
github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "This PR was created against 'master', but should be against 'main'. Updating the base branch accordingly.",
})
- uses: actions/github-script@v2
with:
script: |
github.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
base: "main",
})