Skip to content

Use all recommended headers in GitHub API HTTP requests #82

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

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Use all recommended headers in GitHub API HTTP requests #82

merged 3 commits into from
Jan 24, 2024

Conversation

Providing this header is recommended by the GitHub REST API documentation.
The previous "token" format works fine, but the "Bearer" format is the one used in the snippets in the GitHub REST API
documentation so this format makes the code easier to understand.
Previously, the requests would use whatever version of the API is current, exposing the action to immediate breakage if
GitHub released a new version of the REST API with relevant changes.

GitHub provides the previous API for a minimum of 24 months after a new version is released, so pinning the REST API
version used by the action via the `X-GitHub-Api-Version` HTTP header improves the stability of the action and allows
the project maintainer to make a controlled migration to the new API version.
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jan 24, 2024
@per1234 per1234 self-assigned this Jan 24, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8a0046b) 100.00% compared to head (01f5811) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #82   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          745       745           
=========================================
  Hits           745       745           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@per1234 per1234 merged commit 57289ee into arduino:main Jan 24, 2024
@per1234 per1234 deleted the recommended-request-headers branch January 24, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants