Skip to content

PP-11314 add publishing workflow for release commits #11

PP-11314 add publishing workflow for release commits

PP-11314 add publishing workflow for release commits #11

name: Check for unmerged release PR
on:
pull_request:
permissions:
pull-requests: read
jobs:
check_merge:
runs-on: ubuntu-latest
steps:
- name: Check for unmerged release
id: check_pr
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
})
const openRelease = prs.data.find(pr => pr.user.login === 'alphagov-pay-ci-concourse' && pr.state === 'open')
if (openRelease) {
core.setFailed(`There is an unmerged release PR, please merge it before merging this PR. \n Link: ${openRelease.url}`)
}