-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Failing workflow instead of comment on missing changelog entry #15409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Ankit Jain <jainankitk@apache.org>
|
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. |
| 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 |
There was a problem hiding this comment.
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.
| exit 1 | |
| echo "::warning title=Missing Changelog::Please add a centry to CHANGES.txt or use skip-changelog label" | |
| exit 0 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
- On the version with warning, I could see it only in the log without any indication on the PR itself - Changelog verifier with warning jainankitk/lucene#3
- The other version clearing failed the specific step which I feel is clearer IMO - Changelog verifier without warning jainankitk/lucene#2
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.
There was a problem hiding this comment.
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>
Description
Fails workflow instead of comment on missing changelog entry to not have numerous comments in the PR.
Fixes #15405