-
Notifications
You must be signed in to change notification settings - Fork 115
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
Remove a category label needs-*
when the user is defining one
#370
base: main
Are you sure you want to change the base?
Remove a category label needs-*
when the user is defining one
#370
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: danilo-gemoli The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for k8s-prow ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/retest-required |
// labels := []string{"triage/unresolved", "area/testing"} | ||
// needsLabels := []string{"triage"} | ||
// result := []string{"triage"} | ||
func getCategoriesFromLabels(labels, needsLabels []string) sets.Set[string] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func getCategoriesFromLabels(labels, needsLabels []string) sets.Set[string] { | |
func getCategoriesFromLabels(labels, needsLabels []string) sets.Set[string] { | |
needsLabelsSet := sets.New(needsLabels...) | |
categories := sets.New[string]() | |
for _, label := range labels { | |
if prefix, _, found := strings.Cut(label, "/"); found && needsLabelsSet.Has(prefix) { | |
categories.Insert(prefix) | |
} | |
} | |
return categories | |
} |
Just for you to consider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weak -1 from me, I'm a fan of private-unless-proven-to-be-necessary-public 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its my bad. I meant internals of the function, my intention was not to propose to make it public. Let me correct that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected, again comment is about internals not about publicity, sorry for the confusion.
Is it in any way related to #344? |
Yeah I'm also curious about the relation to #344 b/c I thought we discovered that was a config issue |
// labels := []string{"triage/unresolved", "area/testing"} | ||
// needsLabels := []string{"triage"} | ||
// result := []string{"triage"} | ||
func getCategoriesFromLabels(labels, needsLabels []string) sets.Set[string] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weak -1 from me, I'm a fan of private-unless-proven-to-be-necessary-public 😓
// Example: | ||
// | ||
// labels := []string{"triage/unresolved", "area/testing"} | ||
// needsLabels := []string{"triage"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : weird indent
Yes, this PR is supposed to handle #344. Thanks both for the reviews but I'll put this on hold and eventually close it if kubernetes/test-infra#34255 turns out to be enough. |
/area plugins |
These are the available
needs-*
categories that can be applied to an issue (see here):When an issue has one of those, as
needs-triage
, and the user is defining that category like so:then the
needs-triage
will be removed.