Skip to content

Conversation

@javoire
Copy link
Member

@javoire javoire commented Oct 23, 2025

Adds support for the GitHub Apps API GET /app endpoint which returns information about the authenticated GitHub App.

Changes:

  • Extended App model with additional API fields (clientId, singleFileName, hasMultipleSingleFiles, singleFilePaths, appSlug, suspendedAt, suspendedBy)
  • Enhanced GithubAppClient with new constructor and getAuthenticatedApp() method
  • Updated JWT authentication in GitHubClient to recognize /app endpoint
  • Added factory method createGithubAppClient() in GitHubClient
  • Added comprehensive tests with fixture data

Replaces Optional.get() calls with requireOwner() helper that provides
clear error messages when owner-dependent methods are called on
app-level clients without owner context.
+ "Use GitHubClient.createOrganisationClient(owner).createGithubAppClient() "
+ "or GitHubClient.createRepositoryClient(owner, repo).createGithubAppClient() "
+ "instead of GitHubClient.createGithubAppClient()"));
}
Copy link
Member Author

@javoire javoire Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option is another Class (GithubAppClient?). But then I'd prob rename this class to GithubAppInstallationClient which would be a breaking change

at least this way its hard to accidentally call one of the existing methods without the owner

@javoire

This comment was marked as outdated.

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.

1 participant