Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Pull request template (#36400)

## Summary

<!-- What changed and why. One to three bullets. -->

## Closing scope

<!--
Definition of Done (#36400):
- Use **Closes #N** only when every Done-when box from issue N is ticked below
with the **exact** checkbox text from the issue, plus the gate/command output.
- Use **Part of #N** for partial work and list what remains.
- Issues without a ## Done when list must get one before being claimed.
-->

- Closes? / Part of? : <!-- e.g. Part of #36400 OR Closes #36400 -->

### Done when (copy from the issue; tick only what this PR completes)

- [ ] <!-- paste each Done-when line from the issue; mark [x] when done -->

### What remains (required for Part of #N)

<!-- Bullet list, or "none — closing". -->

## Test plan

- [ ] Named gates run in the pinned Docker image (`./script/docker-exec.sh` / `./script/phpunit.sh`)
- [ ] `php script/check-issue-close-scope.php --pr-body <this-body-file> --repo PurHur/php-compiler` (when using Closes #N)
- [ ] Repro / Done-when commands pasted with output
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ Please follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) in all project interactio

The sections below are for **maintainers and collaborators who have already coordinated** on other channels.

### Definition of Done ([#36400](https://github.com/PurHur/php-compiler/issues/36400))

An issue may be closed by a PR only when **all** of the following hold:

1. Every checkbox under the issue’s `## Done when` section appears in the PR body as a **ticked** copy (`- [x]` + the same text), together with the command output that proves it.
2. The named gates for that change class were run in the **pinned Docker image** (`./script/docker-exec.sh` / `./script/phpunit.sh`), and the transcript is in the PR.
3. Partial work uses **`Part of #N`** (not `Closes #N`) and lists what remains. Issues without a `## Done when` list get one **before** being claimed.

Gate (local / PR body check):

```bash
php script/check-issue-close-scope.php --self-test
php script/check-issue-close-scope.php --pr-body /tmp/pr.md --repo PurHur/php-compiler
```

A `Closes #N` without the full ticked Done-when list **fails** the gate; `Part of #N` does not. Weekly audit: `php script/audit-closed-but-partial.php --days 7 --dry-run` (post with `--post --tracker 36379`; optional `--apply-labels`). See [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md).

### Pull request process

All submissions, including by project members, require review via GitHub pull requests. See [GitHub Help](https://help.github.com/articles/about-pull-requests/) for using pull requests.
Expand Down
Loading