Skip to content

Commit

Permalink
Address breaking change of actions/github-script v5 (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
na4zagin3 authored Dec 15, 2024
1 parent fc59785 commit 12b6fd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const artifacts = await github.actions.listWorkflowRunArtifacts({
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
Expand All @@ -38,7 +38,7 @@ jobs:
});
for await (const artifact of matchedArtifacts) {
console.log('download artifact', artifact);
const download = await github.actions.downloadArtifact({
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
repo: context.repo.repo,
pull_number
};
const pull_request = await github.pulls.get(pullRequestId);
const pull_request = await github.rest.pulls.get(pullRequestId);
const actionHeader = '\n# Automatic follow-ups\n';
const actionText = (snapshot) => `Add to snapshot \`${snapshot}\``;
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
const replacedBody = `${splitted[0]}${actionHeader}${actions.join('\n- ')}`;
await github.pulls.update({
await github.rest.pulls.update({
...pullRequestId,
body: replacedBody
});
Expand All @@ -168,7 +168,7 @@ jobs:
}
}
if (comments.length) {
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pull_number,
Expand Down

0 comments on commit 12b6fd2

Please sign in to comment.