-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (65 loc) · 2.3 KB
/
Copy pathcreate-docs-sync-pr.yml
File metadata and controls
87 lines (65 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Create Docs Sync PR
on:
push:
branches:
- "automation/docs-sync/**"
permissions:
contents: read
pull-requests: write
concurrency:
group: create-docs-sync-pr-${{ github.ref_name }}
cancel-in-progress: false
jobs:
create-pr:
name: Create PR to main
runs-on: ubuntu-latest
steps:
- name: Create pull request to main if needed
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
BRANCH_NAME: ${{ github.ref_name }}
COMMIT_SHA: ${{ github.sha }}
run: |
set -euo pipefail
echo "Repository: $REPO"
echo "Branch: $BRANCH_NAME"
echo "Commit: $COMMIT_SHA"
existing_pr_url="$(gh pr list \
--repo "$REPO" \
--head "$BRANCH_NAME" \
--state open \
--json url \
--jq '.[0].url // ""')"
if [ -n "$existing_pr_url" ]; then
echo "Open PR already exists: $existing_pr_url"
exit 0
fi
cat > /tmp/pr_body.md <<EOF
## Summary
Automated docs sync branch generated by Cursor Automation (velt-node-sdk → docs).
## Source Branch
\`$BRANCH_NAME\`
## Target Branch
\`main\`
## Commit
\`$COMMIT_SHA\`
## Review Notes
This PR was created automatically after Cursor Automation pushed a docs sync branch.
Please review:
- Node SDK reference (\`backend-sdks/node.mdx\`) matches the velt-node-sdk public API surface
- Changelog (\`release-notes/version-5/velt-node-changelog.mdx\`) covers all published versions
- No unrelated docs were modified
## Manual Review Checklist
- [ ] Documented methods/models match the SDK code.
- [ ] New or changed APIs are documented.
- [ ] Changelog entries are accurate and complete.
- [ ] Changelog "Learn more" anchors resolve in node.mdx.
- [ ] No accidental content loss in node.mdx.
EOF
gh pr create \
--repo "$REPO" \
--head "$BRANCH_NAME" \
--base "main" \
--title "docs(node-sdk): sync Node SDK reference + changelog with velt-node-sdk" \
--body-file /tmp/pr_body.md