Browse Source

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

David Höck 8 months ago
parent
commit
e36c3f59a9
1 changed files with 3 additions and 3 deletions
  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 repo  = context.repo.repo;
             const jira  = "${{ steps.jira.outputs.key }}";
             const jira  = "${{ steps.jira.outputs.key }}";
             const body  = `🔗 Linked to Core Team Jira ticket **${jira}**`;
             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));
             const existing = comments.find(c=>/Linked to Core Team Jira ticket/i.test(c.body));
             if (existing) {
             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 {
             } else {
-              await github.issues.createComment({owner,repo,issue_number,body});
+              await github.rest.issues.createComment({owner,repo,issue_number,body});
             }
             }