Update GitHub Actions to use GraphQL for comments

This commit is contained in:
Celestial.y
2025-10-09 21:47:13 +08:00
committed by GitHub
parent d8c49a3d04
commit 7abc7c07af
+16 -1
View File
@@ -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
}
}
}
'