Skip to content

Commit d32d8e6

Browse files
authored
Merge branch 'medusajs:develop' into develop
2 parents 3fefa0d + 12b4e72 commit d32d8e6

88 files changed

Lines changed: 3209 additions & 757 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/brave-suits-double.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/js-sdk": patch
3+
---
4+
5+
chore(js-sdk): add methods to manage promotion codes

.changeset/curly-trains-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/loyalty-plugin": patch
3+
---
4+
5+
fix(loyalty-plugin): show gift card products section + error message for expiration date
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/dashboard": patch
3+
---
4+
5+
fix(dashboard): migrate return reasons list to new DataTable component

.changeset/late-stamps-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/loyalty-plugin": patch
3+
---
4+
5+
fix(loyalty-plugin): remove delete gift cards action + cleanup

.changeset/legal-bushes-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/loyalty-plugin": patch
3+
---
4+
5+
fix(loyalty-plugin): migrate to Zod v4

.changeset/open-weeks-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/loyalty-plugin": patch
3+
---
4+
5+
chore(loyalty): add tsdocs to services + add index.ts model export

.changeset/spotty-mails-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/payment": patch
3+
---
4+
5+
fix(payment): fix currency code unset when updating payment collection

.claude/skills/reviewing-prs/SKILL.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,26 @@ bash scripts/get_pr_diff.sh <pr_number>
6565
bash scripts/get_comments.sh <pr_number>
6666
```
6767

68-
### Step 2 — Review Prior Comments
68+
### Step 2 — Check for Duplicate PRs
69+
70+
If the PR body links an issue (from Step 1's PR details), search for other open PRs that reference the same issue:
71+
72+
```bash
73+
gh pr list --repo medusajs/medusa --state open --search "issue-number" --json number,title,author
74+
```
75+
76+
If another open PR is found that links the same issue:
77+
1. Include a **Heads up** note at the top of your review comment (before any other feedback):
78+
```
79+
**Heads up for the team:** PR #<other_number> also references issue #<issue_number>. Please coordinate to avoid duplicated work.
80+
```
81+
2. This note is **informational only** — it does not change the label outcome. Continue the rest of the review as normal.
82+
83+
If the PR doesn't link an issue, skip this step.
84+
85+
> **CRITICAL:** Do not block or close the PR solely because a duplicate was found. Only flag it so the team or author can decide how to proceed.
86+
87+
### Step 3 — Review Prior Comments
6988

7089
Read the existing comments fetched in Step 1. Identify any previous bot review comments (comments from this automation) that raised issues or made requests.
7190

@@ -78,11 +97,11 @@ For each previously raised issue or remark, determine whether it has been addres
7897

7998
> **CRITICAL:** Do not repeat the full explanation for issues already raised in a previous comment. Keep follow-up reviews concise — assume the contributor has read the prior feedback.
8099
81-
### Step 3 — Check Team Membership
100+
### Step 4 — Check Team Membership
82101

83-
Read `.github/teams.yml`. If the PR author's login appears in the list, they are a **team member****skip steps 3 and 4** entirely and proceed directly to step 5.
102+
Read `.github/teams.yml`. If the PR author's login appears in the list, they are a **team member****skip steps 4 and 5** entirely and proceed directly to step 6.
84103

85-
### Step 3 — Template Compliance (non-team members only)
104+
### Step 5 — Template Compliance (non-team members only)
86105

87106
The PR body must follow `.github/pull_request_template.md`. It requires these sections to be filled in (not left as placeholder text):
88107

@@ -104,7 +123,7 @@ Once you've updated the description, another review will be triggered automatica
104123
Thanks!
105124
```
106125

107-
### Step 4 — Non-Member Checks (skip if team member)
126+
### Step 6 — Non-Member Checks (skip if team member)
108127

109128
**4a. Massive changes:**
110129

@@ -114,15 +133,15 @@ bash scripts/get_linked_issues.sh <pr_number>
114133
```
115134
Check whether any linked issue carries a `help-wanted` label. If not, apply `requires-more` and comment explaining that large contributions should be scoped and pre-approved via an issue first (reference `CONTRIBUTING.md`).
116135

117-
### Step 5 — Fetch Linked Issues
136+
### Step 7 — Fetch Linked Issues
118137

119138
```bash
120139
bash scripts/get_linked_issues.sh <pr_number>
121140
```
122141

123142
Look for closing keywords (`closes`, `fixes`, `resolves` + `#<number>`) in the PR body. Note whether a verified, open issue is linked.
124143

125-
### Step 6 — Determine Contribution Type
144+
### Step 8 — Determine Contribution Type
126145

127146
Inspect the changed file paths and load the relevant reference section:
128147

@@ -134,15 +153,15 @@ Inspect the changed file paths and load the relevant reference section:
134153

135154
For mixed PRs, apply all relevant types.
136155

137-
### Step 7 — Check Conventions
156+
### Step 9 — Check Conventions
138157

139158
Load `reference/conventions.md` and verify the changed files follow Medusa's conventions. Focus on the areas most relevant to the contribution type (e.g., API conventions for code changes, MDX structure for docs changes).
140159

141160
> **CRITICAL — Read full file context:** For every file you intend to flag an issue in, read the **entire file** (not just the diff lines) before raising a concern. A pattern that looks wrong in isolation may be handled correctly later in the file, overridden by a wrapper, or follow an established project convention. Only flag an issue after confirming it is not resolved elsewhere in the file.
142161
143162
> **CRITICAL — Only flag new code:** The diff contains both removed lines (prefixed `-`) and added lines (prefixed `+`). **Only raise issues about added/new lines.** Never request changes to lines that were already modified as part of this PR — the new version of those lines is what matters, not the old one.
144163
145-
### Step 8 — Security Analysis (ALL PRs)
164+
### Step 10 — Security Analysis (ALL PRs)
146165

