-
Notifications
You must be signed in to change notification settings - Fork 106
[Github Action] Label community issues #1746
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
[Github Action] Label community issues #1746
Conversation
|
||
try { | ||
// Check if the user is a member of the elastic organization | ||
await github.rest.orgs.getMembershipForUser({ |
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.
unfortunately, I'm afraid this won't work with the standard github token.
You need a PAT that is able to read org membership
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.
Argh yes I didn't consider most of our users have private membership.
Can we use a PAT that we store somewhere safe and invoke it here?
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.
Yes. Adding it to the GitHub repository secrets should be sufficient for now.
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.
Nice, is this something you can help with? I don't have any permissions to do such things I believe
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.
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.
The token can only read the membership. Hence you might need to split the script into two steps. One for reading and one for adding the label
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.
Ok thank you :) will look into it later!
@reakaleek Thanks for your help, I updated the script, let me know if you think this could work. Thanks! |
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.
LGTM 🚀
Nice let's see how it works |
Generated with Copilot
This is an attempt to identify community (from non-elasticians) issues more accurately rather than rely only on
source:web
label or on the triager checking the issue author's profile every time.