Skip to content

oasdiff diff and check-breaking actions - #1

Merged
effoeffi merged 10 commits into
mainfrom
init
May 14, 2023
Merged

oasdiff diff and check-breaking actions#1
effoeffi merged 10 commits into
mainfrom
init

Conversation

@effoeffi

Copy link
Copy Markdown
Contributor

No description provided.

@effoeffi
effoeffi requested a review from reuvenharrison May 13, 2023 11:23
Comment thread README.md Outdated
```
- name: Running OpenAPI Spec diff action
id: test_ete
uses: ./check-breaking

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be full path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread README.md Outdated
```
- name: Running OpenAPI Spec diff action
id: test_ete
uses: ./diff

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be full path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@effoeffi
effoeffi merged commit 2625a3b into main May 14, 2023
@effoeffi
effoeffi deleted the init branch May 14, 2023 09:12
reuvenharrison added a commit that referenced this pull request May 21, 2026
The free /review URL emitted by every entrypoint used $GITHUB_BASE_REF
(the branch name, e.g. "main") in the base_sha query parameter. That's
mutable: once the base branch advances past the commit the action ran
against — for example, when a downstream PR renames or moves the spec
file on main — every previously-emitted /review URL silently breaks.
raw.githubusercontent.com resolves the branch to whatever the current
HEAD is, not what HEAD was when CI ran. The rev_sha parameter was
always pinned to the immutable head commit, but base_sha wasn't,
leaving the base side of every URL exposed to drift.

Switch all three URL-emitting entrypoints (breaking, changelog,
pr-comment) to a three-tier fallback for base_sha:

  1. pull_request.base.sha from $GITHUB_EVENT_PATH (the canonical
     value for pull_request triggers)
  2. git rev-parse origin/$GITHUB_BASE_REF (works on push triggers
     where the base branch was fetched into the workspace)
  3. $GITHUB_BASE_REF as the ultimate fallback (today's behavior,
     so this is a strict superset of the current contract)

The pr-comment entrypoint already used pattern #1 with #3 as fallback;
this commit adds #2 to its chain so push triggers also get an
immutable SHA whenever possible. breaking and changelog gain the
whole chain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants