Skip to content

Commit

Permalink
#1763 echo all PR labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Strzebonski committed Jun 24, 2022
1 parent 8e3bb21 commit d5988ca
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/merge-only-when-ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ on:

jobs:
allow-merge:
if: contains(github.event.pull_request.labels.*.name, 'ready-to-merge')
runs-on: ubuntu-latest
steps:
- name: PR is ready to merge
run: true
uses: actions/github-script@v6
with:
script: |
const labels = ${{ toJSON(github.event.pull_request.labels) }}
const isReady = false
for (const label of labels) {
if (label.name === 'ready-to-merge') {
isReady = true
}
}
if (isReady === false) {
core.setFailed()
}

0 comments on commit d5988ca

Please sign in to comment.