Skip to content

docs: Update readme to avoid label issue#168

Open
jfagoagas wants to merge 2 commits intosorenlouv:mainfrom
jfagoagas:update-readme
Open

docs: Update readme to avoid label issue#168
jfagoagas wants to merge 2 commits intosorenlouv:mainfrom
jfagoagas:update-readme

Conversation

@jfagoagas
Copy link

@jfagoagas jfagoagas commented Oct 2, 2024

Context

Fixes #127

Description

Update README.md to avoid the action to run if the PR contains the labels backport or was-backported. Also it uses the pull-request-label-checker action just to run if the PR contains the backport-to- label prefix.

The reason behind the change is due to the fact that the action needs to run when all of the following happens:

  1. The PR is merged. -> Done with the if at the job level.
  2. The PR does not contains the label backport -> Done with the if at the job level.
  3. The PR does not contains the label was-backported -> Done with the if at the job level.
  4. The PR contains the label backport-to (or the tag of your choice) -> Done with the preview_label_check step.

@Krzmbrzl
Copy link
Contributor

Krzmbrzl commented Oct 3, 2024

@jfagoagas I have gotten the version to work in which the label checking is performed in a different job:
https://github.com/mumble-voip/mumble/blob/master/.github/workflows/backport.yml

Imo that is a bit more elegant as it requires less ifs.

Also, I think doing label checks with that action is more readable than native GA code. So maybe we could simply insert a second step for the label checker that checks the non-allowed labels in non-prefix mode and then combine the result of these two into a single output that can then be used to conditionally enable the actual backport action (together with the merge condition)?

@jfagoagas
Copy link
Author

@jfagoagas I have gotten the version to work in which the label checking is performed in a different job: mumble-voip/mumble@master/.github/workflows/backport.yml

Imo that is a bit more elegant as it requires less ifs.

That's super clean 💯

Also, I think doing label checks with that action is more readable than native GA code. So maybe we could simply insert a second step for the label checker that checks the non-allowed labels in non-prefix mode and then combine the result of these two into a single output that can then be used to conditionally enable the actual backport action (together with the merge condition)?

That'd be ideal, you can jump into my forked repo branch to included it in this PR. Thanks 🙌

@joshovi
Copy link

joshovi commented Feb 19, 2025

Please have a look at
#127 (comment)

this solution does not require an additional github action that uses a docker container and is in my opinion better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action fails on PRs that are not backported

3 participants