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

[Feature Request] Add GitHub App user name and email in outputs. #114

Closed
huxuan opened this issue Mar 14, 2024 · 4 comments
Closed

[Feature Request] Add GitHub App user name and email in outputs. #114

huxuan opened this issue Mar 14, 2024 · 4 comments

Comments

@huxuan
Copy link

huxuan commented Mar 14, 2024

According to the discussion here: https://github.com/orgs/community/discussions/24664, sometimes, we want to know the GitHub App's user name and user id (for the corresponding email address), it would be great if we can have those in the outputs.

@gr2m
Copy link
Contributor

gr2m commented Mar 14, 2024

Hi Xuan, we already export app-slug, see outputs.

In order to get the user ID of an app, an additional request needs to be sent. As that is not a common enough use case, I suggest we update the README to show how to do it.

Say outputs.app-slug is my-app, then the user name is my-app[bot]. With that you can retrieve the user ID at GET /users/{login}.

@gr2m
Copy link
Contributor

gr2m commented Mar 14, 2024

Actually it might suffice to just do my-app[bot]@users.noreply.github.com as the git email, without the need of adding the user ID of the app, can you give that a try?

@huxuan
Copy link
Author

huxuan commented Mar 15, 2024

Great, I will try it soon. Thanks for the information.

@huxuan
Copy link
Author

huxuan commented Mar 15, 2024

It works like a charm! Thanks again and close the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants