build(deps): bump super-linter/super-linter from 6.6.0 to 7.0.0 #607
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# vi: ts=2 sw=2 et: | |
# SPDX-License-Identifier: LGPL-2.1-or-later | |
# | |
name: "Pull Request Labeler" | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, ready_for_review, closed] | |
paths-ignore: | |
- '.github/labeler.yml' | |
- '.github/workflows/labeler.yml' | |
# Allow testing changes made to the labeler configuration | |
pull_request: | |
paths: | |
- '.github/labeler.yml' | |
- '.github/workflows/labeler.yml' | |
issue_comment: | |
types: [created] | |
permissions: | |
contents: read | |
jobs: | |
triage: | |
if: github.repository == 'systemd/systemd' | |
runs-on: ubuntu-24.04 | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Repository checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
if: github.event_name == 'pull_request' | |
- name: Label PR based on policy in labeler.yml | |
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 | |
if: startsWith(github.event_name, 'pull_request') && github.base_ref == 'main' && github.event.action != 'closed' | |
with: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
configuration-path: .github/labeler.yml | |
sync-labels: false | |
- name: Set or remove labels based on systemd development workflow | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea | |
if: startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' && !github.event.pull_request.draft | |
with: | |
script: | | |
response = await github.rest.issues.listLabelsOnIssue({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
original = new Set(response.data.map(l => l.name)); | |
labels = new Set(original); | |
good_to_merge = new Set([ | |
"good-to-merge/waiting-for-ci π", | |
"good-to-merge/after-next-release", | |
"good-to-merge/with-minor-suggestions", | |
"good-to-merge/waiting-for-reporter-feedback π", | |
]); | |
if (Array.from(labels).filter(l => good_to_merge.has(l)).length == 0) { | |
labels.add("please-review"); | |
} | |
for (const label of ["reviewed/needs-rework π¨", | |
"ci-fails/needs-rework π₯", | |
"ci-failure-appears-unrelated", | |
"needs-rebase"]) { | |
labels.delete(label); | |
} | |
if (labels.size != original.size || Array.from(labels).some(l => !original.has(l))) { | |
await github.rest.issues.setLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: Array.from(labels), | |
}); | |
} | |
- name: Add please-review label on command in issue comment | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea | |
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/please-review') | |
with: | |
script: | | |
await github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ["please-review"] | |
}) | |
- name: Remove specific labels when PR is closed or merged | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea | |
if: startsWith(github.event_name, 'pull_request') && github.event.action == 'closed' | |
with: | |
script: | | |
response = await github.rest.issues.listLabelsOnIssue({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
original = new Set(response.data.map(l => l.name)); | |
labels = new Set(original); | |
for (const label of ["please-review", | |
"reviewed/needs-rework π¨", | |
"ci-fails/needs-rework π₯", | |
"needs-rebase", | |
"good-to-merge/waiting-for-ci π", | |
"good-to-merge/after-next-release", | |
"good-to-merge/with-minor-suggestions", | |
"good-to-merge/waiting-for-reporter-feedback π", | |
"needs-discussion π€", | |
"needs-reporter-feedback β", | |
"dont-merge π£", | |
"squash-on-merge", | |
"quick-review πββοΈ"]) { | |
labels.delete(label); | |
} | |
if (labels.size != original.size || Array.from(labels).some(l => !original.has(l))) { | |
await github.rest.issues.setLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: Array.from(labels), | |
}); | |
} |