Ver código fonte

fix: Update GitHub API calls in Jira sync workflow to use the new REST syntax

David Höck 8 meses atrás
pai
commit
e36c3f59a9
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      .github/workflows/sync-jira.yml

+ 3 - 3
.github/workflows/sync-jira.yml

@@ -48,10 +48,10 @@ jobs:
             const repo  = context.repo.repo;
             const jira  = "${{ steps.jira.outputs.key }}";
             const body  = `🔗 Linked to Core Team Jira ticket **${jira}**`;
-            const {data:comments} = await github.issues.listComments({owner,repo,issue_number});
+            const {data:comments} = await github.rest.issues.listComments({owner,repo,issue_number});
             const existing = comments.find(c=>/Linked to Core Team Jira ticket/i.test(c.body));
             if (existing) {
-              await github.issues.updateComment({owner,repo,comment_id:existing.id,body});
+              await github.rest.issues.updateComment({owner,repo,comment_id:existing.id,body});
             } else {
-              await github.issues.createComment({owner,repo,issue_number,body});
+              await github.rest.issues.createComment({owner,repo,issue_number,body});
             }