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

Remove a category label needs-* when the user is defining one #370

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danilo-gemoli
Copy link
Contributor

These are the available needs-* categories that can be applied to an issue (see here):

needs-kind, needs-priority, needs-sig, needs-triage

When an issue has one of those, as needs-triage, and the user is defining that category like so:

/triage unresolved

then the needs-triage will be removed.

@k8s-ci-robot k8s-ci-robot added the triage/unresolved Indicates an issue that can not or will not be resolved. label Feb 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: danilo-gemoli
Once this PR has been reviewed and has the lgtm label, please assign cjwagner for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 4, 2025
Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit aae1f05
🔍 Latest deploy log https://app.netlify.com/sites/k8s-prow/deploys/67a1fed8b763590008976142
😎 Deploy Preview https://deploy-preview-370--k8s-prow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@danilo-gemoli
Copy link
Contributor Author

/retest-required

// labels := []string{"triage/unresolved", "area/testing"}
// needsLabels := []string{"triage"}
// result := []string{"triage"}
func getCategoriesFromLabels(labels, needsLabels []string) sets.Set[string] {
Copy link
Contributor

@jmguzik jmguzik Feb 4, 2025

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor

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 😓

Copy link
Contributor

@jmguzik jmguzik Feb 4, 2025

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.

Copy link
Contributor

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.

@jmguzik
Copy link
Contributor

jmguzik commented Feb 4, 2025

Is it in any way related to #344?

@petr-muller
Copy link
Contributor

petr-muller commented Feb 4, 2025

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] {
Copy link
Contributor

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"}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit : weird indent

@danilo-gemoli
Copy link
Contributor Author

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.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2025
@petr-muller
Copy link
Contributor

/area plugins

@k8s-ci-robot k8s-ci-robot added the area/plugins Issues or PRs related to prow's plugins for the hook component label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins Issues or PRs related to prow's plugins for the hook component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants