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

Fix 'sync-labels' setting #113

Closed
wants to merge 3 commits into from
Closed

Fix 'sync-labels' setting #113

wants to merge 3 commits into from

Conversation

epuertat
Copy link

@epuertat epuertat requested a review from a team as a code owner June 21, 2021 23:01
@pje
Copy link
Member

pje commented Jun 21, 2021

Thanks for the patch, @epuertat! Labeler was behaving incorrectly and your changes corrected that behavior. I took the liberty of updating to the current state of main branch, and adding tests.

What this means is we're in the weird position where Doing The Right Thing means a breaking change, since labeler will now behave differently with the same inputs out there in the wild. A load-bearing bug.

IMO this necessitates a v4 release and a big callout in the changelog.

Before

Before this change: if you provide literally any value for sync-labels, labeler would Sync Labels. (In particular, if you had sync-labels: false, labeler would actually Sync Labels. Yikes.)

After

After this change: you must provide true to get Sync Labels behavior. Providing false will NOT Sync Labels. (And any other value will be treated like false.)

@epuertat
Copy link
Author

Thanks for taking care of the tests, @pje!

@tupui
Copy link

tupui commented Oct 15, 2021

@pje Any ETA on merging and deploying a new version? We are considering removing the action in SciPy because the sync mechanism is annoying us. I really like the idea of this action and would like to keep it 😃

@wknapik
Copy link

wknapik commented Dec 9, 2021

Hey. Can you please merge/release this?

@hashhar
Copy link

hashhar commented Feb 9, 2022

Anything we can do to help move this forward and get this merged?

@tupui
Copy link

tupui commented Feb 9, 2022

I am sad to say that due to this, we (SciPy) dropped this actions. Hope that this get solved at some point so we can reconsider.

@Jackenmen
Copy link

Jackenmen commented Feb 9, 2022

@tupui the workaround for this is fairly easy, you just need to set sync-labels to an empty string:

sync-labels: ""

Obviously, this should be fixed but no need to drop the action when there's workaround available :P

@tupui
Copy link

tupui commented Feb 9, 2022

@tupui the workaround for this is fairly easy, you just need to set sync-labels to an empty string:

sync-labels: ""

Obviously, this should be fixed but no need to drop the action when there's workaround available :P

Oh thanks! We sadly dropped it a few months ago already because there was no action there... I just got notified about this with the recent message and thought I would comment again to say we had to take action–as I feared we might need to.

A "hack" might not make our maintainer team confident I am afraid. I will keep an eye on this.

@jjerphan
Copy link

Hi @pje,

This is a small gentle up: is there anything to be done for this fix to be merged?

Major libraries' CI (like SciPy's and scikit-learn's) would largely benefit from this fix. 🙏

jjerphan added a commit to jjerphan/labeler that referenced this pull request Nov 15, 2022
jjerphan added a commit to jjerphan/scipy that referenced this pull request Nov 15, 2022
Comment on lines +18 to +19
const syncLabels =
core.getInput("sync-labels", { required: false }) === "true";
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use the getBooleanInput core function to parse a boolean input:

Suggested change
const syncLabels =
core.getInput("sync-labels", { required: false }) === "true";
const syncLabels = core.getBooleanInput('sync-labels');

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem with using getBooleanInput is that it will reject an empty string argument, which will break everyone currently using the workaround of setting sync-labels: ''. That's why in #480 (which yes, is a duplicate) I did something more complex to get around that. While that's still technically a breaking change, it's unlikely to break anyone who wasn't already broken.

@MaksimZhukov
Copy link
Contributor

Hello @epuertat!
Thank you for the contribution and sorry for the late review!
I left a comment, please take a look. Also, please rebuild dist folder and resolve conflicts.

@jjerphan
Copy link

@epuertat: Thank you for this contribution, I am looking forward to it being integrated. Are you still working on it? If not, can I supersede it, @MaksimZhukov? 🙂

@epuertat
Copy link
Author

@jjerphan @MaksimZhukov @adam-azarchs: please feel free to take over and move forward with this.

@MaksimZhukov
Copy link
Contributor

Hello @epuertat ! Thank you for the response!
I am closing the PR in favor of this one. @jjerphan please find the details in that PR.

@epuertat epuertat deleted the patch-2 branch January 30, 2023 12:13
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.

Labeler is syncing labels when sync-labels property is false
9 participants