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 an auth token to gh api requests #272

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

peterj
Copy link

@peterj peterj commented Feb 14, 2023

This PR adds the Authorization header to the github API requests to minimize the chances of getting rate limited by GH.

Note that for this to work, someone needs to do the following:

  • Create the github PAT
  • Add the GITHUB_TOKEN environment variable to netlify

Resolves #271

@netlify
Copy link

netlify bot commented Feb 14, 2023

Deploy Preview for spiffe failed.

Name Link
🔨 Latest commit 4875ecf
🔍 Latest deploy log https://app.netlify.com/sites/spiffe/deploys/6400ed1b53fe1f00083448e3

@peterj
Copy link
Author

peterj commented Feb 16, 2023

Adding the note here from Slack.

For the token, we'd need someone with admin permissions on the repo to create a fine-grained personal access token for the spiffe.io repo. The permission needed is under Repository permissions -> Contents

Screenshot 2023-02-16 at 10 34 45 AM

@mchurichi
Copy link
Member

Hi @peterj, thanks for opening this PR!. For some reason I don't see the changes anymore, they seem to have been overwritten by the most recent force push.

Sorry for the delay on getting this merged, it looks good to me. We are just trying to get someone with admin access to review this, give a thumbs up and set the token. Would you mind republishing the changes?

@peterj
Copy link
Author

peterj commented Feb 24, 2023 via email

@peterj peterj reopened this Feb 24, 2023
Copy link
Member

@mchurichi mchurichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and I have confirmed that I'm able to set up the token in Netlify's admin interface. A fine-grained personal GitHub token with basic read-only permissions over public repositories works, no more permissions are needed, so this should be harmless. I'll generate a personal token and configure it as soon as we can get this merged in.

Can someone else take a quick look at this please? cc @evan2645 @Andres-GC

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

Successfully merging this pull request may close these issues.

Send authenticated requests to Github API
2 participants