Skip to content

Allow public GitHub issue reads without token#2774

Open
cybercraftsolutionsllc wants to merge 1 commit into
stakwork:masterfrom
cybercraftsolutionsllc:codex/github-public-issues-without-token
Open

Allow public GitHub issue reads without token#2774
cybercraftsolutionsllc wants to merge 1 commit into
stakwork:masterfrom
cybercraftsolutionsllc:codex/github-public-issues-without-token

Conversation

@cybercraftsolutionsllc
Copy link
Copy Markdown

Fixes #743.

Summary

  • Allow the GitHub API client to fall back to unauthenticated requests when GITHUB_TOKEN is not configured.
  • Keep bearer-token behavior unchanged when a token is configured.
  • Add focused tests for both empty-token public issue reads and configured-token Authorization behavior.

Why

Public GitHub issue reads should not require a configured token. The old client always wrapped requests in OAuth even when GITHUB_TOKEN was empty, which can cause GitHub to reject public issue lookups as bad credentials and surface as "make sure the repo is public" style failures.

Validation

  • go test handlers/github.go handlers/github_test.go
  • git diff --check

Note: go test ./handlers -run 'TestGithubClientWithToken|TestGetGithubIssue' is currently blocked by existing generated mock drift in unrelated handler tests: mocks.Database is missing GetBountyByUnlockCode.

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.

Unable to add github issue to bounty

2 participants