Skip to content

Add Ready to merge label #47

Add Ready to merge label

Add Ready to merge label #47

on:
pull_request_review:
types:
- 'edited'
- 'dismissed'
- 'submitted'
jobs:
your-action:
runs-on: 'ubuntu-latest'
steps:
- id: 'reviews'
uses: 'jrylan/[email protected]'
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Add Label if 2 Approvals
if: 'steps.reviews.outputs.approved >= 2 && steps.reviews.outputs.changes_requested == 0'
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["ready to merge"]
})