Repository navigation
test: Cover stateless GitHub App installation tokens - #4687
Open
JamBalaya56562 wants to merge 1 commit into
Open
JamBalaya56562 wants to merge 1 commit into
JamBalaya56562 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4687 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 202 202
Lines 19004 19004
=======================================
Hits 18746 18746
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Oct 29, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #4577
Closes: #4598
This takes over #4577 by @sundaypaulfz3-cell and #4598 by @rajveer002, which add the same kind of tests and have had no activity since 2026-09-18 and 2026-10-03 (#4577 is blocked on the Google CLA, and #4598 on the lint fix that @gmlewis asked for). Thank you both for the original work! If either of you would like to finish your PR instead, I'm happy to close this one.
GitHub App installation tokens now use the stateless
ghs_APPID_JWTformat, which is about 520 characters long instead of 40 (changelog). go-github already treats tokens as opaque strings, so this PR only adds tests that guard against length or format assumptions:TestAppsService_CreateInstallationTokenStatelesschecks thatCreateInstallationTokenreturns such a token unchanged (from test: Cover stateless GitHub App token format #4598).TestClient_statelessInstallationTokenchecks thatWithAuthTokensends it unchanged asAuthorization: Bearer <token>(from test: Support stateless GitHub App installation tokens #4577).Changes from #4577 and #4598:
ghs_prefix, an app ID, and a JWT with two dots, 520 characters in total.%vinstead of%dfor thefmtpercentvlinter.