Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Github] Bump actions script version to v7 #131471

Merged

Conversation

boomanaiden154
Copy link
Contributor

This patch bumps the actions script version in the issue-write workflow to v7. This was done before but rolled back due to errors as there were breaking changes in v5
(https://github.com/actions/github-script#breaking-changes-in-v5). This was reverted in f984b47.

This patch makes the necessary changes to prevent job failures.

Fixes #130211.

This patch bumps the actions script version in the issue-write workflow
to v7. This was done before but rolled back due to errors as there were
breaking changes in v5
(https://github.com/actions/github-script#breaking-changes-in-v5).
This was reverted in f984b47.

This patch makes the necessary changes to prevent job failures.

Fixes llvm#130211.
@llvmbot
Copy link
Member

llvmbot commented Mar 15, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch bumps the actions script version in the issue-write workflow to v7. This was done before but rolled back due to errors as there were breaking changes in v5
(https://github.com/actions/github-script#breaking-changes-in-v5). This was reverted in f984b47.

This patch makes the necessary changes to prevent job failures.

Fixes #130211.


Full diff: https://github.com/llvm/llvm-project/pull/131471.diff

1 Files Affected:

  • (modified) .github/workflows/issue-write.yml (+5-5)
diff --git a/.github/workflows/issue-write.yml b/.github/workflows/issue-write.yml
index ad17d9a33ddb7..a2c4f58d6febe 100644
--- a/.github/workflows/issue-write.yml
+++ b/.github/workflows/issue-write.yml
@@ -39,7 +39,7 @@ jobs:
 
       - name: 'Comment on PR'
         if: steps.download-artifact.outputs.artifact-id != ''
-        uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
+        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
@@ -49,7 +49,7 @@ jobs:
               return;
             }
 
-            let runInfo = await github.actions.getWorkflowRun({
+            let runInfo = await github.rest.actions.getWorkflowRun({
               owner: context.repo.owner,
               repo: context.repo.repo,
               run_id: context.payload.workflow_run.id
@@ -122,7 +122,7 @@ jobs:
                 // Security check: Ensure that this comment was created by
                 // the github-actions bot, so a malicious input won't overwrite
                 // a user's comment.
-                github.issues.getComment({
+                github.rest.issues.getComment({
                   owner: context.repo.owner,
                   repo: context.repo.repo,
                   comment_id: comment.id
@@ -132,7 +132,7 @@ jobs:
                     console.log("Invalid comment id: " + comment.id);
                     return;
                   }
-                  github.issues.updateComment({
+                  github.rest.issues.updateComment({
                     owner: context.repo.owner,
                     repo: context.repo.repo,
                     issue_number: pr_number,
@@ -141,7 +141,7 @@ jobs:
                   });
                 });
               } else {
-                github.issues.createComment({
+                github.rest.issues.createComment({
                   owner: context.repo.owner,
                   repo: context.repo.repo,
                   issue_number: pr_number,

@boomanaiden154 boomanaiden154 merged commit bf5648a into llvm:main Mar 21, 2025
11 checks passed
@boomanaiden154 boomanaiden154 deleted the fix-issue-write-actions-script branch March 21, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"[llvm/llvm-project] Comment on an issue workflow run" emails
3 participants