René's URL Explorer Experiment


Title: feat: Add repository-scoped token support to GithubAppClient by PhoebeMay · Pull Request #258 · spotify/github-java-client · GitHub

Open Graph Title: feat: Add repository-scoped token support to GithubAppClient by PhoebeMay · Pull Request #258 · spotify/github-java-client

X Title: feat: Add repository-scoped token support to GithubAppClient by PhoebeMay · Pull Request #258 · spotify/github-java-client

Description: Summary Adds support for creating repository-scoped installation access tokens via the GitHub Apps API. This allows tokens to be restricted to specific repositories instead of granting access to all repositories in an installation. This is an implementation of https://docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app API Usage // Create a scoped token for specific repositories AccessTokenRequest request = ImmutableAccessTokenRequest.builder() .repositoryIds(List.of(313604, 314195)) .build(); AccessToken token = appClient.getAccessToken(installationId, request).join(); // Or scope by repository name AccessTokenRequest request = ImmutableAccessTokenRequest.builder() .repositories(List.of("my-repo")) .build(); Testing Unit Tests All existing tests pass, plus 3 new test cases: ✅ getAccessTokenWithoutScoping - Verifies backward compatibility (empty body) ✅ getAccessTokenWithRepositoryScoping - Verifies scoped token creation with both repositories and repository_ids ✅ getAccessTokenWithEmptyRequest - Verifies empty request serializes to {} Manual Testing Verified end-to-end with GitHub Enterprise Server: Test 1: Unscoped Token (`Old Behavior) Created token using existing getAccessToken(installationId) method GithubAppClient appClient = client.createGithubAppClient(); AccessToken unscopedToken = appClient.getAccessToken(installationId).join(); Verification via GitHub API: curl -H 'Authorization: Bearer ' \ https://ghe.spotify.net/api/v3/installation/repositories Result: { "total_count": 9, "repository_count": 9, "repository_names": [ "genai-migration/honk", "genai-migration/migration-prompts", "genai-migration/update-metadata-shift", "genai-migration/ai-migrations", "genai-migration/trigger-agent", "genai-migration/goosebump", "genai-migration/honk-log-classifier", "genai-migration/demo-library", "genai-migration/honk-system" ] } ✅ Token granted access to all 9 repositories in the installation Test 2: Repository-Scoped Token (New Functionality) Created token using new getAccessToken(installationId, AccessTokenRequest) method: AccessTokenRequest request = ImmutableAccessTokenRequest.builder() .repositoryIds(List.of(313604)) .build(); Verification via GitHub API: curl -H 'Authorization: Bearer ' \ https://ghe.spotify.net/api/v3/installation/repositories Result: { "total_count": 1, "repository_count": 1, "repository_names": [ "genai-migration/honk" ], "repository_ids": [ 313604 ] } ✅ Token granted access to only 1 repository (the scoped repository)

Open Graph Description: Summary Adds support for creating repository-scoped installation access tokens via the GitHub Apps API. This allows tokens to be restricted to specific repositories instead of granting access to al...

X Description: Summary Adds support for creating repository-scoped installation access tokens via the GitHub Apps API. This allows tokens to be restricted to specific repositories instead of granting access to al...

