Skip to content

feat: manage non-k8s members assigning issues#698

Open
TineoC wants to merge 2 commits into
kubernetes-sigs:mainfrom
TineoC:educational-msg-assign
Open

feat: manage non-k8s members assigning issues#698
TineoC wants to merge 2 commits into
kubernetes-sigs:mainfrom
TineoC:educational-msg-assign

Conversation

@TineoC

@TineoC TineoC commented Apr 29, 2026

Copy link
Copy Markdown

Refined the assign logic to restrict self-assignment for non-organization members.

Non-members can now only self-assign issues labeled good-first-issue.

If a non-member attempts to assign a standard issue, the plugin will trigger an educational response, redirecting them with issues with good-first-issue.

@netlify

netlify Bot commented Apr 29, 2026

Copy link
Copy Markdown

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit 773c479
🔍 Latest deploy log https://app.netlify.com/projects/k8s-prow/deploys/6a0438af0011fc0008f218da
😎 Deploy Preview https://deploy-preview-698--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 project configuration.

@k8s-ci-robot k8s-ci-robot added the area/plugins Issues or PRs related to prow's plugins for the hook component label Apr 29, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: TineoC
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.

Details 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

Copy link
Copy Markdown
Contributor

Welcome @TineoC!

It looks like this is your first PR to kubernetes-sigs/prow 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/prow has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 29, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @TineoC. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 29, 2026
@TineoC TineoC changed the title Add educational message for new contributors assigning issues feat: manage non-k8s members assigning issues Apr 29, 2026
Comment thread pkg/plugins/assign/assign.go Outdated
if len(toAdd) > 0 {
h.log.Printf("Adding %s to %s/%s#%d: %v", h.userType, org, repo, e.Number, toAdd)
if h.userType == "assignee(s)" {
isMember, err := h.gc.IsMember(org, e.User.Login)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we know if this call is typically cached? We're sensitive to API usage, especially because prow is still running on PAT rather than a github app (quota scales with org size) IIRC ...

Something we should really fix at some point ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@petr-muller probably has the most context currently ...

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 29, 2026

@Amulyam24 Amulyam24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TineoC, this is an interesting enhancement!

A question on the error scenarios- if GetIssueLabels or IsMember fails, we are currently logging it as a warning. In such cases, it would leave the user with no understanding on what went wrong when they issue the command, how about we add a user friendly message to retry?

Comment thread pkg/plugins/assign/assign.go Outdated
if err != nil {
h.log.WithError(err).Warn("Failed to get issue labels")
}
hasGoodFirstIssue := false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
hasGoodFirstIssue := false
isGoodFirstIssue := false

Could be as above for better readability, wdyt?

Comment thread pkg/plugins/assign/assign.go Outdated
return nil
}
err := handle(newAssignHandler(e, pc.GitHubClient, pc.Logger))
err := handle(newAssignHandler(e, pc.GitHubClient, pc.Logger, pc.PluginConfig))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason for passing the entire instance of PluginConfig here?

Comment thread pkg/plugins/assign/assign.go Outdated
guideLink = fmt.Sprintf(" and our [contributor guide](%s)", h.config.Help.HelpGuidelinesURL)
}

msg := fmt.Sprintf("It looks like you're new! This issue hasn't been vetted for beginners yet. Please check out the [Good First Issues List](https://github.com/%s/%s/labels/good-first-issue)%s to get started.", org, repo, guideLink)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
msg := fmt.Sprintf("It looks like you're new! This issue hasn't been vetted for beginners yet. Please check out the [Good First Issues List](https://github.com/%s/%s/labels/good-first-issue)%s to get started.", org, repo, guideLink)
msg := fmt.Sprintf("Thank you for your interest in contributing! It looks like you're new, this issue hasn't been vetted for beginners yet. Please check out the [Good First Issues List](https://github.com/%s/%s/labels/good-first-issue)%s to get started.", org, repo, guideLink)

How about this? Feel free to enhance it accordingly for a more welcoming message :)

@linux-foundation-easycla

linux-foundation-easycla Bot commented May 13, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 13, 2026
@TineoC TineoC force-pushed the educational-msg-assign branch from 39b863b to 33c9216 Compare May 13, 2026 08:22
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 13, 2026
Block non-member self-assignment on issues that are not marked good-first-issue, provide clearer retry and guidance comments, and refactor the assign flow into smaller helpers to keep the happy path flat.
@TineoC TineoC force-pushed the educational-msg-assign branch from 33c9216 to cb384e0 Compare May 13, 2026 08:35
Rename the self-assignment enforcement helper to better reflect that it applies the evaluated policy rather than conditionally doing work.
@Amulyam24

Copy link
Copy Markdown
Contributor

Hi @TineoC, revisiting the change regarding the hard restriction being imposed for non-members assigning non-good first issues, I'm not quite sure if this should be the intended behaviour.

For example, there may be issues with the help-wanted label that a non-member would like to pick up and contribute to. Similarly, there could be low hanging issues, such as small bugs or minor feature enhancements, that may not necessarily be categorised as a good first issue but could still be approachable and interesting for new contributors.

Do you mind sharing a bit more context on the reason behind this enhancement?

@TineoC

TineoC commented May 19, 2026

Copy link
Copy Markdown
Author

Hi @TineoC, revisiting the change regarding the hard restriction being imposed for non-members assigning non-good first issues, I'm not quite sure if this should be the intended behaviour.

