feat: manage non-k8s members assigning issues#698
feat: manage non-k8s members assigning issues#698TineoC wants to merge 3 commits intokubernetes-sigs:mainfrom
Conversation
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.
✅ Deploy Preview for k8s-prow ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: TineoC The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @TineoC! |
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
| 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) |
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
@petr-muller probably has the most context currently ...
…t for new assignees
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.
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.