diff --git a/lib/api/github.js b/lib/api/github.js index ed1a9efba12f8dce9de3aa274ddf94301125d009..71b50165ff45e196e8ef21280bea17cfcc7d8e73 100644 --- a/lib/api/github.js +++ b/lib/api/github.js @@ -148,7 +148,6 @@ async function initRepo(repoName, token, endpoint) { } logger.debug(`${repoName} default branch = ${config.defaultBranch}`); config.baseCommitSHA = await getBranchCommit(config.defaultBranch); - config.baseTreeSHA = await getCommitTree(config.baseCommitSHA); } catch (err) /* istanbul ignore next */ { logger.error(`GitHub init error: ${JSON.stringify(err)}`); throw err; @@ -410,6 +409,8 @@ async function mergePr(pr) { } } } + // Update base branch SHA + config.baseCommitSHA = await getBranchCommit(config.defaultBranch); // Delete branch await deleteBranch(pr.head.ref); }