Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/verify-changelog-and-set-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ jobs:
echo "Diff:"
if git diff --exit-code --name-only "$BASE_COMMIT" HEAD -- "$CHANGE_LOG_FILE"; then
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?

else
echo "$CHANGE_LOG_FILE contains change log entry. Proceeding with next steps."
fi
Expand Down