Skip to content

Step Summary: include CLI command as a copyable code block (CLI Local Review Phase 1, step 5 of 5)#125

Merged
reuvenharrison merged 1 commit into
mainfrom
feat/step-summary-cli-command
May 28, 2026
Merged

Step Summary: include CLI command as a copyable code block (CLI Local Review Phase 1, step 5 of 5)#125
reuvenharrison merged 1 commit into
mainfrom
feat/step-summary-cli-command

Conversation

@reuvenharrison
Copy link
Copy Markdown
Contributor

Final step of CLI Local Review Phase 1. The free breaking and changelog actions' Step Summary already emit a clickable link to /review?owner=.... This PR adds the CLI command itself as a fenced code block alongside the link, so visitors who recognize the command can copy it directly from the PR's Checks tab and bypass the instruction-page detour.

What changes

Before (the existing emit):

### 📋 [Review & approve these breaking changes](https://www.oasdiff.com/review?owner=...)

After:

### 📋 [Review & approve these breaking changes](https://www.oasdiff.com/review?owner=...)

Or run locally in your clone of `<repo>`:

```bash
oasdiff breaking <base_sha>:<base_file> <head_sha>:<rev_file> --open

GitHub renders the fenced code block with a built-in copy button. The familiar-visitor cohort one-steps the flow; the unfamiliar-visitor cohort still has the link and lands on the instruction page (w3 #245), which hands them the same pre-filled command with explanatory copy.

Same change for the `changelog` action (`oasdiff changelog` instead of `oasdiff breaking`).

## Backward compat

Customers running pinned older versions (e.g. `oasdiff/oasdiff-action/breaking@v0.0.48`) see the old Step Summary, which still works — the link still resolves to the instruction page after w3 #245 ships, and that page hands them the command they would have seen here. No customer is broken by skipping this upgrade.

## Test plan

- [ ] Trigger the breaking action on a test PR with a real breaking change. Check the Step Summary: link + code block both rendered, code block has GitHub's copy button.
- [ ] Copy the command and run in a local clone. Confirm it generates a working `/review/local/[id]` URL.
- [ ] Same for the changelog action.

## Depends on

oasdiff #955 (the `--open` flag the emitted command depends on) — recommended sequence: ship #955 first, then this PR.

Step 5 of cli-local-review.md Phase 1. The breaking and changelog
actions' Step Summary already emits a clickable link to the free
/review instruction page; this adds the CLI command itself as a
fenced code block alongside the link. GitHub renders the code
block with a built-in copy button, so visitors who recognize the
command can copy from the PR's Checks tab and skip the
instruction-page detour entirely.

For the visitor cohort that doesn't recognize the command, the
link is still there and lands them on the instruction page, which
hands them the same pre-filled command with explanatory copy.

The fallback for visitors on older oasdiff-action versions (no
embedded command) is the same instruction page — that's the design
intent that the wall-replacement covers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@reuvenharrison reuvenharrison merged commit e114c74 into main May 28, 2026
58 checks passed
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.

1 participant