Skip to content

GitHubAppCredentials does not host owner anymore#468

Merged
timja merged 3 commits into
jenkinsci:masterfrom
jeromepochat:fix-owner-issue
Sep 2, 2025
Merged

GitHubAppCredentials does not host owner anymore#468
timja merged 3 commits into
jenkinsci:masterfrom
jeromepochat:fix-owner-issue

Conversation

@jeromepochat
Copy link
Copy Markdown
Contributor

GitHub Branch Source 1844.v4a_9883d49126 provides new options to restrict the repositories and permissions available to installation access tokens. This brings some backwards compatibility limitations.

By default, GitHubAppCredentials applies AccessInferredOwner strategy.

When trying to bump github-branch-source, GitHubChecksPublisherITest is failing because the owner cannot infer owner as the GitHub App installation are returning a single owner named bogus while repositories owner is XiongKezhi:

java.lang.IllegalArgumentException: Found multiple installations for GitHub app ID app-id but none match credential owner "XiongKezhi". Configure the repository access strategy for the credential to use one of these owners: bogus

I assume that WireMock resources were designed with XiongKezhi / bogus mismatch to check owner update from GitHubAppCredentials.

As GitHubAppCredentials does not host owner anymore, this fixes GitHubChecksPublisherITest with:

  • use default AccessInferredOwner strategy
  • remove owner check from test
  • update MockServer resources with XiongKezhi user only

Testing done

mvn test passes locally.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@jeromepochat jeromepochat requested a review from a team as a code owner September 1, 2025 16:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.80%. Comparing base (803edab) to head (d935d95).
⚠️ Report is 67 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #468   +/-   ##
=========================================
  Coverage     71.80%   71.80%           
  Complexity      162      162           
=========================================
  Files            16       16           
  Lines           532      532           
  Branches         51       51           
=========================================
  Hits            382      382           
  Misses          124      124           
  Partials         26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timja timja added the developer label Sep 2, 2025
@timja timja merged commit 371dc6d into jenkinsci:master Sep 2, 2025
20 checks passed
@jeromepochat jeromepochat deleted the fix-owner-issue branch September 2, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants