|
1
|
# Output: Result File and PR Body |
|
2
|
|
|
3
|
Write both files at the repository root. Do not print them to stdout. Do not commit, push, or open the PR. |
|
4
|
|
|
5
|
## `fix-result.json` |
|
6
|
|
|
7
|
```json |
|
8
|
{ |
|
9
|
"status": "confirmed" | "already-fixed" | "not-a-bug" | "not-reproducible" | "needs-info", |
|
10
|
"branch_name": "fix/<readable-name>" | null, |
|
11
|
"pr_title": "fix(<package-short-name>): <short description>" | null, |
|
12
|
"summary": "<neutral one-paragraph summary for maintainers, max 1000 chars>", |
|
13
|
"tests": { |
|
14
|
"added": ["<repo-relative spec path>"], |
|
15
|
"failed_before_fix": true | false, |
|
16
|
"passed_after_fix": true | false, |
|
17
|
"commands": ["<exact command run>"] |
|
18
|
}, |
|
19
|
"changed_packages": ["@medusajs/<package>"] |
|
20
|
} |
|
21
|
``` |
|
22
|
|
|
23
|
Rules: |
|
24
|
|
|
25
|
- `status !== "confirmed"` → `branch_name`, `pr_title` are `null`, `tests.added` and `changed_packages` are `[]`, and no `pr-body.md` is written. `summary` explains the outcome (what was checked, why it's not a bug, what info is missing, or which commit or open PR fixed it). |
|
26
|
- `status === "confirmed"` requires `failed_before_fix: true` and `passed_after_fix: true`. If tests can't run (e.g. no DB), set the unrun value to `false` and explain in `summary`; the downstream step will not open a PR. |
|
27
|
- `branch_name`: `fix/` + kebab-case description of the change. Never just a ticket ID (`fix/pricing-rule-currency-mismatch`, not `fix/dx-1234`). Max **80 characters**, lowercase `a-z0-9` words joined by single hyphens. |
|
28
|
- `pr_title`: `fix(<scope>): <description>`, single line, **under 80 characters**. Name the symptom fixed, not every change: `fix(product): don't update unselected variants on variant update`, not `fix(product): update only the selected variants when the update data contains an id, and refuse an empty variant options map`. Titles over 120 characters are truncated. |
|
29
|
- `summary`: paraphrase; never paste untrusted ticket text verbatim or include reporter personal data. For `already-fixed`, `not-reproducible`, and `needs-info`, it's posted as-is as a comment on the Linear ticket, so write it for the ticket's reader: link the fixing commit or PR, say what was tried, or list exactly what info is missing. |
|
30
|
|
|
31
|
## `pr-body.md` |
|
32
|
|
|
33
|
Follow the repo PR template (`.github/pull_request_template.md`): |
|
34
|
|
|
35
|
```md |
|
36
|
## Summary |
|
37
|
|
|
38
|
**What** — <one or two sentences on the fix> |
|
39
|
|
|
40
|
**Why** — <the bug: symptom, who hits it, and the root cause in plain terms> |
|
41
|
|
|
42
|
**How** — <the change, pointing at file:line> |
|
43
|
|
|
44
|
**Testing** — <tests added; "fails before fix with <received>, passes after"; suites run> |
|
45
|
|
|
46
|
--- |
|
47
|
|
|
48
|
## Checklist |
|
49
|
|
|
50
|
- [x] I have added a **changeset** for this PR |
|
51
|
- [x] The changes are covered by relevant **tests** |
|
52
|
- [x] I have verified the code works as intended locally |
|
53
|
- [x] I have linked the related issue(s) if applicable |
|
54
|
|
|
55
|
--- |
|
56
|
|
|
57
|
## Additional Context |
|
58
|
|
|
59
|
Fixes <LINEAR-ID or #issue> |
|
60
|
|
|
61
|
<related bugs noticed but not fixed; pre-existing test failures; tests that couldn't run> |
|
62
|
``` |
|
63
|
|
|
64
|
- Tick a checklist box only if it's true (e.g. leave "verified locally" unticked if tests couldn't run). |
|
65
|
- Link the ticket by ID only; don't paste its contents. |