Skip to content

Conversation

sangbida
Copy link
Collaborator

@sangbida sangbida commented Aug 21, 2025

Run CI when PR is edited and description contains Changelog. I tested and confirmed this in this PR :)
Changelog-None

@sangbida sangbida force-pushed the retry-ci-with-changelog branch from 9d7d7d9 to c8fa75b Compare August 21, 2025 03:04
@sangbida sangbida marked this pull request as ready for review August 21, 2025 03:05
Imagine you've burned the midnight oil trying to get your feature into this latest release that was due yesterday. Sweat is dripping off your brow, but you're proud, you're finally ready to push all your changes and merge!
.
.
.
Only for Github Gandalf the Grey to go "YOU SHALL NOT PASS". Why? Because you did not add a "Changelog-None" to any of commit messages. So you have to go back and try add a full stop here or a new line there and wait for the CI overlords to bless your PR. :'(

Well now, you can just add a Changelog-None to your PR description and github hopefully will take mercy on you and run your CI workflow again :)
@sangbida sangbida force-pushed the retry-ci-with-changelog branch from c8fa75b to 7ac89dc Compare August 21, 2025 03:14
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 7ac89dc

@rustyrussell rustyrussell enabled auto-merge (rebase) August 21, 2025 03:15
@madelinevibes madelinevibes added this to the v25.09 milestone Aug 21, 2025
@madelinevibes madelinevibes added the Type::Bug An error, flaw, or fault that produces an incorrect or unexpected result label Aug 21, 2025
@endothermicdev
Copy link
Collaborator

This is great!

Bikeshed: Should we make it strictly require Changelog-None vs "Changelog"? It might be a shame to edit it with Changelog-Added only to lose the description in the actual release notes. Either way, being able to kick the CI here is a huge win, so I'm not particular.

@sangbida
Copy link
Collaborator Author

@endothermicdev I believe this change runs in tandem with the Changelog lock check that we already have built into CI which has the stricter check here. So I don't think you could have anything but Changelog-None in your PR description, this change only retry's the CI step and doesn't perform any changelog checks.

      - name: Check changelog
        env:
          PR_DESCRIPTION: "${{ github.event.pull_request.body || '' }}"
          EVENT_NAME: "${{ github.event_name }}"
          BASE_REF: "${{ github.base_ref || 'master' }}"
        run: |
          echo "Event Name: $EVENT_NAME"
          echo "Base Ref: $BASE_REF"
          echo "PR DESCRIPTION: $PR_DESCRIPTION"
          if [ "$EVENT_NAME" = "pull_request" ]; then
            if [[ "$PR_DESCRIPTION" != *"Changelog-None"* && \
                  -z "$(git log origin/$BASE_REF..HEAD --oneline --grep='Changelog-')" && \
                  "$(git rev-parse --abbrev-ref HEAD)" != "$BASE_REF" ]]; then
              echo "::error::'Changelog' entry is missing in all commits, and 'Changelog-None' not specified in the PR description"
              exit 1
            else
              if [[ "$PR_DESCRIPTION" == *"Changelog-None"* ]]; then
                echo "Changelog found in PR description"
              else
                echo "Changelog found in Commit \"$(git log origin/$BASE_REF..HEAD --oneline --grep='Changelog-')\""
              fi
            fi
          else

@madelinevibes madelinevibes modified the milestones: v25.09, v25.12 Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type::Bug An error, flaw, or fault that produces an incorrect or unexpected result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants