-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add sanity check on release notes content #771
Add sanity check on release notes content #771
Conversation
b6d60bc
to
af06104
Compare
35afc5f
to
3884f44
Compare
Validate if the PR contains a release note in the form of: - NONE - free text - action required: free text if not then fail the check.
3884f44
to
00817de
Compare
# Validate PR release notes | ||
echo "Going to validate PR ${PR_NUMBER}" | ||
|
||
MATCHES=$(wget -q -O- https://api.github.com/repos/shipwright-io/build/pulls/${PR_NUMBER} | jq '.body | match("(```release-note\r\n(.*|NONE|action required: .*)\r\n```)")') |
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.
technically speaking not the same arcane bash I derived from tekton and landed with at
build/.github/draft_release_notes.sh
Lines 81 to 82 in b56b30f
PR_BODY=$(wget -q -O- https://api.github.com/repos/shipwright-io/build/issues/${PR_NUM:1}) | |
echo $PR_BODY | grep -oPz '(?s)(?<=```release-note..)(.+?)(?=```)' > /dev/null 2>&1 |
but to be fair a) I too diverged slightly from tekton when I constructed this to conform to the slight differences we had in out process, and b) you have added the use of jq
that I removed, and c) they have tweaked their overall script recently, though git blame says the arcane wget/jq/grep magic has not changed for them in 9 months
and there has been talk of switching all this from bash to golang if we get too fed up with things :-)
long winded build up to:
"Unless we encounter discrepancies when cutting release notes next time, and if this passes PR tests, let's go with this , and only iterate further if needed" :-)
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gabemontero The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Fixes #752
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes