Skip to content

Commit 9180711

Browse files
cliffhallclaude
andcommitted
fix(interface-diff): diff a Release against its own predecessor (#4860)
Copilot round 2 on #4975: taking the latest Release other than the current one picks a newer Release when an older one's run is re-run. Keep only Releases published before this event's Release. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent dd6f08a commit 9180711

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎.github/workflows/everything-mcp-diff.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
BEFORE: ${{ github.event.before }}
112112
INPUT_BASE: ${{ inputs.compare_ref }}
113113
TAG: ${{ github.event.release.tag_name }}
114+
PUBLISHED: ${{ github.event.release.published_at }}
114115
REPO: ${{ github.repository }}
115116
GH_TOKEN: ${{ github.token }}
116117
run: |
@@ -125,13 +126,15 @@ jobs:
125126
else
126127
base=$(git rev-parse HEAD^)
127128
fi ;;
128-
# The previous published Release's tag. Not `git describe`: the
129-
# date-stamped releases tagged commits that never reached main, so
130-
# the nearest ancestor tag is years older than the last release.
129+
# The Release published just before this one (so a re-run of an
130+
# older Release still compares against ITS predecessor). Not
131+
# `git describe`: the date-stamped releases tagged commits that
132+
# never reached main, so the nearest ancestor tag is years older
133+
# than the last release.
131134
release)
132135
base=$(gh release list --repo "$REPO" --exclude-drafts --exclude-pre-releases --limit 50 \
133136
--json tagName,publishedAt \
134-
--jq "map(select(.tagName != \"$TAG\")) | sort_by(.publishedAt) | last | .tagName // empty")
137+
--jq "map(select(.tagName != \"$TAG\" and .publishedAt < \"$PUBLISHED\")) | sort_by(.publishedAt) | last | .tagName // empty")
135138
if [ -z "$base" ]; then echo "no earlier Release to compare against" >&2; exit 1; fi ;;
136139
workflow_dispatch)
137140
if [ -n "$INPUT_BASE" ]; then

0 commit comments

Comments
 (0)