File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ Each **Review** link opens a hosted page with a side-by-side spec diff and **App
158158|---|---|---|---|
159159| `base` | — (required) | Path to the base (old) OpenAPI spec | file path, URL, git ref |
160160| `revision` | — (required) | Path to the revised (new) OpenAPI spec | file path, URL, git ref |
161- | `oasdiff-token` | — (required) | oasdiff API token — [sign up at oasdiff.com](https://oasdiff.com) | — |
161+ | `oasdiff-token` | — (required) | oasdiff API token — [get one at oasdiff.com/pricing ](https://oasdiff.com/pricing ) | — |
162162| `github-token` | `${{ github.token }}` | GitHub token for posting the PR comment; requires `pull-requests : write`, `statuses: write` | — |
163163| `include-path-params` | `false` | Include path parameter names in endpoint matching | `true`, `false` |
164164| `exclude-elements` | `''` | Exclude certain kinds of changes from the output | `endpoints`, `request`, `response` (comma-separated) |
Original file line number Diff line number Diff line change 11FROM tufin/oasdiff:stable
2+ RUN apk add --no-cache jq
23ENV PLATFORM github-action
34COPY entrypoint.sh /entrypoint.sh
45ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -101,6 +101,16 @@ echo "breaking<<$delimiter" >>"$GITHUB_OUTPUT"
101101
102102if [ -n " $breaking_changes " ]; then
103103 write_output " $( echo " $breaking_changes " | head -n 1) " " $breaking_changes "
104+ # Emit upgrade notice pointing to the free review page
105+ urlencode () { printf ' %s' " $1 " | jq -sRr @uri; }
106+ base_path=$( echo " $base " | sed ' s/.*://' )
107+ rev_path=$( echo " $revision " | sed ' s/.*://' )
108+ owner=" ${GITHUB_REPOSITORY%%/* } "
109+ repo=" ${GITHUB_REPOSITORY#*/ } "
110+ head_sha=$( jq -r ' .pull_request.head.sha // empty' " $GITHUB_EVENT_PATH " 2> /dev/null || echo " " )
111+ if [ -z " $head_sha " ]; then head_sha=" $GITHUB_SHA " ; fi
112+ free_review_url=" https://www.oasdiff.com/review?owner=${owner} &repo=${repo} &base_sha=$( urlencode " $GITHUB_BASE_REF " ) &rev_sha=${head_sha} &base_file=$( urlencode " $base_path " ) &rev_file=$( urlencode " $rev_path " ) "
113+ echo " ::notice::📋 Review & approve these breaking changes → ${free_review_url} "
104114else
105115 write_output " No breaking changes"
106116fi
You can’t perform that action at this time.
0 commit comments