mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
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.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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 }}"
|
||||
}'
|
||||
Reference in New Issue
Block a user