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

Using GITHUB_TOKEN for API #932

Merged
merged 1 commit into from
Jan 28, 2023
Merged

Conversation

tobiasge
Copy link
Member

@tobiasge tobiasge commented Jan 28, 2023

Related Issue: -

New Behavior

  • Use GITHUB_TOKEN for API access

Contrast to Current Behavior

  • Github API request would fail resulting in build errors

Discussion: Benefits and Drawbacks

Changes to the Wiki

Proposed Release Note Entry

  • Improved Github API access in build scripts

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

build-latest.sh Outdated
echo "🗝 Performing authenticated Github API calls."
GITHUB_OAUTH_PARAMS="client_id=${GITHUB_OAUTH_CLIENT_ID}&client_secret=${GITHUB_OAUTH_CLIENT_SECRET}"
CURL_AUTH_HEADER="--header 'authorization: Bearer ${GITHUB_TOKEN}'"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the 'A' of Authorization is usually capitalized in HTTP headers. But it probably doesn't matter and curl does it for you.

@tobiasge tobiasge marked this pull request as ready for review January 28, 2023 12:56
@tobiasge tobiasge requested a review from cimnine January 28, 2023 12:56
@tobiasge
Copy link
Member Author

I think we can ignore the lint error here and fix al those warnings in a separate PR.

@tobiasge tobiasge merged commit f549b93 into netbox-community:develop Jan 28, 2023
@tobiasge tobiasge deleted the gh-token branch January 28, 2023 14:32
@tobiasge tobiasge mentioned this pull request Mar 15, 2023
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.

None yet

2 participants