For example, there may be issues with the help-wanted label that a non-member would like to pick up and contribute to. Similarly, there could be low hanging issues, such as small bugs or minor feature enhancements, that may not necessarily be categorised as a good first issue but could still be approachable and interesting for new contributors.

Do you mind sharing a bit more context on the reason behind this enhancement?

For context,

It comes from this conversation with @BenTheElder

https://kubernetes.slack.com/archives/C1TU9EB9S/p1776111633198999?thread_ts=1776111633.198999&cid=C1TU9EB9S

@Amulyam24

Copy link
Copy Markdown
Contributor

Hi @TineoC, revisiting the change regarding the hard restriction being imposed for non-members assigning non-good first issues, I'm not quite sure if this should be the intended behaviour.
For example, there may be issues with the help-wanted label that a non-member would like to pick up and contribute to. Similarly, there could be low hanging issues, such as small bugs or minor feature enhancements, that may not necessarily be categorised as a good first issue but could still be approachable and interesting for new contributors.
Do you mind sharing a bit more context on the reason behind this enhancement?

For context,

It comes from this conversation with @BenTheElder

Thank you @TineoC!

Hi @BenTheElder @petr-muller, curious to know your thoughts on the above, PTAL!

@TineoC

TineoC commented May 26, 2026

Copy link
Copy Markdown
Author

Hi @TineoC, revisiting the change regarding the hard restriction being imposed for non-members assigning non-good first issues, I'm not quite sure if this should be the intended behaviour.

For example, there may be issues with the help-wanted label that a non-member would like to pick up and contribute to. Similarly, there could be low hanging issues, such as small bugs or minor feature enhancements, that may not necessarily be categorised as a good first issue but could still be approachable and interesting for new contributors.

Do you mind sharing a bit more context on the reason behind this enhancement?

I think this is a good example of the situation. kubernetes/kubernetes#131724 (comment)

Over +10 non-members self-assigned the issue in a short period of time and seems to be they found an exception where you're able to self-assign the issue if you've commented in that issue.

cc. @lmktfy @BenTheElder

@Amulyam24

Copy link
Copy Markdown
Contributor

Hi @TineoC, revisiting the change regarding the hard restriction being imposed for non-members assigning non-good first issues, I'm not quite sure if this should be the intended behaviour.
For example, there may be issues with the help-wanted label that a non-member would like to pick up and contribute to. Similarly, there could be low hanging issues, such as small bugs or minor feature enhancements, that may not necessarily be categorised as a good first issue but could still be approachable and interesting for new contributors.
Do you mind sharing a bit more context on the reason behind this enhancement?

I think this is a good example of the situation. kubernetes/kubernetes#131724 (comment)

Over +10 non-members self-assigned the issue in a short period of time and seems to be they found an where you're able to self-assign the issue if you've commented in that issue.

cc. @lmktfy @BenTheElder

I agree that it is a valid concern. Not sure how feasible this would be - considering /assign plugin is commonly enabled at org level but IMHO, maybe we can think about allowing this as a feature gate to specific repos or organisations as it would be helpful for a massive project like k/k but enabling the restriction on smaller or growing projects might not be welcoming, wdyt?

@lmktfy

lmktfy commented May 26, 2026

Copy link
Copy Markdown

Here's the algorithm I think will help.

• if there is already an assignee, non-members can't reassign the issues
• if you're not a member and try to assign an issue that hasn't been accepted, Prow sends you a message suggesting you work on an accepted issue instead. However it also says that Kubernetes is open source and that you are not forbidden from doing work on the issue anyway.
• if you try to assign an issue and lots of people have already tried assigning it (eg yours is the third attempt), then whether or not you are a member, Prow points out that it looks comtentious

@lmktfy

lmktfy commented May 26, 2026

Copy link
Copy Markdown

For k/website I would like Prow to be able to point out SIG Docs' no cookie licking policy. But that's a separate thing.

@Amulyam24

Copy link
Copy Markdown
Contributor

Here's the algorithm I think will help.

• if there is already an assignee, non-members can't reassign the issues • if you're not a member and try to assign an issue that hasn't been accepted, Prow sends you a message suggesting you work on an accepted issue instead. However it also says that Kubernetes is open source and that you are not forbidden from doing work on the issue anyway. • if you try to assign an issue and lots of people have already tried assigning it (eg yours is the third attempt), then whether or not you are a member, Prow points out that it looks comtentious

+1, sounds reasonable to me!

@soltysh

soltysh commented May 26, 2026

Copy link
Copy Markdown

If a non-member attempts to assign a standard issue, the plugin will trigger an educational response, redirecting them with issues with good-first-issue.

How this restriction will work if an org member tries to assign a non-org member to any issue? From my past experience there are cases where I would want to be able to do that, and it shouldn't conflict with the problem you're trying to solve here.

@Amulyam24

Copy link
Copy Markdown
Contributor

If a non-member attempts to assign a standard issue, the plugin will trigger an educational response, redirecting them with issues with good-first-issue.

How this restriction will work if an org member tries to assign a non-org member to any issue? From my past experience there are cases where I would want to be able to do that, and it shouldn't conflict with the problem you're trying to solve here.

AFAIK, currently it does not assign the issue by returning with the following comment.

@Amulyam24: GitHub didn't allow me to assign the following users: .

Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants