Skip to content

Accept Release Candidate #617

Accept Release Candidate

Accept Release Candidate #617

name: Accept Release Candidate
on:
pull_request_review:
types: [submitted]
jobs:
merge:
name: Merge Release Candidate
if: |
github.event.review.state == 'approved' &&
github.event.pull_request.merged == false &&
github.event.pull_request.base.ref == 'production' &&
startsWith(github.event.pull_request.head.ref, 'rc')
runs-on: ubuntu-latest
steps:
- name: "Merge pull request"
uses: "actions/github-script@v7"
with:
github-token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
script: |
await github.rest.pulls.merge({
merge_method: "merge",
owner: context.repo.owner,
pull_number: context.issue.number,
repo: context.repo.repo,
})