From d718f023cd5bcfe04daaec3a5b3a8edb08048864 Mon Sep 17 00:00:00 2001 From: clsty Date: Thu, 9 Oct 2025 22:18:11 +0800 Subject: [PATCH] Get notification node id first --- .../workflows/dist-update-notification.yml | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dist-update-notification.yml b/.github/workflows/dist-update-notification.yml index a8e7b8020..f89de3bbf 100644 --- a/.github/workflows/dist-update-notification.yml +++ b/.github/workflows/dist-update-notification.yml @@ -4,6 +4,7 @@ on: push: paths: - 'dist-arch/**' + workflow_dispatch: jobs: comment_on_discussion: @@ -14,18 +15,21 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment run: | - gh api graphql -f query=' - mutation { - addDiscussionComment( - input: { - discussionId: "2140", - body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}." - } - ) { - comment { - id - body - } - } - } - ' + curl -X POST \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"query": "query { repository(owner: "end-4", name: "dots-hyprland") { discussion(number: 2140) { id } } }"}' + # gh api graphql -f query=' + # mutation { + # addDiscussionComment(input:{ + # discussionId: "2140", + # body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}.", + # }) { + # clientMutationId + # comment { + # id + # body + # } + # } + # } + # '