Bumps the actions group with 6 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6.0.2` | `7.0.0` | | [actions/setup-python](https://github.com/actions/setup-python) | `6.2.0` | `6.3.0` | | [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.36.0` | `4.36.2` | | [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.1.2` | `6.2.0` | | [super-linter/super-linter/slim](https://github.com/super-linter/super-linter) | `8.6.0` | `8.7.0` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `3.0.0` | `3.0.1` | Updates `actions/checkout` from 6.0.2 to 7.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0) Updates `actions/setup-python` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/a309ff8b426b58ec0e2a45f0f869d46889d02405...ece7cb06caefa5fff74198d8649806c4678c61a1) Updates `github/codeql-action/upload-sarif` from 4.36.0 to 4.36.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/7211b7c8077ea37d8641b6271f6a365a22a5fbfa...8aad20d150bbac5944a9f9d289da16a4b0d87c1e) Updates `aws-actions/configure-aws-credentials` from 6.1.2 to 6.2.0 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/acca2b1b2070338fb9fd1ca27ecee81d687e58e5...e7f100cf4c008499ea8adda475de1042d6975c7b) Updates `super-linter/super-linter/slim` from 8.6.0 to 8.7.0 - [Release notes](https://github.com/super-linter/super-linter/releases) - [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md) - [Commits](https://github.com/super-linter/super-linter/compare/9e863354e3ff62e0727d37183162c4a88873df41...4ce20838b8ab83717e78138c5b3a1407148e0918) Updates `softprops/action-gh-release` from 3.0.0 to 3.0.1 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/b4309332981a82ec1c5618f44dd2e27cc8bfbfda...718ea10b132b3b2eba29c1007bb80653f286566b) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: aws-actions/configure-aws-credentials dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: super-linter/super-linter/slim dependency-version: 8.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
137 lines
5.0 KiB
YAML
137 lines
5.0 KiB
YAML
---
|
|
# 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Label PR based on policy in labeler.yml
|
|
uses: actions/labeler@c5dadc2a45784a4b6adfcd20fea3465da3a5f904
|
|
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@3a2844b7e9c422d3c10d287c895573f7108da1b3
|
|
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@3a2844b7e9c422d3c10d287c895573f7108da1b3
|
|
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@3a2844b7e9c422d3c10d287c895573f7108da1b3
|
|
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),
|
|
});
|
|
}
|