mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
add debug log for github auth app
This commit is contained in:
parent
a470ab8463
commit
4b86bcd182
1 changed files with 2 additions and 0 deletions
|
|
@ -130,6 +130,8 @@ export const fetchWithRetry = async <T>(
|
||||||
export const getAuthCredentialsForRepo = async (repo: RepoWithConnections, db: PrismaClient, logger?: Logger): Promise<RepoAuthCredentials | undefined> => {
|
export const getAuthCredentialsForRepo = async (repo: RepoWithConnections, db: PrismaClient, logger?: Logger): Promise<RepoAuthCredentials | undefined> => {
|
||||||
// If we have github apps configured we assume that we must use them for github service auth
|
// If we have github apps configured we assume that we must use them for github service auth
|
||||||
if (repo.external_codeHostType === 'github' && hasEntitlement('github-app') && GithubAppManager.getInstance().appsConfigured()) {
|
if (repo.external_codeHostType === 'github' && hasEntitlement('github-app') && GithubAppManager.getInstance().appsConfigured()) {
|
||||||
|
logger?.debug(`Using GitHub App for service auth for repo ${repo.displayName} hosted at ${repo.external_codeHostUrl}`);
|
||||||
|
|
||||||
const owner = repo.displayName?.split('/')[0];
|
const owner = repo.displayName?.split('/')[0];
|
||||||
const deploymentHostname = new URL(repo.external_codeHostUrl).hostname;
|
const deploymentHostname = new URL(repo.external_codeHostUrl).hostname;
|
||||||
if (!owner || !deploymentHostname) {
|
if (!owner || !deploymentHostname) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue