Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d77e483

Browse files
committed
Fix update-workflows job
The update-workflow job has been failing for the last week due to a [breaking change](actions/github-script#508) in the github-script action. fixes #1694, fixes #1697
1 parent c18e426 commit d77e483

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/update-workflows.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,17 @@ jobs:
104104
github-token: ${{ steps.esc-secrets.outputs.PULUMI_BOT_TOKEN }}
105105
script: |
106106
const regex = /Update GitHub Actions workflows/i;
107-
const octokit = github.rest;
108107
const repo = 'pulumi-${{ inputs.provider_name }}'
109108
console.log('Checking ' + repo);
110-
const { data: pullRequests } = await octokit.pulls.list({
109+
const { data: pullRequests } = await octokit.rest.pulls.list({
111110
owner: 'pulumi',
112111
repo: repo,
113112
state: 'open',
114113
});
115114
for (const pullRequest of pullRequests) {
116115
if (regex.test(pullRequest.title)) {
117116
console.log('Closing obsolete PR ' + pullRequest.number);
118-
await octokit.pulls.update({
117+
await octokit.rest.pulls.update({
119118
owner: 'pulumi',
120119
repo: repo,
121120
pull_number: pullRequest.number,

0 commit comments

Comments
 (0)