[SERVER-45074] Commit queue commit message validation should double check the ticket ID (ticket key) Created: 11/Dec/19 Updated: 29/Oct/23 Resolved: 23/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | James O'Leary |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | DAG 2020-01-13, DAG 2020-01-27 | ||||||||||||
| Participants: | |||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
It is a real pain if you make a commit that has the wrong ticket number prefix - you end up needing to do a bunch of manual work to reconcile the various places things got logged incorrectly to paper over the mistake. Since we are adding validation for commit messages in other ways (formatting, etc.) we should see if it would be possible to also validate against JIRA that the ticket you are nominally committing to makes sense: is open, is assigned to you, etc. |
| Comments |
| Comment by Githook User [ 24/Jan/20 ] | ||||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: Revert " This reverts commit 1da2398abc11189a6d7706cfba12fa71a693e129. | ||||||||||||||
| Comment by James O'Leary [ 24/Jan/20 ] | ||||||||||||||
|
error for '
At the time of writing | ||||||||||||||
| Comment by Githook User [ 23/Jan/20 ] | ||||||||||||||
|
Author: {'username': 'jimmongo', 'name': "Jim O'Leary", 'email': 'jim.oleary@mongodb.com'}Message: | ||||||||||||||
| Comment by David Bradford (Inactive) [ 13/Dec/19 ] | ||||||||||||||
|
Yes, we would need to think through what this would look like for backports. Also, we should consider how this should behave if Jira is unreasonable slow or down. Given that we have no validation for this right now, skipping the check if we cannot access Jira might be acceptable. | ||||||||||||||
| Comment by Eric Milkie [ 13/Dec/19 ] | ||||||||||||||
|
You could amend the validation to check for either the ticket assigned to the commit author, OR, "(cherry picked from" text present in the commit description. | ||||||||||||||
| Comment by Eric Milkie [ 13/Dec/19 ] | ||||||||||||||
|
The "assigned to the commit author" part will be weird with our current backport process. | ||||||||||||||
| Comment by David Bradford (Inactive) [ 13/Dec/19 ] | ||||||||||||||
|
We should validate the following:
|