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

Add author type to all author context instances #596

Open
brianespinosa opened this issue Oct 4, 2024 · 0 comments
Open

Add author type to all author context instances #596

brianespinosa opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@brianespinosa
Copy link

Is your feature request related to a problem? Please describe.
I was attempting to write an automation that would elevate our requested reviewers any time there were changes to a package.json file... however, we do not want to elevate the request whenever there is a bot user making these kinds of changes. Today, we do not expose the user type attribute (which is part of the GitHub user return object) on the pr context instance, so there is no way to opt out bot users from our automation unless we keep a collection of bot names, always keep it up to date across a large enterprise managed unit with LOTS of orgs, and we have to hope that nobody ever decides to rename a bot. If we were going to write a plugin, this still is a difficult task to tell if the user is a bot even if we were going to use the GitHub API because we do not have the user ID or their email, which we would need in order to use the GitHub API to find out their user type.

Describe the solution you'd like
It would be great if we could return pr.author_type which would be "User" | "Organization" | "Bot"

Describe alternatives you've considered
I considered making a plugin to do this instead, but there was no user ID or email provided on the pr context in order to use GitHub APIs to get more information about the user. There is an email associated with the branch author, but there is no guarantee that the branch author will be the same as the PR author.

@brianespinosa brianespinosa added the enhancement New feature or request label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant