From e622138a6f35db7b925a23eff2db87b71ed416c2 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 1 Mar 2026 21:08:18 +0200 Subject: [PATCH 01/13] demo: API changes with pr-comment workflow - Remove 400 response from POST /api/v1.0/groups - Remove pattern constraint from 'created' field - Add 'description' property to GroupView - Add GET /api/v1.0/groups/{groupId} endpoint - Add pr-comment workflow to demonstrate oasdiff PR comment --- .github/workflows/pr-comment.yml | 30 ++++++++++++++++++++++++++++++ simple.yaml | 20 +++++++++++++++----- 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pr-comment.yml diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml new file mode 100644 index 0000000..68b4f59 --- /dev/null +++ b/.github/workflows/pr-comment.yml @@ -0,0 +1,30 @@ +name: oasdiff PR comment + +on: + pull_request: + +permissions: + contents: read + pull-requests: write + +jobs: + pr-comment: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Get prev commit + run: echo "PREV_COMMIT=$(git --no-pager log --skip=1 --max-count=1 | grep commit | cut -d' ' -f2)" >> $GITHUB_ENV + + - name: Get prev file + run: echo "PREV_FILE=$(echo https://raw.githubusercontent.com/oasdiff/github-demo/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV + + - name: Post oasdiff PR comment + uses: oasdiff/oasdiff-action/pr-comment@main + with: + base: ${{ env.PREV_FILE }} + revision: simple.yaml + oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621 diff --git a/simple.yaml b/simple.yaml index b635d93..f25abf1 100644 --- a/simple.yaml +++ b/simple.yaml @@ -1,7 +1,7 @@ openapi: 3.0.1 info: title: Tufin - version: "3.0" + version: "4.0" servers: - url: https://localhost:8080 components: @@ -23,12 +23,13 @@ components: type: string format: date-time readOnly: true - pattern: "^[a-z]+$" id: type: string readOnly: true name: type: string + description: + type: string required: - name paths: @@ -51,10 +52,19 @@ paths: schema: $ref: '#/components/schemas/GroupView' description: SUCCESS - "400": + summary: Create a Project + /api/v1.0/groups/{groupId}: + get: + tags: + - Group + operationId: getOneGroup + parameters: + - $ref: '#/components/parameters/groupId' + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/GroupView' - description: Conflict - summary: Create a Project + description: SUCCESS + summary: Get a Project From b27527fe7598514f5a02713fb684f3c22ead7f70 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 1 Mar 2026 21:43:07 +0200 Subject: [PATCH 02/13] retrigger workflow From 36a5910de0cb5c9d8007df19a719082af86e1410 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 1 Mar 2026 21:44:42 +0200 Subject: [PATCH 03/13] fix: compare against base branch instead of previous commit --- .github/workflows/pr-comment.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 68b4f59..ed88fb6 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -13,18 +13,10 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - name: Get prev commit - run: echo "PREV_COMMIT=$(git --no-pager log --skip=1 --max-count=1 | grep commit | cut -d' ' -f2)" >> $GITHUB_ENV - - - name: Get prev file - run: echo "PREV_FILE=$(echo https://raw.githubusercontent.com/oasdiff/github-demo/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV - name: Post oasdiff PR comment uses: oasdiff/oasdiff-action/pr-comment@main with: - base: ${{ env.PREV_FILE }} + base: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.base_ref }}/simple.yaml revision: simple.yaml oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621 From b0601c0f49a2469c94dea46ba3a72627a03ff54e Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 1 Mar 2026 21:50:35 +0200 Subject: [PATCH 04/13] retrigger: test base branch links From bc44ba4eada8379ff4e6959fd492f4f4d688d500 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 1 Mar 2026 21:54:19 +0200 Subject: [PATCH 05/13] retrigger: test base branch links after deploy From aac2d97c9182a7eff2f8293e0e9886d9cba9068b Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 23:02:27 +0200 Subject: [PATCH 06/13] test: point pr-comment action at test service on phase3-action-payload branch Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/pr-comment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index ed88fb6..655412b 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -15,8 +15,9 @@ jobs: uses: actions/checkout@v4 - name: Post oasdiff PR comment - uses: oasdiff/oasdiff-action/pr-comment@main + uses: oasdiff/oasdiff-action/pr-comment@phase3-action-payload with: base: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.base_ref }}/simple.yaml revision: simple.yaml oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621 + service-url: https://oasdiff-service-test-806047195315.us-central1.run.app From 90c73371f6ca32d533fa9974027d998b233a2914 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 23:13:43 +0200 Subject: [PATCH 07/13] test: make id required in GroupView to trigger breaking change --- simple.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/simple.yaml b/simple.yaml index f25abf1..f2e10ee 100644 --- a/simple.yaml +++ b/simple.yaml @@ -32,6 +32,7 @@ components: type: string required: - name + - id paths: /api/v1.0/groups: post: From 97b8c6d8a54a0ac252162042cbf3a52aa3f1669f Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 23:17:52 +0200 Subject: [PATCH 08/13] test: make groupId required to trigger breaking change --- simple.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simple.yaml b/simple.yaml index f2e10ee..2eb8ffb 100644 --- a/simple.yaml +++ b/simple.yaml @@ -9,7 +9,7 @@ components: groupId: in: query name: groupId - required: false + required: true schema: type: string schemas: @@ -32,7 +32,6 @@ components: type: string required: - name - - id paths: /api/v1.0/groups: post: From c0ab3bcc5bb4fce1f9c8082294d4169f76fa0df0 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 23:19:05 +0200 Subject: [PATCH 09/13] Update API version in simple.yaml --- simple.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple.yaml b/simple.yaml index 2eb8ffb..3f50094 100644 --- a/simple.yaml +++ b/simple.yaml @@ -33,7 +33,7 @@ components: required: - name paths: - /api/v1.0/groups: + /api/v1.1/groups: post: tags: - Group From 9671293e0472d8b44b51b54834db0bf30d6ecaf0 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 23:26:51 +0200 Subject: [PATCH 10/13] test: remove 200 response from POST to trigger breaking change --- simple.yaml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/simple.yaml b/simple.yaml index 3f50094..6adf21e 100644 --- a/simple.yaml +++ b/simple.yaml @@ -46,25 +46,10 @@ paths: description: Creates one project. required: true responses: - "200": + "201": content: application/json: schema: $ref: '#/components/schemas/GroupView' - description: SUCCESS + description: Created summary: Create a Project - /api/v1.0/groups/{groupId}: - get: - tags: - - Group - operationId: getOneGroup - parameters: - - $ref: '#/components/parameters/groupId' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GroupView' - description: SUCCESS - summary: Get a Project From d07835ffa9eed8caaa1806aa63d0c3830128de2e Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Thu, 19 Mar 2026 09:30:22 +0200 Subject: [PATCH 11/13] Update API version from v1.1 to v1.2 --- simple.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple.yaml b/simple.yaml index 6adf21e..9ae906c 100644 --- a/simple.yaml +++ b/simple.yaml @@ -33,7 +33,7 @@ components: required: - name paths: - /api/v1.1/groups: + /api/v1.2/groups: post: tags: - Group From 823d8a3b84aa20e0c4b6d02d9cb7541f0e1a14b6 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Thu, 19 Mar 2026 14:07:02 +0200 Subject: [PATCH 12/13] chore: revert test changes, point workflow at v0.0.33 production service - Revert simple.yaml to clean state (remove test breaking changes) - Switch action from @phase3-action-payload to @v0.0.33 - Remove service-url override (now uses production api.oasdiff.com) Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/pr-comment.yml | 3 +-- simple.yaml | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 655412b..38ce820 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -15,9 +15,8 @@ jobs: uses: actions/checkout@v4 - name: Post oasdiff PR comment - uses: oasdiff/oasdiff-action/pr-comment@phase3-action-payload + uses: oasdiff/oasdiff-action/pr-comment@v0.0.33 with: base: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.base_ref }}/simple.yaml revision: simple.yaml oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621 - service-url: https://oasdiff-service-test-806047195315.us-central1.run.app diff --git a/simple.yaml b/simple.yaml index 9ae906c..4b00e1f 100644 --- a/simple.yaml +++ b/simple.yaml @@ -46,10 +46,25 @@ paths: description: Creates one project. required: true responses: - "201": + "200": content: application/json: schema: $ref: '#/components/schemas/GroupView' - description: Created + description: SUCCESS summary: Create a Project + /api/v1.0/groups/{groupId}: + get: + tags: + - Group + operationId: getOneGroup + parameters: + - $ref: '#/components/parameters/groupId' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroupView' + description: SUCCESS + summary: Get a Project From 5098c4a9d6b08890c531e386795994deccdd45d4 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Thu, 19 Mar 2026 15:51:19 +0200 Subject: [PATCH 13/13] fix: add statuses: write permission for commit status check --- .github/workflows/pr-comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 38ce820..94bb085 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -6,6 +6,7 @@ on: permissions: contents: read pull-requests: write + statuses: write jobs: pr-comment: