Skip to content

Commit 1682c25

Browse files
docs(agents): follow PR template when creating pull requests (#4362)
## Proposed change Updates the git-workflow agent guidance to instruct that PRs follow the repository PR template at `.github/pull_request_template.md`. Instead of hardcoding the template's sections (which drift over time), the guidance now tells the agent to read the template file at creation time and reproduce its sections with placeholders filled in. ## Related issues *- No issue associated -*
2 parents ef3a528 + 71905d4 commit 1682c25

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.agents/git-workflow.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,24 @@ yarn lint # Linting (mandatory)
6363
yarn test # Unit tests (mandatory)
6464
```
6565

66+
## Creating a Pull Request
67+
68+
Always follow the repository PR template defined in [`.github/pull_request_template.md`](../.github/pull_request_template.md). When opening a PR, read that file and reproduce its sections in the description, filling in the placeholders:
69+
70+
- Summarize the changes, the related issue, and the motivation/context behind them.
71+
- Link the corresponding issue using one of the template's prefixes so the PR is associated with it. Each PR should be linked to an issue (see [contributing.md](./contributing.md)). If none applies, keep the `*- No issue associated -*` placeholder.
72+
73+
When creating the PR from the CLI, first read `.github/pull_request_template.md` to get its current structure, then pass a body that follows that structure with the placeholders filled in — do not pass the raw template, as it only contains empty sections and comments:
74+
75+
```bash
76+
gh pr create --title "<type>(<scope>): concise description" --body "$(cat <<'EOF'
77+
<body following the template's sections, with the summary and related issue filled in>
78+
EOF
79+
)"
80+
```
81+
82+
The PR title must follow the same [Conventional Commits](https://www.conventionalcommits.org/) format as commit messages.
83+
6684
## Troubleshooting
6785

6886
### Pre-commit hook fails with a PnP resolution error

0 commit comments

Comments
 (0)