Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
agerauer committed Dec 5, 2023
1 parent de606a4 commit 7a7adcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ const mergeBranches = async function (octokit, pulls, tempBranch) {
branch: tempBranch
});
try {
const { data: integrationBranchData } = await octokit.request('GET /repos/{owner}/{repo}/branches/{integrationBranch}', {
const { data: integrationBranchData } = await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', {
owner: context.repo.owner,
repo: context.repo.repo,
branch: tempBranch
branch: integrationBranchName
});
console.log(`Updating branch ${integrationBranchName} from ${tempBranch} with commit sha: ${tempSha}.`);
await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {
Expand All @@ -115,6 +115,7 @@ const mergeBranches = async function (octokit, pulls, tempBranch) {
force: true
});
} catch(e) {
console.error(e)
console.log(`Creating branch ${integrationBranchName} from ${tempBranch} with commit sha: ${tempSha}.`);
await octokit.request('POST /repos/{owner}/{repo}/git/refs', {
owner: context.repo.owner,
Expand Down

0 comments on commit 7a7adcc

Please sign in to comment.