Skip to content

gha: run checkpatch check only on PR events#41308

Merged
giorio94 merged 1 commit intomainfrom
pr/giorio94/main/checkpatch-pr-only
Aug 21, 2025
Merged

gha: run checkpatch check only on PR events#41308
giorio94 merged 1 commit intomainfrom
pr/giorio94/main/checkpatch-pr-only

Conversation

@giorio94
Copy link
Copy Markdown
Member

Previously, the checkpatch script used to internally skip the checks when not targeting the main branch. The blamed commit bumped it to a more zealous version that runs against all target branches, and explicitly fails in case any internal command fails.

However, this check is now failing both on push and merge queue events, as the GITHUB_REF does not point to a PR. Let's prevent this by making it run on PR events only, to restore the previous behavior in this case. There's not much point in running checkpatch on already merged commits anyways; similarly, no reason for running it as part of the merge queue, given that the check is not required, and the result does not depend on whether the branch is rebased.

Fixes: 4a33221 ("checkpatch: bump checkpatch version, and minor adaptations")

Previously, the checkpatch script used to internally skip the checks
when not targeting the main branch. The blamed commit bumped it to
a more zealous version that runs against all target branches, and
explicitly fails in case any internal command fails.

However, this check is now failing both on push and merge queue
events, as the GITHUB_REF does not point to a PR. Let's prevent
this by making it run on PR events only, to restore the previous
behavior in this case. There's not much point in running checkpatch
on already merged commits anyways; similarly, no reason for running
it as part of the merge queue, given that the check is not required,
and the result does not depend on whether the branch is rebased.

Fixes: 4a33221 ("checkpatch: bump checkpatch version, and minor adaptations")
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 requested review from a team as code owners August 21, 2025 07:31
@giorio94 giorio94 added release-note/ci This PR makes changes to the CI. needs-backport/1.16 needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Aug 21, 2025
@giorio94 giorio94 requested a review from Artyop August 21, 2025 07:31
@giorio94
Copy link
Copy Markdown
Member Author

/test

Copy link
Copy Markdown
Contributor

@Artyop Artyop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 21, 2025
@giorio94 giorio94 added this pull request to the merge queue Aug 21, 2025
Merged via the queue into main with commit 45f3085 Aug 21, 2025
76 checks passed
@giorio94 giorio94 deleted the pr/giorio94/main/checkpatch-pr-only branch August 21, 2025 12:40
@pippolo84 pippolo84 mentioned this pull request Aug 25, 2025
17 tasks
@pippolo84 pippolo84 added backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. and removed needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Aug 25, 2025
@pippolo84 pippolo84 mentioned this pull request Aug 25, 2025
7 tasks
@pippolo84 pippolo84 added backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. and removed needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Aug 25, 2025
@pippolo84 pippolo84 mentioned this pull request Aug 25, 2025
6 tasks
@github-actions github-actions bot added backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.16 backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. labels Sep 1, 2025
@github-actions github-actions bot added the backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. label Sep 2, 2025
@cilium-release-bot cilium-release-bot bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

4 participants