-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature: lint PR titles #11
Comments
I think Since PS. I think could be 3 states. 1) ok, no suggestion, 2) ok, improvement suggestion and 3) fail, suggestion. Not sure how we should handle this either via additional flags or output/exit codes. |
The tool is really for commit messages and not PR titles, but in the case of Coder development where they're one and the same due to squash merges the difference doesn't matter. For the simplicity of this tool's scope I believe the command line should indicate it's checking / linting a commit message and not a PR title. I was also trying to avoid subcommands, so I think the best approach would be something like:
with the exit status determining success. Potential success outputs could be:
and, failure:
The checkboxes could be sent via stderr with only the raw suggestion on stdout for composability. Using this tool to do both generation and linting means we can re-use the COMMITS.md style guide, which is nice. |
The reason I suggested
In the slack thread @mafredri suggested a configurable output format to support JSON, but I guess it depends on the CI integration.
Yup, that's the plan 👍 . |
Right now the CLI has leaned into flags all the way. If there's a point where subcommands make more sense I would rather do a major overhaul / breaking change to the CLI and convert many flags at once to commands.
I'm game with that |
Problem Statement
Sometimes community users forget about adjusting the PR title (and merge commit) to the style guide of the Git repository.
aicommit
already uses the GPT model to adjust wording of particular commits, but not the PR title.Proposal
Let's introduce
aicommit lint
command which can validate the proposed PR title. The command can be executed as Github Action and fail CI job if the PR does not meet style guide requirements.Proposed Workflow
Command:
aicommit lint --pr-title "fix: set dogfood go version to match go.mod"
The text was updated successfully, but these errors were encountered: