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

add label back when conflicts are resolved if the label was removed #88

Open
efb4f5ff-1298-471a-8973-3d47447115dc opened this issue Sep 27, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link

When removeOnDirtyLabel removes the label it doesnt add the label back when the conflicts are resolved. It would be nice for the workkflow to do that also.

If the label wasn't present when the conflicts occurred the workflow doesn't have to apply a label.

@eps1lon
Copy link
Owner

eps1lon commented Oct 8, 2022

When removeOnDirtyLabel removes the label it doesnt add the label back when the conflicts are resolved.

You're saying it doesn't add removeOnDirtyLabel when conflicts are resolved? This sounds like a bug to me. Please include a PR and ideally GH workflow logs where this didn't happen

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Author

When removeOnDirtyLabel removes the label it doesnt add the label back when the conflicts are resolved.

You're saying it doesn't add removeOnDirtyLabel when conflicts are resolved?

That is correct

This sounds like a bug to me. Please include a PR and ideally GH workflow logs where this didn't happen

File locations:

The dummy workflow ensures that the workflow also works on pr opened on forks. If u dont include this workflow PRs from forks get a github API error.

@eps1lon
Copy link
Owner

eps1lon commented Oct 8, 2022

Ah now I remember. I think this was intended since the label that's removed could be something like "ready to merge". And rebase after review kind of invalidates that. But that depends on the semantics of the labels so an option to add the removeOnDirtyLabel back does make more sense 👍🏻

Thanks for adding the PRs. Made it clearer why you'd want that behavior.

Feel free to send a PR adding such an option.

@eps1lon eps1lon added enhancement New feature or request and removed resolution: needs more information labels Oct 8, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc

Unfortunately i have no experience with GH actions. So cant help u with that :(

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Author

Just a thought. For our usecase/workflow it make totally sense but maybe for others not.

Only add the label back when it was removed.

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc changed the title add label back when conflicts are resolved add label back when conflicts are resolved if the label was removed Nov 8, 2022
@ferdnyc
Copy link

ferdnyc commented Oct 18, 2023

Is it actually possible for the action to add back a label "only if it was removed"? Where would that state be kept?

I was initially thinking that, to get behavior that's flexible enough to handle everyone's use cases, there would need to be cleanLabel and removeOnCleanLabel options, in addition to the existing dirtyLabel and removeOnDirtyLabel.

But even that doesn't cover the case where the action should remove and restore externally-created labels, but only the ones it's previously placed/removed. That would require the action keeping a history of its own changes somewhere, which (correct me if I'm wrong) I don't think it currently does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants