Skip to content

ci: add new workflow for issue comment triage #45

ci: add new workflow for issue comment triage

ci: add new workflow for issue comment triage #45

name: "Pull request / Validation / Labels"
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check_pull_request_labels:
name: "Required labels"
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Sleep for 10 seconds
run: sleep 10s
shell: bash
- uses: mheap/github-action-required-labels@v5
with:
mode: "minimum"
count: 1
labels: "pull request: breaking,pull request: bug,pull request: community,pull request: dependencies,pull request: documentation,pull request: feature-major,pull request: feature-minor,pull request: maintenance,pull request: skip-changelog,pull request: translation,dependencies"
add_comment: true
message: "This PR is being prevented from merging because you haven't added one of the `pull request:` labels. You'll need to add one of them before this PR can be merged."
- uses: mheap/github-action-required-labels@v5
with:
mode: "maximum"
count: 1
labels: "pull request: breaking,pull request: bug,pull request: dependencies,pull request: documentation,pull request: feature-major,pull request: feature-minor,pull request: maintenance,pull request: translation"
add_comment: true
message: "This PR is being prevented from merging because you have added more than one `pull request:` label. You'll need to keep only one of them before this PR can be merged."
check_issue_labels:
name: "Redudant labels"
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Sleep for 10 seconds
run: sleep 10s
shell: bash
- uses: mheap/github-action-required-labels@v5
with:
mode: "exactly"
count: 0
labels: "issue: [DEV],issue: bug,issue: dependencies,issue: documentation,issue: enhancement,issue: feature-major,issue: feature-minor,issue: maintenance,issue: question"
add_comment: true
message: "This PR is being prevented from merging because you have added one of the `issue:` labels. You'll need to remove it before this PR can be merged."