Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ jobs:
contents: read
with:
repo: core
secrets: inherit

24 changes: 18 additions & 6 deletions .github/workflows/pr-quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ env:
WARN_MAJOR_UPDATE_MESSAGE: "⚠️ **Major version bump**\nThe changelog type `changed` or `removed` was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the `fixed` or `added` type instead."

jobs:
check:
name: Check PR
check_changelog:
name: Check PR changelog
runs-on: ubuntu-22.04
outputs:
major_bump_fragments: ${{ steps.changes.outputs.major_bump_fragments }}

permissions:
pull-requests: write # For the "Comment" step, read for the "Fetch script" and "Check changelog" steps
contents: read # For the "Fetch diff" and "Check changelog" steps
pull-requests: read
contents: read

steps:
# Uncomment for testing purposes
Expand Down Expand Up @@ -74,16 +76,26 @@ jobs:
- '*/changelog.d/*.removed'
- '*/changelog.d/*.major'

comment_for_changelog:
name: Comment for PR changelog
needs: check_changelog
runs-on: ubuntu-22.04

permissions:
pull-requests: write
contents: read

steps:
- name: Check for major version bump comment
if: ${{ steps.changes.outputs.major_bump_fragments == 'true' }}
if: ${{ needs.check_changelog.outputs.major_bump_fragments == 'true' }}
id: find_comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: ${{ env.WARN_MAJOR_UPDATE_MESSAGE }}

- name: Comment
if: ${{ steps.changes.outputs.major_bump_fragments == 'true' && steps.find_comment.outputs.comment-id == '' }}
if: ${{ needs.check_changelog.outputs.major_bump_fragments == 'true' && steps.find_comment.outputs.comment-id == '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
Expand Down
Loading