147166
> **CRITICAL:** This step applies to **all PRs**, including team members. Read the actual diff — do not rely only on file path inspection. Before flagging any issue, read the full file to confirm the concern is not already handled elsewhere. Only flag issues present in the new (added) lines of the diff, not in lines that were removed or already changed by this PR.
148167
@@ -187,7 +206,7 @@ For each confirmed or suspected security issue:
187206

188207
Security issues are always **blocking** — apply `requires-more` even if everything else looks good. Load `reference/comment-guidelines.md` for the Security Issues comment format.
189208

190-
### Step 9 — Performance Analysis (ALL PRs)
209+
### Step 11 — Performance Analysis (ALL PRs)
191210

192211
> **CRITICAL:** This step applies to **all PRs**. Only flag issues that would plausibly cause measurable degradation in production — not theoretical micro-optimizations. Before flagging, read the full file to confirm the issue is not already handled elsewhere. Only flag issues in the new (added) lines of the diff.
193212
@@ -218,7 +237,7 @@ Performance issues severity:
218237
- **Blocking (requires-more):** N+1 queries, unbounded queries on large tables, missing pagination on list endpoints
219238
- **Non-blocking (note only):** Suggestions that are improvements but don't introduce clear production risk
220239

221-
### Step 10 — Bug Detection (ALL PRs)
240+
### Step 12 — Bug Detection (ALL PRs)
222241

223242
> **CRITICAL:** This step applies to **all PRs** including team members. Any potential bug — confirmed or suspected — is a **required change** and must result in `requires-more`. Do not leave bugs as notes.
224243
@@ -247,7 +266,7 @@ For each potential bug found:
247266

248267
> Do NOT flag style issues, code smell, or naming preferences here. Only flag things that would plausibly cause incorrect behaviour at runtime. If you're uncertain, phrase it as a question but still add it to **Required changes** — it is the author's responsibility to confirm or disprove it.
249268
250-
### Step 11 — Contextual Assessment
269+
### Step 13 — Contextual Assessment
251270

252271
Before writing the review, assess whether the changes make sense in the broader context of the PR. Load `reference/comment-guidelines.md` (Contextual Assessment section) for the full checklist. Key questions:
253272

@@ -258,7 +277,7 @@ Before writing the review, assess whether the changes make sense in the broader
258277

259278
Note any concerns to include in the review comment.
260279

261-
### Step 12 — Compose and Post Review
280+
### Step 14 — Compose and Post Review
262281

263282
Load `reference/comment-guidelines.md` for comment templates and tone guidance.
264283

@@ -290,6 +309,7 @@ bash scripts/labels.sh <pr_number> remove initial-approval
290309

291310
- [ ] Checking template compliance for team members — skip for team members
292311
- [ ] Being vague about required changes — always list exactly what needs to change and why
312+
- [ ] Approving a PR that changes behavior documented as intentional — always check the docs when a PR modifies existing behavior; if the docs describe it as by design, flag it as `requires-more`
293313
- [ ] Closing a PR without a clear explanation
294314
- [ ] Forgetting the docs-ui test requirement for `www/packages/docs-ui/` changes
295315
- [ ] Skipping the integration test check for API route changes in `packages/medusa/src/api/`
@@ -304,6 +324,8 @@ bash scripts/labels.sh <pr_number> remove initial-approval
304324
- [ ] Requesting a change that the PR already makes — verify the current state of the code, not the old state
305325
- [ ] Not mentioning the PR author in the review comment — always `@mention` the author
306326
- [ ] Leaving both `initial-approval` and `requires-more` on a PR — always remove the opposite label when adding one
327+
- [ ] Skipping the duplicate PR check — always check for other open PRs linked to the same issue
328+
- [ ] Blocking or closing a PR solely because a duplicate was found — flag it as an informational note only
307329

308330
## Reference Files
309331

.claude/skills/reviewing-prs/reference/comment-guidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Before composing the review, assess whether the changes make sense in the broade
8484
8585
**Ask yourself:**
8686
87+
- **Is the behavior being changed intentional and documented?** If the PR modifies existing behavior, check whether that behavior is described as by design in the official Medusa documentation (`www/apps/book/app/learn/`). If the docs explicitly describe the current behavior as intentional, the PR is changing intended behavior and must be flagged as `requires-more`. Explain that the behavior is by design and reference the documentation section. This is a **blocking** concern — do not apply `initial-approval`.
8788
- **Does it make sense?** Does the implementation actually solve the problem described in the PR or linked issue? Is the approach reasonable, or is there a simpler/safer way?
8889
- **Are there unintended side effects?** Could the change break or alter behaviour in other areas of the codebase? For example: shared utilities, middleware, event handlers, or widely-used types.
8990
- **Is the scope right?** Does the PR do more or less than what the linked issue asks for? Extra unrelated changes are a flag.

.claude/skills/triaging-issues/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Whenever linking to Medusa docs in a comment, load `reference/doc-links.md` to c
178178

179179
- [ ] Triaging a comment that is just an ongoing user conversation — exit early instead
180180
- [ ] Categorizing based on comments instead of the original issue body
181+
- [ ] Confirming a bug without first checking the documentation — always check if the behavior is documented as intentional before treating it as a bug
181182
- [ ] Closing an issue without leaving a comment explaining why
182183
- [ ] Adding `good-first-issue` or `help-wanted` before confirming the bug in the codebase
183184
- [ ] Skipping the docs/codebase check for feature requests

0 commit comments

Comments
 (0)