-
Notifications
You must be signed in to change notification settings - Fork 0
Add workflow for automated code implementation #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,93 @@ | ||||||||||
| name: Code Implementation via Claude | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| workflow_dispatch: | ||||||||||
| inputs: | ||||||||||
| summary: | ||||||||||
| description: 'Summary of changes to make' | ||||||||||
| required: true | ||||||||||
| type: string | ||||||||||
| permissions: | ||||||||||
| contents: write | ||||||||||
| pull-requests: write | ||||||||||
| actions: read | ||||||||||
| id-token: write | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| auto-changes: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - name: Checkout code | ||||||||||
| uses: actions/checkout@v4 | ||||||||||
| with: | ||||||||||
| fetch-depth: 0 | ||||||||||
|
|
||||||||||
| - name: Create feature branch | ||||||||||
| id: branch | ||||||||||
| run: | | ||||||||||
| BRANCH_NAME="claude-changes-${{ github.run_id }}" | ||||||||||
| git checkout -b "$BRANCH_NAME" | ||||||||||
| echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | ||||||||||
|
|
||||||||||
| - name: Make changes with Claude | ||||||||||
| id: claude | ||||||||||
| uses: anthropics/claude-code-action@v1 | ||||||||||
| with: | ||||||||||
| prompt: | | ||||||||||
| You are an AI assistant helping to make changes to a repository and create a Pull Request. | ||||||||||
|
|
||||||||||
| IMPORTANT: You must complete ALL the following tasks: | ||||||||||
|
|
||||||||||
| Task Summary: | ||||||||||
| ${{ github.event.inputs.summary }} | ||||||||||
|
|
||||||||||
| YOUR TASKS: | ||||||||||
| 1. Analyze the repository and make all necessary changes according to the summary | ||||||||||
| 2. Review all changes you've made | ||||||||||
| 3. Commit the changes to the git branch with an appropriate commit message | ||||||||||
| 4. Push the branch to the remote repository | ||||||||||
| 5. Create a Pull Request with a detailed summary and description | ||||||||||
|
|
||||||||||
| DETAILED INSTRUCTIONS: | ||||||||||
|
|
||||||||||
| **Step 1-2: Make Changes** | ||||||||||
| - Examine the current repository structure first | ||||||||||
| - Make all necessary file modifications | ||||||||||
| - Ensure changes are consistent with the existing codebase style | ||||||||||
| - Create or modify files as needed | ||||||||||
|
|
||||||||||
| **Step 3: Commit Changes** | ||||||||||
| - Use: git add -A | ||||||||||
| - Use: git commit -m "chore: [descriptive message based on changes]" | ||||||||||
| - Include a detailed commit message explaining what was changed | ||||||||||
|
|
||||||||||
| **Step 4: Push to Remote** | ||||||||||
| - Use: git push origin ${{ steps.branch.outputs.branch_name }} | ||||||||||
|
|
||||||||||
| **Step 5: Create Pull Request** | ||||||||||
| - Use the GitHub CLI (gh pr create) to create a PR with: | ||||||||||
| - Title: A clear, concise title describing the changes | ||||||||||
| - Body: A detailed PR summary including: | ||||||||||
| * What was changed and why | ||||||||||
| * List of files modified | ||||||||||
| * Any important notes or considerations | ||||||||||
| * Reference to the original task | ||||||||||
| - Example: gh pr create --title "Add TypeScript types" --body "This PR adds TypeScript types to all API endpoints..." --base main | ||||||||||
|
|
||||||||||
| Guidelines: | ||||||||||
| - Be thorough and complete all tasks in order | ||||||||||
| - The PR body should be well-structured and informative | ||||||||||
| - Include all relevant context in the PR description | ||||||||||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||||||||||
| - Do not make any changes to master branch | ||||||||||
|
Comment on lines
+81
to
+82
|
||||||||||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| - Do not make any changes to master branch | |
| - Do not make any changes to master branch | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected. This line has 5 spaces before the dash, while other steps (lines 20, 32, 85) use 6 spaces. This should be indented with 6 spaces to match the other steps in the workflow.