Skip to content

workflows/backport: only trigger on backport labels#404132

Merged
Mic92 merged 1 commit intoNixOS:masterfrom
wolfgangwalther:ci-backport-if
May 4, 2025
Merged

workflows/backport: only trigger on backport labels#404132
Mic92 merged 1 commit intoNixOS:masterfrom
wolfgangwalther:ci-backport-if

Conversation

@wolfgangwalther
Copy link
Contributor

The backport job was previously triggered on any label activity, i.e. when the backport label was already set and a new label added, the backport would have been triggered again. (Example: #402332, where I tested that)

That's because github.event_name is actually "pull_request_target" in this case, not "closed" or "labeled" (the event's types). Thus, this part of the condition was always true.

This also means that the second part, the startsWith, was never evaluated. It had its arguments flipped and would have always been false.

This was introduced in #126825, but has never really worked as intended. @zowoq already mentioned this in #126825 (comment)

Resolves #199556

Relevant docs:

Things done


Add a 👍 reaction to pull requests you find important.

The backport job was previously triggered on any label activity, i.e.
when the backport label was already set and a new label added, the
backport would have been triggered again.

That's because github.event_name is actually "pull_request_target" in
this case, not "closed" or "labeled" (the event's types). Thus, this
part of the condition was always true.

This also means that the second part, the startsWith, was never
evaluated. It had its arguments flipped and would have always been
false.

This was introduced in NixOS#126825, but has never really worked as intended.

Resolves NixOS#199556
@github-actions github-actions bot added 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs labels May 4, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 4, 2025
@Mic92 Mic92 merged commit 83cb112 into NixOS:master May 4, 2025
26 of 27 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-backport-if branch May 4, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport action triggered when 8.has: port to stable tag is added

3 participants