-
Notifications
You must be signed in to change notification settings - Fork 295
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
ci(github): commit parity check to use PR title+description #3526
Comments
Increased the scope of this task to also include the fix mentioned here: #3529 (review) |
@petermetz for this, shall we even check if the PR title contains |
@jagpreetsinghsasan What I meant is that we would check both in a way that they are both necessary to match by a certain percentage of string similarity. So you couldn't hack it by providing matching titles but not matching bodies because the outcome would be (pseudocoded) If this is not what your question was about then please provide a specific example so I can understand better. |
Primary Changes --------------- 1. Updated the script to include the check for releases 2. Fixed certain regex and added a new regex for issue/PR references. This is done because the issue numbers tagged in PR message or commit messages are sometime resolved directly and sometimes parsed with the orgname. 3. With the new regex in 2), we can now safely check for parity while including the fixes/depends line, further loosing the parity check, thus reducing false-positives Fixes hyperledger-cacti#3526 Signed-off-by: jagpreetsinghsasan <[email protected]>
Primary Changes --------------- 1. Updated the script to include the check for releases 2. Fixed certain regex and added a new regex for issue/PR references. This is done because the issue numbers tagged in PR message or commit messages are sometime resolved directly and sometimes parsed with the orgname. 3. With the new regex in 2), we can now safely check for parity while including the fixes/depends line, further loosing the parity check, thus reducing false-positives Fixes hyperledger-cacti#3526 Signed-off-by: jagpreetsinghsasan <[email protected]>
Primary Changes --------------- 1. Updated the script to include the check for releases 2. Fixed certain regex and added a new regex for issue/PR references. This is done because the issue numbers tagged in PR message or commit messages are sometime resolved directly and sometimes parsed with the orgname. 3. With the new regex in 2), we can now safely check for parity while including the fixes/depends line, further loosing the parity check, thus reducing false-positives Fixes hyperledger-cacti#3526 Signed-off-by: jagpreetsinghsasan <[email protected]>
Primary Changes --------------- 1. Updated the script to include the check for releases 2. Fixed certain regex and added a new regex for issue/PR references. This is done because the issue numbers tagged in PR message or commit messages are sometime resolved directly and sometimes parsed with the orgname. 3. With the new regex in 2), we can now safely check for parity while including the fixes/depends line, further loosing the parity check, thus reducing false-positives Fixes hyperledger-cacti#3526 Signed-off-by: jagpreetsinghsasan <[email protected]>
Primary Changes --------------- 1. Updated the script to include the check for releases 2. Fixed certain regex and added a new regex for issue/PR references. This is done because the issue numbers tagged in PR message or commit messages are sometime resolved directly and sometimes parsed with the orgname. 3. With the new regex in 2), we can now safely check for parity while including the fixes/depends line, further loosing the parity check, thus reducing false-positives Fixes #3526 Signed-off-by: jagpreetsinghsasan <[email protected]>
Description
Right now the commit subject line is included in the parity check but not the PR title.
The way GitHub generates the PR title is that it takes the subject line of the first commit and uses that as the title.
The rest of the commit (the commit body) is used for the PR description.
Right now the parity check compares $PR_DESCRIPTION vs. COMMIT_MESSAGE(SUBJECT+BODY).
The comparison should be two-fold instead:
As an example/reference see the pull request Peter has just submitted where the parity check fails like this:
The edge case being that the commit message body is empty (because release commits are self-explanatory anyway) and so the similarity index of PR description vs commit message body+subject gets over the threshold since the PR description is also empty (correctly mimicking the empty commit message body).
PR Link: #3525
Screenshot:

cc: @jagpreetsinghsasan
Acceptance Criteria
The text was updated successfully, but these errors were encountered: