5_pull_request_workflow.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <pull_request_workflow>
  2. <preparation>
  3. 1. Ensure all changes are committed with proper message format
  4. 2. Push to appropriate branch (fork or direct)
  5. 3. Prepare comprehensive PR description
  6. 4. Get user approval before creating PR
  7. 5. Extract owner and repo from the provided GitHub URL
  8. </preparation>
  9. <pr_title_format>
  10. - Bug fixes: "fix: [description] (#[issue-number])"
  11. - Features: "feat: [description] (#[issue-number])"
  12. - Follow conventional commit format
  13. </pr_title_format>
  14. <pr_description_template>
  15. Must include:
  16. - Link to issue (Fixes #[number])
  17. - Detailed description of changes
  18. - Testing performed
  19. - Verification of acceptance criteria
  20. - Checklist items
  21. - Screenshots/demos if applicable
  22. </pr_description_template>
  23. <creating_pr_with_cli>
  24. Use GitHub CLI to create the pull request:
  25. <execute_command>
  26. <command>gh pr create --repo [owner]/[repo] --base main --title "[title]" --body "[description]" --maintainer-can-modify</command>
  27. </execute_command>
  28. If working from a fork, ensure you've forked first:
  29. <execute_command>
  30. <command>gh repo fork [owner]/[repo] --clone</command>
  31. </execute_command>
  32. The gh CLI automatically handles fork workflows.
  33. </creating_pr_with_cli>
  34. <after_creation>
  35. 1. Comment on original issue with PR link:
  36. <execute_command>
  37. <command>gh issue comment [issue-number] --repo [owner]/[repo] --body "PR #[pr-number] has been created to address this issue"</command>
  38. </execute_command>
  39. 2. Inform user of successful creation
  40. 3. Provide next steps and tracking info
  41. 4. Monitor PR checks:
  42. <execute_command>
  43. <command>gh pr checks [pr-number] --repo [owner]/[repo] --watch</command>
  44. </execute_command>
  45. </after_creation>
  46. </pull_request_workflow>