From 75a84f6ed1eb2da7a1ee1956b18672afaba085b3 Mon Sep 17 00:00:00 2001 From: clsty Date: Thu, 9 Oct 2025 22:28:41 +0800 Subject: [PATCH] Use DISCUSSION_NODE_ID --- .../workflows/dist-update-notification.yml | 33 ++++++++++--------- dist-arch/README.md | 1 + 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dist-update-notification.yml b/.github/workflows/dist-update-notification.yml index e3b60429c..73063a00a 100644 --- a/.github/workflows/dist-update-notification.yml +++ b/.github/workflows/dist-update-notification.yml @@ -15,22 +15,23 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment run: | - curl -X POST \ + DISCUSSION_NODE_ID=$(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 } } }"}' \ - https://api.github.com/graphql - # 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 - # } - # } - # } - # ' + https://api.github.com/graphql | \ + jq -r '.data.repository.discussion.id') + gh api graphql -f query=' + mutation { + addDiscussionComment(input:{ + discussionId: "$DISCUSSION_NODE_ID", + body: "dist-arch/ directory has changed in commit ${{ github.sha }} by ${{ github.actor }}.", + }) { + clientMutationId + comment { + id + body + } + } + } + ' diff --git a/dist-arch/README.md b/dist-arch/README.md index 8fd96687f..f08db5870 100644 --- a/dist-arch/README.md +++ b/dist-arch/README.md @@ -1,4 +1,5 @@ # Install scripts for Arch Linux + ## Old Dependency Installation Method The old deps install method mainly involved `./scriptdata/dependencies.conf` (which has been removed now).