From a7483dc3cef4c5d0544a94129202c66de6701eaf Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 8 Jul 2026 15:52:44 +0200 Subject: [PATCH 1/2] ci: fold oasdiff summary and review link into one PR comment Keep the oasdiff.com upload (review: true) for the side-by-side review, but suppress the action's standalone link-only comment (github-token: "") and instead post a single sticky comment that carries the changelog inline in a collapsed
plus the review link (from the review_url output). Codecov-style: the diff summary is visible on the PR without leaving GitHub, and the full side-by-side review is one click away. --- .github/workflows/api-spec.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/api-spec.yml b/.github/workflows/api-spec.yml index 2ee1d8b..8204cf2 100644 --- a/.github/workflows/api-spec.yml +++ b/.github/workflows/api-spec.yml @@ -98,6 +98,11 @@ jobs: base: .api-spec-tmp/base.yaml revision: .api-spec-tmp/revision.yaml fail-on: ERR + # Upload to oasdiff.com to get a side-by-side review link (exposed as + # the review_url output), but suppress the action's own comment with an + # empty token — we post a single combined comment below. + review: true + github-token: "" - name: Generate changelog id: changelog @@ -108,6 +113,9 @@ jobs: revision: .api-spec-tmp/revision.yaml format: markdown output-to-file: changelog.md + # As above: keep the upload/review_url output, suppress the auto-comment. + review: true + github-token: "" - name: Determine whether the spec changed id: changes @@ -135,12 +143,20 @@ jobs: env: GH_TOKEN: ${{ github.token }} PREV_ID: ${{ steps.prev-comment.outputs.id }} + REVIEW_URL: ${{ steps.changelog.outputs.review_url }} run: | { echo "" echo "## āš ļø API specification — non-breaking changes" echo "" + echo "
API changes" + echo "" cat changelog.md + echo "" + echo "
" + if [ -n "$REVIEW_URL" ]; then + printf '\nšŸ” [View the full side-by-side review](%s)\n' "$REVIEW_URL" + fi } > comment.md if [ -n "$PREV_ID" ]; then jq -Rs '{body: .}' < comment.md \ @@ -154,16 +170,24 @@ jobs: env: GH_TOKEN: ${{ github.token }} PREV_ID: ${{ steps.prev-comment.outputs.id }} + REVIEW_URL: ${{ steps.breaking.outputs.review_url }} run: | { echo "" echo "## šŸ›‘ API specification — breaking changes detected" echo "" if [ -s changelog.md ]; then + echo "
API changes" + echo "" cat changelog.md + echo "" + echo "
" else echo "The breaking-changes check flagged incompatible changes. Review the workflow logs for details." fi + if [ -n "$REVIEW_URL" ]; then + printf '\nšŸ” [View the full side-by-side review](%s)\n' "$REVIEW_URL" + fi } > comment.md if [ -n "$PREV_ID" ]; then jq -Rs '{body: .}' < comment.md \ From 9da1a20cb1146a7c2bbb79d3537c3a46190c92f0 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 8 Jul 2026 15:54:09 +0200 Subject: [PATCH 2/2] docs: add CHANGELOG entry for inline API-spec diff comment --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6233cd..24eaa0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [PR-51](https://github.com/itk-dev/event-database-api/pull/51) + Show the API-spec diff summary inline in the PR comment (collapsed) alongside the oasdiff review link - [PR-49](https://github.com/itk-dev/event-database-api/pull/49) Bump oasdiff-action to v0.1.5 in the API-spec workflow - [PR-48](https://github.com/itk-dev/event-database-api/pull/48)