Skip to content

Send a webhook event to a new discussion #152488

Closed Answered by bittiez
bittiez asked this question in API and Webhooks
Discussion options

You must be logged in to vote

With the help of some AI, this seems to be working:

name: Wiki Update Discussion

on:
  gollum  # Triggers when the wiki is updated

jobs:
  post-discussion:
    runs-on: ubuntu-latest
    steps:
      - name: Create Discussion in Custom Category
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REPO: ${{ github.repository }}
          CATEGORY_NAME: "Wiki Updates"  # Change this to your preferred category name
        run: |
          HISTORY_URL="/~https://github.com/${REPO}/wiki/_history"
          TITLE="Wiki Updated: $(date +'%Y-%m-%d %H:%M:%S')"
          BODY="A change was made to the wiki. See the latest updates: [Wiki Edit History](${HISTORY_URL})"

          R…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bittiez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions and conversations related to APIs or Webhooks Question
1 participant