Skip to content

Commit

Permalink
Merge pull request #16821 from opf/fix/avoid-interpreting-backticks-w…
Browse files Browse the repository at this point in the history
…hen-checking-versions
  • Loading branch information
oliverguenther authored Sep 26, 2024
2 parents 2e092c2 + 984d15f commit 14d75d9
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
pull-requests: write # to comment on the PR

jobs:
check-pr:
version-check:
if: contains(github.event.pull_request.labels.*.name, 'needs review')
runs-on: ubuntu-latest

Expand All @@ -22,22 +22,27 @@ jobs:

- name: Verify linked version matches core version
id: version-check
run: ./script/ci/version_check.sh "${{ github.event.pull_request.body }}"
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: ./script/ci/version_check.sh "$PR_BODY"

- name: Add comment if versions differ
if: steps.version-check.outputs.version_mismatch == 'true'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: version-mismatch-comment
message: |
The provided work package version does not match the core version:
> [!CAUTION]
> The provided work package version does not match the core version
Details:
- Work package URL: ${{ steps.version-check.outputs.wp_url }}
- Work package version: ${{steps.version-check.outputs.wp_version}}
- Core version: ${{steps.version-check.outputs.core_version}}
Please make sure that:
- The work package version OR your pull request target branch is correct
- name: Version check passed
if: steps.version-check.outputs.version_mismatch != 'true'
Expand Down

0 comments on commit 14d75d9

Please sign in to comment.