Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 7ca05c8

Browse files
flyingrobotsclaude
andcommitted
fix: Update Claude workflow to actually create PRs
The previous workflow just edited files but didn't create a PR. Now it: 1. Creates a new branch (auto/jsdoc-enhancement-<run-number>) 2. Makes JSDoc additions to files 3. Commits the changes 4. Pushes the branch 5. Creates a PR back to the source branch This ensures Claude's JSDoc enhancements come as reviewable PRs, not direct commits. 🖖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent 619f6be commit 7ca05c8

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/claude-jsdoc.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,27 @@ jobs:
5454
with:
5555
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
5656
prompt: |
57-
Analyze these JavaScript files and add comprehensive JSDoc where missing:
57+
You need to add comprehensive JSDoc to these JavaScript files:
5858
${{ steps.changed-files.outputs.files }}
5959
60-
Follow the patterns from docs/decisions/000-javascript-not-typescript.md
61-
Create a PR with the enhancements.
62-
claude_args: '--allowed-tools "Read,Edit,MultiEdit,Bash(gh pr create:*)"'
60+
Follow these steps:
61+
1. First, check if we're not already on a jsdoc branch: git branch --show-current
62+
2. If not on a jsdoc branch, create a new branch: git checkout -b auto/jsdoc-enhancement-${{ github.run_number }}
63+
3. Read each file and add JSDoc where missing (classes, functions, methods)
64+
4. Follow the patterns from docs/decisions/000-javascript-not-typescript.md
65+
5. After editing files, commit: git add -A && git commit -m "docs: Add comprehensive JSDoc documentation
66+
67+
- Added @fileoverview headers
68+
- Added @param and @returns annotations
69+
- Added @throws for error conditions
70+
- Added @example for complex functions
71+
72+
Auto-generated by Claude"
73+
6. Push the branch: git push origin auto/jsdoc-enhancement-${{ github.run_number }}
74+
7. Create a PR: gh pr create --base ${{ github.ref_name }} --title "📚 AI JSDoc Enhancement" --body "This PR adds comprehensive JSDoc documentation to recently modified JavaScript files.
75+
76+
Files enhanced:
77+
${{ steps.changed-files.outputs.files }}
78+
79+
Generated automatically by Claude following patterns from docs/decisions/000-javascript-not-typescript.md"
80+
claude_args: '--allowed-tools "Read,Edit,MultiEdit,Bash(git:*),Bash(gh pr create:*)"'

0 commit comments

Comments
 (0)