From 10539e56d890401c607f87482880b8875ff58c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 27 Oct 2026 19:44:38 +0100 Subject: [PATCH 1/4] gha/labeler: Add area/testing when ONLY test files change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The area/testing label was added whenever any changed file was under a test directory, so PRs that also touched daemon code got labeled. Use any-glob-to-all-files so the label is only applied when every changed file matches one of the test globs. The vendor exclusion is dropped since no test glob matches vendor/. Signed-off-by: Paweł Gronowski --- .github/labeler.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 780fd6d451..917e0bdb4b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -132,14 +132,12 @@ area/rootless: - all-globs-to-all-files: '!vendor/**' area/testing: - - all: - - changed-files: - - any-glob-to-any-file: - - 'integration/**' - - 'integration-cli/**' - - 'internal/test*' - - 'internal/testutil/**' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-all-files: + - 'integration/**' + - 'integration-cli/**' + - 'internal/test*' + - 'internal/testutil/**' area/docs: - all: From cd70c006fcdd0008023b035475bf3b2c5ea08efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 27 Oct 2026 19:47:13 +0100 Subject: [PATCH 2/4] gha/labeler: Stop labeling unrelated files as area/logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The '**/*log*' glob matched any file with "log" in its name, such as api/docs/CHANGELOG.md and client/login.go, so every API change got the area/logging label. Match '**/*_logs*' instead, which still covers the container, service, and task logs files in the client. Signed-off-by: Paweł Gronowski --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 917e0bdb4b..12298bb97b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -65,7 +65,7 @@ area/logging: - changed-files: - any-glob-to-any-file: - 'daemon/logger/**' - - '**/*log*' + - '**/*_logs*' - all-globs-to-all-files: '!vendor/**' area/security: From 7716be027955d7002212c2f2acbfa46077c0d1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 27 Oct 2026 19:47:18 +0100 Subject: [PATCH 3/4] gha/labeler: Only add area/docs when just docs change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The '**/*.md' glob matched any Markdown file, so code changes that also touched a README, api/docs/CHANGELOG.md, or files under .github/ got the area/docs label. Require every changed file to match one of the docs globs instead. Signed-off-by: Paweł Gronowski --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 12298bb97b..bdfd673a6b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -142,7 +142,7 @@ area/testing: area/docs: - all: - changed-files: - - any-glob-to-any-file: + - any-glob-to-all-files: - 'api/docs/*.yaml' - 'docs/**' - '**/*.md' From e195dbd6217b6a00f121616c6dfd8b9ef7c22e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 27 Oct 2026 19:48:00 +0100 Subject: [PATCH 4/4] gha/labeler: Keep area labels when a PR also changes vendor/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several labels paired their globs with an all-globs-to-all-files '!vendor/**' check, which requires that no changed file be under vendor/. A PR that changed AppArmor code and also bumped a dependency therefore lost the area/security label. Pair each repository-wide glob with '!vendor/**' in an all-globs-to-any-file rule instead, so the label applies when some non-vendor file matches. Globs rooted outside vendor/ no longer need the exclusion. Signed-off-by: Paweł Gronowski --- .github/labeler.yml | 62 +++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index bdfd673a6b..aad2f14f6c 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -61,51 +61,34 @@ area/images: - 'integration/image/**' area/logging: - - all: - - changed-files: - - any-glob-to-any-file: - - 'daemon/logger/**' - - '**/*_logs*' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-any-file: 'daemon/logger/**' + - all-globs-to-any-file: ['**/*_logs*', '!vendor/**'] area/security: - - all: - - changed-files: - - any-glob-to-any-file: - - '**/*apparmor*' - - '**/*seccomp*' - - '**/*selinux*' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - all-globs-to-any-file: ['**/*apparmor*', '!vendor/**'] + - all-globs-to-any-file: ['**/*seccomp*', '!vendor/**'] + - all-globs-to-any-file: ['**/*selinux*', '!vendor/**'] area/security/apparmor: - - all: - - changed-files: - - any-glob-to-any-file: - - '**/*apparmor*' - - 'contrib/apparmor/**' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-any-file: 'contrib/apparmor/**' + - all-globs-to-any-file: ['**/*apparmor*', '!vendor/**'] area/security/selinux: - - all: - - changed-files: - - any-glob-to-any-file: - - '**/*selinux*' - - 'contrib/selinux/**' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-any-file: 'contrib/selinux/**' + - all-globs-to-any-file: ['**/*selinux*', '!vendor/**'] area/security/seccomp: - - all: - - changed-files: - - any-glob-to-any-file: '**/*seccomp*' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - all-globs-to-any-file: ['**/*seccomp*', '!vendor/**'] area/systemd: - - all: - - changed-files: - - any-glob-to-any-file: - - '**/*systemd*' - - 'contrib/init/systemd/**' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-any-file: 'contrib/init/systemd/**' + - all-globs-to-any-file: ['**/*systemd*', '!vendor/**'] area/contrib: - changed-files: @@ -124,12 +107,9 @@ containerd-integration: - any-glob-to-any-file: 'daemon/containerd/**' area/rootless: - - all: - - changed-files: - - any-glob-to-any-file: - - '**/*rootless*' - - 'contrib/dockerd-rootless*' - - all-globs-to-all-files: '!vendor/**' + - changed-files: + - any-glob-to-any-file: 'contrib/dockerd-rootless*' + - all-globs-to-any-file: ['**/*rootless*', '!vendor/**'] area/testing: - changed-files: