File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 46
46
script : |
47
47
const { Octokit } = require('@octokit/rest');
48
48
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
49
52
const octokit = new Octokit({
50
53
auth: process.env.GIT_HUB_TOKEN,
51
54
});
60
63
throw new Error(`Don't know how to handle event name: ${eventName}`);
61
64
}
62
65
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`)
66
67
const createResp = await octokit.rest.pulls.create({
67
68
owner: context.repo.owner,
68
69
repo: context.repo.repo,
74
75
const pullRequestNumber = createResp.data.number;
75
76
76
77
// Merge pull request
77
- await github .rest.pulls.merge({
78
+ await octokit .rest.pulls.merge({
78
79
owner: context.repo.owner,
79
80
repo: context.repo.repo,
80
81
pull_number: pullRequestNumber,
You can’t perform that action at this time.
0 commit comments