Skip to content

Commit

Permalink
Merge pull request systemd#30684 from systemd/update-labeler-configur…
Browse files Browse the repository at this point in the history
…ation

ci: migrate labeler configuration to the new format
  • Loading branch information
bluca authored Jan 2, 2024
2 parents 83a0417 + b3fb73a commit c0d672f
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 84 deletions.
203 changes: 123 additions & 80 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,140 +1,183 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# vi: sw=2 ts=2 et:

apparmor:
- '**/*apparmor*'
- changed-files:
- any-glob-to-any-file: '**/*apparmor*'
binfmt:
- '**/*binfmt*'
- changed-files:
- any-glob-to-any-file: '**/*binfmt*'
btrfs:
- '**/*btrfs*'
- changed-files:
- any-glob-to-any-file: '**/*btrfs*'
build-system:
- meson_options.txt
- '**/meson.build'
- Makefile
- configure
- changed-files:
- any-glob-to-any-file: ['meson_options.txt', '**/meson.build', 'Makefile', 'configure']
busctl:
- '**/*busctl*'
- changed-files:
- any-glob-to-any-file: '**/*busctl*'
cgls:
- '**/*cgls*'
- changed-files:
- any-glob-to-any-file: '**/*cgls*'
cgtop:
- '**/*cgtop*'
- changed-files:
- any-glob-to-any-file: '**/*cgtop*'
ci:
- '.github/*'
- changed-files:
- any-glob-to-any-file: '.github/*'
coccinelle:
- coccinelle/*
- changed-files:
- any-glob-to-any-file: 'coccinelle/*'
coredump:
- '**/*coredump*'
- changed-files:
- any-glob-to-any-file: '**/*coredump*'
documentation:
- NEWS
- README*
- docs/*
- man/*
- changed-files:
- any-glob-to-any-file: ['NEWS', 'README*', 'docs/*', 'man/*']
env-generator:
- '**/*environment*generator*'
- changed-files:
- any-glob-to-any-file: '**/*environment*generator*'
debug-generator:
- '**/debug-generator*'
- changed-files:
- any-glob-to-any-file: '**/debug-generator*'
fstab-generator:
- '**/*fstab-generator*'
- changed-files:
- any-glob-to-any-file: '**/*fstab-generator*'
growfs:
- '**/*growfs*'
- changed-files:
- any-glob-to-any-file: '**/*growfs*'
hwdb:
- hwdb.d/**/*
- changed-files:
- any-glob-to-any-file: 'hwdb.d/**/*'
journal:
- src/journal/*
- src/libsystemd/sd-journal/*
- changed-files:
- any-glob-to-any-file: ['src/journal/*', 'src/libsystemd/sd-journal/*']
journal-remote:
- src/journal-remote/*
- changed-files:
- any-glob-to-any-file: 'src/journal-remote/*'
meson:
- meson_options.txt
- '**/meson.build'
- changed-files:
- any-glob-to-any-file: ['meson_options.txt', '**/meson.build']
mkosi:
- .mkosi/*
- mkosi.build
- changed-files:
- any-glob-to-any-file: ['.mkosi/*', 'mkosi.build']
network:
- src/libsystemd-network/**/*
- src/network/**/*
- changed-files:
- any-glob-to-any-file: ['src/libsystemd-network/**/*', 'src/network/**/*']
portable:
- src/portable/**/*
- changed-files:
- any-glob-to-any-file: 'src/portable/**/*'
rc-local-generator:
- src/rc-local-generator/*
- changed-files:
- any-glob-to-any-file: 'src/rc-local-generator/*'
repart:
- '**/*repart*'
- changed-files:
- any-glob-to-any-file: '**/*repart*'
resolve:
- '**/*resolve*'
- changed-files:
- any-glob-to-any-file: '**/*resolve*'
rfkill:
- '**/*rfkill*'
- changed-files:
- any-glob-to-any-file: '**/*rfkill*'
rpm:
- src/rpm/*
- changed-files:
- any-glob-to-any-file: 'src/rpm/*'
run:
- src/run/*
- man/systemd-run*
- changed-files:
- any-glob-to-any-file: ['src/run/*', 'man/systemd-run*']
sd-boot/sd-stub/bootctl:
- src/boot/**/*
- man/bootctl*
- man/systemd-boot.xml
- changed-files:
- any-glob-to-any-file: ['src/boot/**/*', 'man/bootctl*', 'man/systemd-boot.xml']
sd-bus:
- '**/sd-bus*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-bus*/**'
sd-daemon:
- '**/sd-daemon*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-daemon*/**'
sd-device:
- '**/sd-device*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-device*/**'
sd-event:
- '**/sd-event*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-event*/**'
sd-hwdb:
- '**/sd-hwdb*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-hwdb*/**'
sd-id128:
- '**/sd-id128*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-id128*/**'
sd-netlink:
- '**/sd-netlink*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-netlink*/**'
sd-path:
- '**/sd-path*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-path*/**'
sd-resolve:
- '**/sd-resolve*/**'
- changed-files:
- any-glob-to-any-file: '**/sd-resolve*/**'
selinux:
- '**/*selinux*'
- changed-files:
- any-glob-to-any-file: '**/*selinux*'
sleep:
- '**/*sleep*'
- changed-files:
- any-glob-to-any-file: ['src/shared/*sleep*', 'src/sleep/*']
smack:
- '**/*smack*'
- changed-files:
- any-glob-to-any-file: '**/*smack*'
socket-proxy:
- '**/*socket-proxy*'
- changed-files:
- any-glob-to-any-file: '**/*socket-proxy*'
sysv-generator:
- '**/*sysv-generator*'
- changed-files:
- any-glob-to-any-file: '**/*sysv-generator*'
systemctl:
- '**/systemctl*'
- changed-files:
- any-glob-to-any-file: '**/systemctl*'
sysupdate:
- '**/*sysupdate*'
- changed-files:
- any-glob-to-any-file: '**/*sysupdate*'
sysvcompat:
- '**/*sysv*'
- changed-files:
- any-glob-to-any-file: '**/*sysv*'
sysctl:
- '**/*sysctl*'
- changed-files:
- any-glob-to-any-file: '**/*sysctl*'
timedate:
- '**/*timedate*'
- changed-files:
- any-glob-to-any-file: '**/*timedate*'
timesync:
- '**/*timesync*'
- changed-files:
- any-glob-to-any-file: '**/*timesync*'
tests:
- src/test/**/*
- src/fuzz/**/*
- test/**/*
- '**/test-*'
- .github/workflows/*
- changed-files:
- any-glob-to-any-file: [
'src/test/**/*',
'src/fuzz/**/*',
'test/**/*',
'**/test-*',
'.github/workflows/*'
]
tpm2:
- '**/*tpm2*'
- '**/*tpm-*'
- changed-files:
- any-glob-to-any-file: ['**/*tpm2*', '**/*tpm-*']
udev:
- src/udev/**/*
- src/libudev/*
- man/*udev*
- changed-files:
- any-glob-to-any-file: ['src/udev/**/*', 'src/libudev/*', 'man/*udev*']
uki:
- '**/ukify*'
- changed-files:
- any-glob-to-any-file: '**/ukify*'
units:
- units/**/*
- changed-files:
- any-glob-to-any-file: 'units/**/*'
userdb:
- '**/*userdb*'
- changed-files:
- any-glob-to-any-file: '**/*userdb*'
util-lib:
- src/fundamental/**/*
- src/basic/**/*
- src/shared/**/*
- changed-files:
- any-glob-to-any-file: ['src/fundamental/**/*', 'src/basic/**/*', 'src/shared/**/*']
vconsole:
- '**/*vconsole*'
- changed-files:
- any-glob-to-any-file: '**/*vconsole*'
xdg-autostart:
- '**/**xdg-autostart-generator*'
- changed-files:
- any-glob-to-any-file: '**/**xdg-autostart-generator*'
20 changes: 16 additions & 4 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ 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]

Expand All @@ -21,17 +29,21 @@ jobs:
pull-requests: write

steps:
- name: Repository checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
if: github.event_name == 'pull_request'

- name: Label PR based on policy in labeler.yml
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
if: startsWith(github.event_name, 'pull_request') && github.event.action != 'closed'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: "" # This is a workaround for issue 18671
sync-labels: false

- name: Set or remove labels based on systemd development workflow
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
if: github.event_name == 'pull_request_target' && github.event.action != 'closed' && !github.event.pull_request.draft
if: startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' && !github.event.pull_request.draft
with:
script: |
response = await github.rest.issues.listLabelsOnIssue({
Expand Down Expand Up @@ -88,7 +100,7 @@ jobs:
- name: Remove specific labels when PR is closed or merged
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
if: startsWith(github.event_name, 'pull_request') && github.event.action == 'closed'
with:
script: |
for (const label of ["please-review",
Expand Down

0 comments on commit c0d672f

Please sign in to comment.