Skip to content

feat: add authorization header to link checker #33

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 1 commit into from
May 14, 2025

Conversation

esolitos
Copy link
Contributor

Adds an authorization header to the link checker command using a
GitHub App token. This allows the link checker to access private
repositories and pages that require authentication.

Adds an authorization header to the link checker command using a
GitHub App token. This allows the link checker to access private
repositories and pages that require authentication.
@esolitos esolitos requested a review from kkraune May 14, 2025 11:05
@esolitos esolitos self-assigned this May 14, 2025
@esolitos esolitos requested review from ean and Copilot May 14, 2025 11:06
Copy link

@Copilot Copilot AI left a comment

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 adds an authorization header to the jekyll link checker job so that it can access private repositories and pages using a GitHub App token.

  • Adds a new step using actions/create-github-app-token@v2 to generate a token.
  • Passes the token via an environment variable (REQ_TOKEN) into the link checker command.
  • Injects the token into the typhoeus configuration within the link checker invocation.
Comments suppressed due to low confidence (2)

.github/workflows/jekyll-link-checker.yml:155

  • [nitpick] Consider renaming REQ_TOKEN to a more descriptive name (e.g., LINK_CHECKER_TOKEN) to clarify its purpose for future maintainers.
REQ_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/jekyll-link-checker.yml:177

  • [nitpick] Consider verifying that embedding the token directly within the JSON string does not lead to shell parsing issues, especially if the token could contain unexpected characters. If so, consider a more robust token injection method.
--typhoeus '{"connecttimeout": 10, "timeout": 30, "accept_encoding": "zstd,br,gzip,deflate", "authorization": "Bearer ${{ env.REQ_TOKEN }}" }' \

@esolitos esolitos merged commit e111c2d into main May 14, 2025
4 checks passed
@esolitos esolitos deleted the marlon/add-authorization-to-link-checker branch May 14, 2025 14:09
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.

2 participants