-
Notifications
You must be signed in to change notification settings - Fork 14
Populate user agent header for Github Requests #481
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
Conversation
https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required > All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value. This allows us to contact you if there are problems. It seems this may be the culprit why we are seeing a 403. https://stackoverflow.com/questions/39907742/github-api-is-responding-with-a-403-when-using-requests-request-function See: https://ge.micronaut.io/s/l2lhrfn7gzlck Default Github Actions Env. variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
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.
Why not setting the user agent unconditionally?
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.
Will have to be merged to 6.2.x
and master
.
I thought about it. But it seems more correct to differentiate requests issued from CI. |
https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required > All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value. This allows us to contact you if there are problems. It seems this may be the culprit why we are seeing a 403. https://stackoverflow.com/questions/39907742/github-api-is-responding-with-a-403-when-using-requests-request-function See: https://ge.micronaut.io/s/l2lhrfn7gzlck Default Github Actions Env. variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required > All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value. This allows us to contact you if there are problems. It seems this may be the culprit why we are seeing a 403. https://stackoverflow.com/questions/39907742/github-api-is-responding-with-a-403-when-using-requests-request-function See: https://ge.micronaut.io/s/l2lhrfn7gzlck Default Github Actions Env. variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required > All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value. This allows us to contact you if there are problems. It seems this may be the culprit why we are seeing a 403. https://stackoverflow.com/questions/39907742/github-api-is-responding-with-a-403-when-using-requests-request-function See: https://ge.micronaut.io/s/l2lhrfn7gzlck Default Github Actions Env. variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required
It seems this may be the culprit why we are still seeing a 403.
https://stackoverflow.com/questions/39907742/github-api-is-responding-with-a-403-when-using-requests-request-function
Default Github Actions Env. variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables