From 7abc7c07afc22059d57f8cd06c6a7e12b7d1b95b Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Thu, 9 Oct 2025 21:47:13 +0800 Subject: [PATCH] Update GitHub Actions to use GraphQL for comments --- .github/workflows/dist-update-notification.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist-update-notification.yml b/.github/workflows/dist-update-notification.yml index 9a00bb404..660cca578 100644 --- a/.github/workflows/dist-update-notification.yml +++ b/.github/workflows/dist-update-notification.yml @@ -12,5 +12,20 @@ jobs: - name: Create comment on discussion #2140 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment run: | - gh discussion comment 2140 --body "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}." + gh api graphql -f query=' + mutation { + addDiscussionComment( + input: { + discussionId: "DISCUSSION_ID", + body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}." + } + ) { + comment { + id + body + } + } + } + '