Skip to content

Commit

Permalink
Use actions/github-script@v7
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 21, 2024
1 parent 9af022e commit 1c11c34
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cherry-pick-wp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Determine if label should trigger cherry-pick
id: label-check
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
Expand Down Expand Up @@ -66,15 +66,15 @@ jobs:
- name: Remove cherry-pick label
if: env.cherry_pick == 'true' && env.conflict == 'false'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;
const version = process.env.version;
console.log(`prNumber: ${prNumber}`);
console.log(`version: ${version}`);
const label = `Backport to WP ${version} Beta/RC`;
await github.issues.removeLabel({
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Comment on the PR
if: env.cherry_pick == 'true' && env.conflict == 'false'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;
Expand All @@ -92,7 +92,7 @@ jobs:
console.log(`prNumber: ${prNumber}`);
console.log(`commitSha: ${commitSha}`);
console.log(`targetBranch: ${targetBranch}`);
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
Expand All @@ -101,14 +101,14 @@ jobs:
- name: Comment on the PR about conflict
if: env.cherry_pick == 'true' && env.conflict == 'true'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;
const targetBranch = `wp/${process.env.version}`;
console.log(`prNumber: ${prNumber}`);
console.log(`targetBranch: ${targetBranch}`);
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
Expand Down

0 comments on commit 1c11c34

Please sign in to comment.