Skip to content

fix: use Bearer instead of token in authorization headers#7593

Merged
jdx merged 2 commits into
jdx:mainfrom
risu729:auth-header-bearer
Jan 7, 2026
Merged

fix: use Bearer instead of token in authorization headers#7593
jdx merged 2 commits into
jdx:mainfrom
risu729:auth-header-bearer

Conversation

@risu729

@risu729 risu729 commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Bearer is the standard prefix, and token is the legacy GitHub-specific prefix.
Both GitHub and Forgejo support the Bearer prefix.

Copilot AI review requested due to automatic review settings January 7, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates authorization headers across the codebase to use the standard OAuth 2.0 Bearer token format instead of GitHub's legacy token format. The changes ensure consistency with modern API authentication practices and improve code quality by using typed header constants.

  • Replaces Authorization: token {token} with Authorization: Bearer {token} for GitHub, Forgejo, and related APIs
  • Standardizes on using reqwest::header::AUTHORIZATION constant instead of string literals
  • Updates both Rust code and shell scripts to maintain consistency

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/http.rs Updated GitHub API authentication from token to Bearer format and replaced string literal with reqwest::header::AUTHORIZATION constant
src/github.rs Applied same authentication format changes for GitHub API calls
src/forgejo.rs Updated Forgejo API authentication from token to Bearer format
src/gitlab.rs Changed to use reqwest::header::AUTHORIZATION constant (already was using Bearer)
.github/actions/fetch-token/action.yml Updated curl command to use Bearer format for GitHub API validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdx jdx merged commit c452fc5 into jdx:main Jan 7, 2026
32 checks passed
@risu729 risu729 deleted the auth-header-bearer branch January 8, 2026 04:12
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.

3 participants