Opengraph URL: https://github.com/spotify/github-java-client/pull/258

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:105a80d2-1410-957d-9648-3113800be4f3
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idE396:10F66D:1F2FA4B:28C5F38:6976E001
html-safe-nonce08ea3f6108f987a3eb6d4bbe981cff5ae312b746e254438ec65318e43009ab8f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzk2OjEwRjY2RDoxRjJGQTRCOjI4QzVGMzg6Njk3NkUwMDEiLCJ2aXNpdG9yX2lkIjoiNjMzMjYwNDg2Nzk1NjYyOTUwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3afa322452db1699cac3677ce54f7bf8b5459b4d8db0c1ffb28d12062aa5bf83
hovercard-subject-tagpull_request:3068591226
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/spotify/github-java-client/pull/258/checks
twitter:imagehttps://avatars.githubusercontent.com/u/13728765?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/13728765?s=400&v=4
og:image:altSummary Adds support for creating repository-scoped installation access tokens via the GitHub Apps API. This allows tokens to be restricted to specific repositories instead of granting access to al...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09
turbo-cache-controlno-preview
go-importgithub.com/spotify/github-java-client git https://github.com/spotify/github-java-client.git
octolytics-dimension-user_id251374
octolytics-dimension-user_loginspotify
octolytics-dimension-repository_id254401089
octolytics-dimension-repository_nwospotify/github-java-client
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id254401089
octolytics-dimension-repository_network_root_nwospotify/github-java-client
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef752335dbbea672610081196a1998e39aec5e14b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fspotify%2Fgithub-java-client%2Fpull%2F258%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fspotify%2Fgithub-java-client%2Fpull%2F258%2Fchecks
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=spotify%2Fgithub-java-client
Reloadhttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
Reloadhttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
Reloadhttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
spotify https://patch-diff.githubusercontent.com/spotify
github-java-clienthttps://patch-diff.githubusercontent.com/spotify/github-java-client
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fspotify%2Fgithub-java-client
Fork 97 https://patch-diff.githubusercontent.com/login?return_to=%2Fspotify%2Fgithub-java-client
Star 148 https://patch-diff.githubusercontent.com/login?return_to=%2Fspotify%2Fgithub-java-client
Code https://patch-diff.githubusercontent.com/spotify/github-java-client
Issues 11 https://patch-diff.githubusercontent.com/spotify/github-java-client/issues
Pull requests 7 https://patch-diff.githubusercontent.com/spotify/github-java-client/pulls
Actions https://patch-diff.githubusercontent.com/spotify/github-java-client/actions
Security 0 https://patch-diff.githubusercontent.com/spotify/github-java-client/security
Insights https://patch-diff.githubusercontent.com/spotify/github-java-client/pulse
Code https://patch-diff.githubusercontent.com/spotify/github-java-client
Issues https://patch-diff.githubusercontent.com/spotify/github-java-client/issues
Pull requests https://patch-diff.githubusercontent.com/spotify/github-java-client/pulls
Actions https://patch-diff.githubusercontent.com/spotify/github-java-client/actions
Security https://patch-diff.githubusercontent.com/spotify/github-java-client/security
Insights https://patch-diff.githubusercontent.com/spotify/github-java-client/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fspotify%2Fgithub-java-client%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fspotify%2Fgithub-java-client%2Fissues%2Fnew%2Fchoose
dennisgranathhttps://patch-diff.githubusercontent.com/dennisgranath
masterhttps://patch-diff.githubusercontent.com/spotify/github-java-client/tree/master
repo-scoped-tokenhttps://patch-diff.githubusercontent.com/spotify/github-java-client/tree/repo-scoped-token
Conversation 3 https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258
Commits 1 https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/commits
Checks 5 https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
Files changed https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/files
Please reload this pagehttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
Please reload this pagehttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
feat: Add repository-scoped token support to GithubAppClient https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks#top
Please reload this pagehttps://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks
codecov/patch https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks?check_run_id=57061157884
codecov/project https://patch-diff.githubusercontent.com/spotify/github-java-client/pull/258/checks?check_run_id=57061156545
maven-build on: pull_request https://patch-diff.githubusercontent.com/spotify/github-java-client/actions/runs/19905585897
build (ubuntu-latest, 11) https://patch-diff.githubusercontent.com/spotify/github-java-client/actions/runs/19905585897/job/57060841381?pr=258
build (ubuntu-latest, 17) https://patch-diff.githubusercontent.com/spotify/github-java-client/actions/runs/19905585897/job/57060841399?pr=258
build (ubuntu-latest, 21) https://patch-diff.githubusercontent.com/spotify/github-java-client/actions/runs/19905585897/job/57060841397?pr=258
View this Pull Request on Codecovhttps://app.codecov.io/gh/spotify/github-java-client/pull/258?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
6edf7d5https://github.com/spotify/github-java-client/commit/6edf7d51ef5880b92372d0f27ca7b54517b4f54a
Codecovhttps://app.codecov.io/gh/spotify/github-java-client/pull/258?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
6edf7d5https://app.codecov.io/gh/spotify/github-java-client/commit/6edf7d51ef5880b92372d0f27ca7b54517b4f54a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
0c37e52https://app.codecov.io/gh/spotify/github-java-client/commit/0c37e526652a48b0a18400ed79865d26579761f6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
☔ View full report in Codecov by Sentryhttps://app.codecov.io/gh/spotify/github-java-client/pull/258?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
Share it herehttps://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=spotify
Test Analyticshttps://docs.codecov.com/docs/test-analytics
View more details on Codecov https://app.codecov.io/gh/spotify/github-java-client/pull/258
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.