Skip to content

feat: manage non-k8s members assigning issues#698

Open
TineoC wants to merge 3 commits intokubernetes-sigs:mainfrom
TineoC:educational-msg-assign
Open

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

Conversation

@TineoC
Copy link
Copy Markdown

@TineoC TineoC commented Apr 29, 2026

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.

This change adds a check to the assign plugin to identify when a
non-member of the organization tries to assign themselves to an issue
that is not labeled as 'good-first-issue'. In such cases, an educational
message is sent to redirect them to the contributor guide and the
appropriate beginner issues.

This addresses the influx of new contributors trying to assign
themselves to issues that may not be suitable for beginners or
don't have consensus yet.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit dad9507
🔍 Latest deploy log https://app.netlify.com/projects/k8s-prow/deploys/69f275a3ee2aa700088b638f
😎 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
Reorder membership and label checks to prioritize label-based bypass. If an issue is already labeled 'good-first-issue', skip the expensive IsMember check entirely. This protects the GitHub API quota from high-volume activity by new contributors.

Additionally, use existing repository metadata from the event payload instead of calling GetRepo, and defer file lookups until absolutely necessary.
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.

3 participants