Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update readme to avoid label issue #168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 🙌

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
2 participants