Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

Update the create-pr skill to fetch and respect the repository's PR template before writing the PR description.

Previously, the skill would always use its default structure for PR descriptions. Now it first checks for a PR template using gh repo view --json pullRequestTemplates and instructs the agent to follow that template's structure when one exists.

This ensures PRs created by the agent match the expected format for each repository and fill in all required sections defined by the repo maintainers.

Fetch the repository's PR template using `gh repo view --json
pullRequestTemplates` before writing the PR description. This ensures
PRs follow the repo's expected format and fill in required sections.

Co-Authored-By: Claude <[email protected]>
@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented Jan 12, 2026

This is especially important for SDK teams, as we often use PR templates for our repos.

Claude successfully followed this process for creating this PR.

@dcramer
Copy link
Member

dcramer commented Jan 12, 2026

Seems fine but any reason that all our repos arent using the same commit/PR policies? Not sure whats diff on SDK repos.

@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented Jan 13, 2026

@dcramer the SDK teams (or, at least the backend SDK team) recently standardized on similar PR templates, which include sections for the description, issues closed (importantly both the Linear ID and the GitHub ID to have an association with both), and also a section with reminders. We primarily have these reminders for external contributors, but these reminders also include information that could also be important for agents to follow.

For example, the Python SDK has this template:

### Description
<!-- What changed and why? -->

#### Issues
<!--
* resolves: #1234
* resolves: LIN-1234
-->

#### Reminders
- Please add tests to validate your changes, and lint your code using `tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr)

As you can see, the reminders have information that an agent probably also should be aware of.

@szokeasaurusrex szokeasaurusrex merged commit ec9e0a3 into main Jan 13, 2026
3 checks passed
@szokeasaurusrex szokeasaurusrex deleted the feat/pr-template-support branch January 13, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants