Skip to content

Conversation

@jainankitk
Copy link
Contributor

Description

Fails workflow instead of comment on missing changelog entry to not have numerous comments in the PR.

Fixes #15405

Signed-off-by: Ankit Jain <jainankitk@apache.org>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

@jainankitk jainankitk added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Nov 5, 2025
echo "Change log file:$CHANGE_LOG_FILE does not contains an entry corresponding to changes introduced in PR. Please add a changelog entry."
gh pr comment "$PR_NUMBER" --body "This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR."
exit 0
exit 1
Copy link
Member

Choose a reason for hiding this comment

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

untested: it is just an idea vs failing the workflow.

Suggested change
exit 1
echo "::warning title=Missing Changelog::Please add a centry to CHANGES.txt or use skip-changelog label"
exit 0

https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-a-warning-message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I am slightly confused. Wouldn't this warning message get logged into the github workflow log? We should still fail the workflow, so that the committer is reminded that PR is missing changelog entry. They can then chose to:

  • Ignore the failure and merge the PR
  • Add skip-changelog label, let the workflow succeed and merge the PR
  • Get changelog entry added before merging the PR

Copy link
Member

Choose a reason for hiding this comment

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

You'll see the warning though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I tried both the versions by raising couple of PRs on my fork:

Hence, my preference is still the latter. Although, we should log the message with error annotation before failing the workflow. Please let me know what you think about that.

Copy link
Member

Choose a reason for hiding this comment

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

Just merge it. I wasn't trying to slow you down, just throw out ideas.

Signed-off-by: Ankit Jain <jainankitk@apache.org>
@jainankitk jainankitk merged commit 2bae327 into apache:main Nov 11, 2025
15 checks passed
@jainankitk jainankitk deleted the update-change branch November 11, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for changelog entry is bit aggressive

2 participants