-
Notifications
You must be signed in to change notification settings - Fork 85
build: Add github action for PR title validation VSCODE-642 #859
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
.github/workflows/check-pr-title.yml
Outdated
- name: Enforce JIRA ticket in title | ||
uses: realm/ci-actions/title-checker@main | ||
with: | ||
regex: 'VSCODE-[0-9]{1,5}$' |
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.
It happens sometimes that we have tickets in one JIRA project that are touching multiple repos at the same time, should we extend this to allow all three (MONGOSH, COMPASS, VSCODE) or is the expectation now that we're supposed to open separate tickets when this happens?
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.
Yeah, I would vote for flexible behavior when no Jira tickets or multiple tickets are allowed.
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.
Fair enough. I've relaxed the regex to look for something that looks like a JIRA ticket - LMK if that makes sense to you. The exact values I've chosen are somewhat arbitrary - I chose them as {min(projectName.length) - 2, max(projectName.length) + 2}
, but happy to tweak them.
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.
Dependabot PRs won't have a Jira ticket chore(deps): bump the driver group with 2 updates
. Changelog PRs as well chore: update CHANGELOG.md
. Sometimes there are PRs with one line change, e.g. spelling mistakes. Those don't even require approval to be merged, so I don't think a ticket is worth creating in these cases. Could we enforce Jira tickets for feat
and fix
prefixes only?
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.
Enforcing for particular prefix is not super easy, so I figured I'll just skip the Jira ticket check for bot PRs.
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.
What about tiny PRs that do not have a corresponding ticket?
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 can add the no-title-validation
label (or just merge with the check failing).
Description
This adds two validations for the PR titles:
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes