Skip to content

Commit 65d56cd

Browse files
committed
fix: Merge branch syncing PRs with Apify Service Account [internal]
1 parent 6d4477f commit 65d56cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/sync_branches.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
script: |
4747
const { Octokit } = require('@octokit/rest');
4848
49+
// Create a new Octokit instance under Apify Service Account
50+
// Apify Service Account does not trigger PR toolkit,
51+
// does not need approval for PRs and does not need to wait for status checks
4952
const octokit = new Octokit({
5053
auth: process.env.GIT_HUB_TOKEN,
5154
});
@@ -60,9 +63,7 @@ jobs:
6063
throw new Error(`Don't know how to handle event name: ${eventName}`);
6164
}
6265
63-
// Create pull request as Apify Service Account
64-
// Apify Service Account does not trigger PR toolkit,
65-
// does not need approval for PRs and does not need to wait for status checks
66+
// Create pull request from headBranch to baseBranch (typically `master` to `develop`)
6667
const createResp = await octokit.rest.pulls.create({
6768
owner: context.repo.owner,
6869
repo: context.repo.repo,
@@ -74,7 +75,7 @@ jobs:
7475
const pullRequestNumber = createResp.data.number;
7576
7677
// Merge pull request
77-
await github.rest.pulls.merge({
78+
await octokit.rest.pulls.merge({
7879
owner: context.repo.owner,
7980
repo: context.repo.repo,
8081
pull_number: pullRequestNumber,

0 commit comments

Comments
 (0)