@@ -103,63 +103,23 @@ jobs:
103103 - Make the necessary documentation changes to the appropriate files.
104104 - Keep the documentation style consistent with existing docs.
105105 - Be concise and clear.
106-
107- 5. **Output**:
108- - If you made documentation changes, provide a brief summary of what you updated.
109- - If no documentation changes are needed, explain why (e.g., "No user-facing changes").
106+ - Create a new branch named \`docs/update-from-pr-${pr.number}\`.
107+ - Commit your changes with the message: \`docs: update documentation for PR #${pr.number}\`.
108+ - Push the branch and create a Pull Request targeting \`main\`.
109+ - The PR title should be: \`docs: Update documentation for PR #${pr.number}\`.
110+ - The PR body should summarize the documentation changes you made.
111+
112+ 5. **If No Updates are Needed**:
113+ - Do not create a branch or PR.
114+ - Explain why no documentation changes are needed (e.g., "No user-facing changes").
110115 `;
111116 core.setOutput('prompt', prompt);
112117
113118 - name : Run Warp Agent
114119 uses : warpdotdev/warp-agent-action@v1
115120 env :
116121 GH_TOKEN : ${{ github.token }}
117- id : agent
118122 with :
119123 prompt : ${{ steps.prompt.outputs.prompt }}
120124 warp_api_key : ${{ secrets.WARP_API_KEY }}
121125 profile : ${{ vars.WARP_AGENT_PROFILE || '' }}
122-
123- - name : Create PR if Changes Made
124- env :
125- GH_TOKEN : ${{ github.token }}
126- PR_NUMBER : ${{ github.event.pull_request.number }}
127- AGENT_OUTPUT : ${{ steps.agent.outputs.agent_output }}
128- run : |
129- # Remove temporary files that should not be committed
130- rm -f pr_diff.txt
131-
132- # Check for changes
133- if [[ -z $(git status --porcelain) ]]; then
134- echo "No documentation changes needed."
135- exit 0
136- fi
137-
138- BRANCH_NAME="docs/update-from-pr-$PR_NUMBER"
139-
140- git config user.name "Warp Agent"
141- git config user.email "agent@warp.dev"
142-
143- git checkout -b "$BRANCH_NAME"
144- git add .
145- git commit -m "docs: update documentation for PR #$PR_NUMBER
146-
147- Co-Authored-By: Warp <agent@warp.dev>"
148- git push origin "$BRANCH_NAME" --force
149-
150- # Create PR
151- TITLE="docs: Update documentation for PR #$PR_NUMBER"
152- BODY="This PR updates documentation based on changes from #$PR_NUMBER.
153-
154- **Agent Summary**:
155- $AGENT_OUTPUT
156-
157- ---
158- *This PR was automatically generated by the Warp Agent.*
159-
160- Co-Authored-By: Warp <agent@warp.dev>"
161-
162- # Create PR and capture URL
163- PR_URL=$(gh pr create --title "$TITLE" --body "$BODY" --base main --head "$BRANCH_NAME")
164-
165- echo "Created documentation PR: $PR_URL"
0 commit comments