diff --git a/.agents/skills/deploy/SKILL.md b/.agents/skills/deploy/SKILL.md index d10a6e1..9aea92c 100644 --- a/.agents/skills/deploy/SKILL.md +++ b/.agents/skills/deploy/SKILL.md @@ -39,8 +39,11 @@ Find the latest version tag (`git describe --tags --abbrev=0`; if none, note thi Show the merge commits (and their PRs) since the last tag. The range depends on the mode: +Fetch `main` first — Step 1 only synced the deploy branch, so the local `main` ref may lag `origin/main`. Comparing against a stale local `main` over-reports the release (it re-lists already-promoted PRs and already-closed issues). Compute the range against the freshly-fetched remote ref: + ```bash -git log main.. --merges --pretty=format:"%s" +git fetch origin main +git log origin/main.. --merges --pretty=format:"%s" ``` Merge-commit subjects have the form `Merge pull request #N from branch/name` — parse the PR numbers, then retrieve each body with `gh pr view --json number,title,body`. @@ -173,4 +176,4 @@ Note the release URL from the output. ## Step 8 — Report Tell the user: "Released vX.Y.Z. Linked issues are closed. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.claude/commands/deploy.md b/.claude/commands/deploy.md index dcc543c..288e16f 100644 --- a/.claude/commands/deploy.md +++ b/.claude/commands/deploy.md @@ -34,8 +34,11 @@ Find the latest version tag (`git describe --tags --abbrev=0`; if none, note thi Show the merge commits (and their PRs) since the last tag. The range depends on the mode: +Fetch `main` first — Step 1 only synced the deploy branch, so the local `main` ref may lag `origin/main`. Comparing against a stale local `main` over-reports the release (it re-lists already-promoted PRs and already-closed issues). Compute the range against the freshly-fetched remote ref: + ```bash -git log main.. --merges --pretty=format:"%s" +git fetch origin main +git log origin/main.. --merges --pretty=format:"%s" ``` Merge-commit subjects have the form `Merge pull request #N from branch/name` — parse the PR numbers, then retrieve each body with `gh pr view --json number,title,body`. @@ -168,4 +171,4 @@ Note the release URL from the output. ## Step 8 — Report Tell the user: "Released vX.Y.Z. Linked issues are closed. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.cursor/rules/deploy.mdc b/.cursor/rules/deploy.mdc index bf054a3..afd5f70 100644 --- a/.cursor/rules/deploy.mdc +++ b/.cursor/rules/deploy.mdc @@ -40,8 +40,11 @@ Find the latest version tag (`git describe --tags --abbrev=0`; if none, note thi Show the merge commits (and their PRs) since the last tag. The range depends on the mode: +Fetch `main` first — Step 1 only synced the deploy branch, so the local `main` ref may lag `origin/main`. Comparing against a stale local `main` over-reports the release (it re-lists already-promoted PRs and already-closed issues). Compute the range against the freshly-fetched remote ref: + ```bash -git log main.. --merges --pretty=format:"%s" +git fetch origin main +git log origin/main.. --merges --pretty=format:"%s" ``` Merge-commit subjects have the form `Merge pull request #N from branch/name` — parse the PR numbers, then retrieve each body with `gh pr view --json number,title,body`. @@ -174,4 +177,4 @@ Note the release URL from the output. ## Step 8 — Report Tell the user: "Released vX.Y.Z. Linked issues are closed. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.gemini/skills/deploy/SKILL.md b/.gemini/skills/deploy/SKILL.md index 31f1826..9ea7df2 100644 --- a/.gemini/skills/deploy/SKILL.md +++ b/.gemini/skills/deploy/SKILL.md @@ -39,8 +39,11 @@ Find the latest version tag (`git describe --tags --abbrev=0`; if none, note thi Show the merge commits (and their PRs) since the last tag. The range depends on the mode: +Fetch `main` first — Step 1 only synced the deploy branch, so the local `main` ref may lag `origin/main`. Comparing against a stale local `main` over-reports the release (it re-lists already-promoted PRs and already-closed issues). Compute the range against the freshly-fetched remote ref: + ```bash -git log main.. --merges --pretty=format:"%s" +git fetch origin main +git log origin/main.. --merges --pretty=format:"%s" ``` Merge-commit subjects have the form `Merge pull request #N from branch/name` — parse the PR numbers, then retrieve each body with `gh pr view --json number,title,body`. @@ -173,4 +176,4 @@ Note the release URL from the output. ## Step 8 — Report Tell the user: "Released vX.Y.Z. Linked issues are closed. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/skills/github-agile/deploy.md b/skills/github-agile/deploy.md index f596e60..c2b7b58 100644 --- a/skills/github-agile/deploy.md +++ b/skills/github-agile/deploy.md @@ -53,8 +53,11 @@ git log ..HEAD --merges --pretty=format:"%s" ``` {{/if}} {{#if BRANCH_DEV}} +Fetch `{{BRANCH_PROD}}` first — Step 1 only synced the deploy branch, so the local `{{BRANCH_PROD}}` ref may lag `origin/{{BRANCH_PROD}}`. Comparing against a stale local `{{BRANCH_PROD}}` over-reports the release (it re-lists already-promoted PRs and already-closed issues). Compute the range against the freshly-fetched remote ref: + ```bash -git log {{BRANCH_PROD}}.. --merges --pretty=format:"%s" +git fetch origin {{BRANCH_PROD}} +git log origin/{{BRANCH_PROD}}.. --merges --pretty=format:"%s" ``` {{#if BRANCH_TEST}} Some merges here may be promotion merges from `{{BRANCH_DEV}}` (subjects matching "Merge ... from `{{BRANCH_DEV}}`"). Include them, but extract the original feature PRs from their PR bodies where possible.