Files
kilocode/.github/workflows/auto-docs.yml
T
Ligia Zanchet a17a5de954 Add auto-docs workflow for merged feat PRs
This workflow triggers a webhook when a pull request is closed and merged, specifically for branches containing 'feat'. It sends relevant PR data to a specified webhook URL.
2026-03-16 13:30:18 +01:00

27 lines
919 B
YAML

name: Documentation Webhook on trigger on Feat PRs
on:
pull_request:
types: [closed]
branches:
- main
jobs:
webhook:
# Only run if the PR was merged AND the head branch name contains 'feat'
if: github.event.pull_request.merged == true && contains(github.event.pull_request.head.ref, 'feat')
runs-on: ubuntu-latest
steps:
- name: Send Webhook
run: |
curl -X POST ${{ secrets.DOC_WEBHOOK_URL }} \
-H "Content-Type: application/json" \
-d '{
"repo": "${{ github.repository }}",
"pr_number": "${{ github.event.pull_request.number }}",
"title": "${{ github.event.pull_request.title }}",
"description": "${{ github.event.pull_request.body }}",
"author": "${{ github.event.pull_request.user.login }}",
"merged_at": "${{ github.event.pull_request.merged_at }}"
}'