Skip to content

Commit

Permalink
refactor: log setBranchStatus url if failing
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Sep 4, 2020
1 parent a76f3e8 commit 73f11c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,10 @@ export async function setBranchStatus({
return;
}
logger.debug({ branch: branchName, context, state }, 'Setting branch status');
let url: string;
try {
const branchCommit = git.getBranchCommit(branchName);
const url = `repos/${config.repository}/statuses/${branchCommit}`;
url = `repos/${config.repository}/statuses/${branchCommit}`;
const renovateToGitHubStateMapping = {
green: 'success',
yellow: 'pending',
Expand All @@ -964,7 +965,7 @@ export async function setBranchStatus({
await getStatus(branchName, false);
await getStatusCheck(branchName, false);
} catch (err) /* istanbul ignore next */ {
logger.debug({ err }, 'Caught error setting branch status - aborting');
logger.debug({ err, url }, 'Caught error setting branch status - aborting');
throw new Error(REPOSITORY_CHANGED);
}
}
Expand Down

0 comments on commit 73f11c0

Please sign in to comment.