Update onpr_automerge.yaml

This commit is contained in:
Alexandre
2024-02-28 10:55:21 +01:00
committed by GitHub
parent 2d0e32b024
commit 3b400ae63e

View File

@@ -21,9 +21,24 @@ on:
- completed
status: {}
jobs:
automerge:
if: ${{ (github.event.issue.pull_request) && (contains(github.event.comment.body, '/automerge')) }} # <--- The other way to compare if it's on a PR or on an issue
labeler:
runs-on: ubuntu-latest
steps:
- name: Add the automerge label
if: ${{ (github.event.issue.pull_request) && (contains(github.event.comment.body, '/automerge')) }} # <--- The other way to compare if it's on a PR or on an issue
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: ['automerge']
})
automerge:
runs-on: ubuntu-latest
steps:
- id: automerge
name: automerge
uses: "pascalgn/automerge-action@v0.16.2"