Files
dots-hyprland/.github/workflows/dist-update-notification.yml
T
2025-10-09 22:22:59 +08:00

37 lines
1.1 KiB
YAML

name: Comment on Discussion When dist-arch/ Changes
on:
push:
paths:
- 'dist-arch/**'
workflow_dispatch:
jobs:
comment_on_discussion:
runs-on: ubuntu-latest
steps:
- name: Create comment on discussion #2140
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment
run: |
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
# }
# }
# }
# '