Skip to content

Commit 36a5910

Browse files
fix: compare against base branch instead of previous commit
1 parent b27527f commit 36a5910

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

.github/workflows/pr-comment.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@ jobs:
1313
steps:
1414
- name: Check out code
1515
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 2
18-
19-
- name: Get prev commit
20-
run: echo "PREV_COMMIT=$(git --no-pager log --skip=1 --max-count=1 | grep commit | cut -d' ' -f2)" >> $GITHUB_ENV
21-
22-
- name: Get prev file
23-
run: echo "PREV_FILE=$(echo https://raw.githubusercontent.com/oasdiff/github-demo/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV
2416

2517
- name: Post oasdiff PR comment
2618
uses: oasdiff/oasdiff-action/pr-comment@main
2719
with:
28-
base: ${{ env.PREV_FILE }}
20+
base: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.base_ref }}/simple.yaml
2921
revision: simple.yaml
3022
oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621

0 commit comments

Comments
 (0)