一键导入
creating-pull-requests
// ALWAYS use when asked to: create a PR, open a PR, make a PR, push and create PR, submit changes for review. Do NOT use gh pr create directly.
// ALWAYS use when asked to: create a PR, open a PR, make a PR, push and create PR, submit changes for review. Do NOT use gh pr create directly.
| name | creating-pull-requests |
| description | ALWAYS use when asked to: create a PR, open a PR, make a PR, push and create PR, submit changes for review. Do NOT use gh pr create directly. |
NEVER run gh pr create directly. ALWAYS follow this skill's workflow.
Always create pull requests as drafts and follow the repository's PR template format.
Read the PR template first refer .github/pull_request_template.md
Gather context
Check for changelog — if the branch has user-facing changes and no changelog entry exists yet, use the writing-changelog skill to create one before proceeding
Run QA before pushing — CI will fail the PR otherwise. Always run, even when only TS/JS files changed:
cd mailpoet && ./do qa:prettier-check
cd mailpoet && ./do qa
Fix any issues with ./do qa:prettier-write and ./do qa:fix-file <path>. See the mailpoet-dev-cycle skill for the full pre-commit checklist (PHPStan, ESLint, Stylelint, tests). Commit any auto-formatting changes before opening the PR — landing a "fix Prettier" follow-up commit on a fresh PR is wasteful.
Create as draft
Follow template sections exactly - Not all sections are mandatory, use _N/A_ for non-applicable ones
There are some checkboxes on the bottom of the template, only check the ones that are applicable.
The "Code review notes" section is only for information that helps the reviewer but isn't obvious from the diff. Think hard before filling it in — leave it as _N/A_ if you have nothing genuinely useful to say.
Good code review notes point the reviewer to:
OtherClass::method() for consistency")Bad code review notes just describe what the code does:
doThing() that does the thing" — the reviewer can see thatOtherFile.php" — irrelevantIf every bullet could be derived by reading the code, use _N/A_ instead.
| Mistake | Fix |
|---|---|
Using gh pr create directly | ALWAYS use this skill workflow first |
| Creating non-draft PR | Always use --draft flag |
| Custom PR format | Read and follow .github/pull_request_template.md |
| Missing sections | Include all template sections, use _N/A_ if not applicable |
| Skipping template read | ALWAYS read the template first, it may have changed |
| Narrating the diff in review notes | Only write what the reviewer can't see from the code. Use _N/A_ if nothing to add |
| Missing changelog entry | Check for changelog before creating the PR. Use the writing-changelog skill |
| Skipping Prettier / QA before push | Run ./do qa:prettier-check + ./do qa first; CI will fail the PR otherwise |
Use when investigating a failing test — reported via a CircleCI job/build URL, or output from a local test run. Triggers on phrases like "this test failed", "debug this CI failure", "why did the nightly fail?", "investigate the failure on <branch>", or any message pasting a CircleCI URL with failure context. Guides the investigator to diagnose, fix, and verify the fix locally. Stops there — committing, opening a PR, or writing a changelog is the caller's call (see `creating-pull-requests`, `writing-changelog`).
Linting and code quality workflows for MailPoet development (PHP, JS/TS, CSS/SCSS). Use when fixing code style or following the development workflow.
Use when running MailPoet tests — executing a full suite, running a single file or single test, running in debug/multisite mode, or shelling into the test container. Triggers on phrases like "run the unit tests", "run this test file", "execute the integration suite", "kick off acceptance tests", "rerun the failed tests". Does not cover authoring tests (see writing-tests) or investigating a failed CI run (see debugging-failed-tests).
Use when authoring tests for MailPoet — adding a new test case, picking the right test type, choosing a name, structuring the file, deciding what belongs in unit vs integration vs acceptance. For invoking the test runner (running a file, the whole suite, premium variants, debug mode) see running-tests. For investigating a CI failure see debugging-failed-tests.
Use when adding or changing SQL joins, WHERE comparisons, temporary tables, segment filters, subscriber synchronization, or WooCommerce queries that compare text columns across WordPress, WooCommerce, and MailPoet tables.
Use when a new WooCommerce or WordPress beta / release candidate is available and you need to test MailPoet's compatibility against it. Triggers on phrases like "test against WC beta", "test MailPoet on WP beta", "compatibility test", "new WooCommerce version", "new WordPress version".