Skip to content

Commit 0cbf48b

Browse files
authored
replace context with env value (#22978)
1 parent 8f4140f commit 0cbf48b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/actions-scripts/enable-automerge.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { getOctokit } from '@actions/github'
22
const token = process.env.GITHUB_TOKEN
33
const prNumber = process.env.AUTOMERGE_PR_NUMBER
4+
const [org, repo] = process.env.GITHUB_REPOSITORY.split('/')
45
const github = getOctokit(token)
56

67
main()
78
async function main() {
8-
const pull = await github.pulls.get({
9-
...context.repo,
9+
const pull = await github.rest.pulls.get(
10+
org,
11+
repo,
1012
pull_number: parseInt(prNumber),
1113
})
1214

0 commit comments

Comments
 (0)