Get notification node id first

This commit is contained in:
clsty
2025-10-09 22:18:11 +08:00
parent 2bf933a3e1
commit d718f023cd
+19 -15
View File
@@ -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
# }
# }
# }
# '