Skip to content

Conversation

@igordmn
Copy link
Collaborator

@igordmn igordmn commented Mar 4, 2025

Fixes https://youtrack.jetbrains.com/issue/CMP-7409/Add-a-CI-check-for-PR-containing-Release-Notes

  • Add a GitHub workflow that checks Release Notes are correctly added. Runs automatically on creation and description change
  • Move the guide into one file from the PR templates
  • Parse categories for the script instead of hardcoding them (to have a single source of truth in the guide)
  • Don't do network requests to avoid rate limit (60 requests per hour), read the description from the workflow variable

Also added to compose-multiplatform-core

Testing

  1. Change Release Notes in this PR
  2. CI successes with correct Release Notes
  3. CI fails with incorrect ones

(Replace RR by R, otherwise the check picks a wrong section, I think no need to write additional logic just for this PR)

Correct N/A:

## RRelease Notes
N/A

Correct change:

## RRelease Notes
### Features - iOS
- Simple feature

Release notes missing:


Title is incorrect:

## RRelease Note
### Features - iOS
- Simple feature

Section isn't standard:

## RRelease Notes
### Features - Compose
- Simple feature

Items are missing:

## RRelease Notes
### Features - iOS

Sections are missing:

## RRelease Notes
- Simple feature

Testing

Tested for injections

  1. For script injection
"; echo QQ > prDescription.txt #
  1. For workflow injection
q
      run: |
        echo "QQ"
  1. Verified that injection into changelog.main.kts isn't possible, as it doesn't execute anything parsed (including links)

Release Notes

N/A

@igordmn igordmn changed the title Check Release Notes GitHub action Check Release Notes GitHub ation Mar 4, 2025
@igordmn igordmn changed the title Check Release Notes GitHub ation Check Release Notes GitHub action Mar 4, 2025
@igordmn igordmn force-pushed the igordmn-patch-7 branch 4 times, most recently from b1d534f to 6e0f9b1 Compare March 5, 2025 00:28
@igordmn igordmn assigned igordmn and unassigned igordmn Mar 5, 2025
@igordmn igordmn changed the title Check Release Notes GitHub action Check Release Notes GitHub workflow Mar 5, 2025
@igordmn igordmn force-pushed the igordmn-patch-7 branch 9 times, most recently from 253de0f to 674af95 Compare March 6, 2025 00:48
@igordmn igordmn marked this pull request as ready for review March 6, 2025 00:54
@igordmn igordmn requested a review from kropp March 6, 2025 00:56
@igordmn igordmn merged commit 06fd8e1 into master Mar 6, 2025
4 of 7 checks passed
@igordmn igordmn deleted the igordmn-patch-7 branch March 6, 2025 13:17
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this pull request Mar 6, 2025
Similar to
[compose-multiplatform](JetBrains/compose-multiplatform#5251)
by reusing workflow from there

## Testing
CI successes with Release Notes, fails without it

## Release Notes
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants