Skip to content

Pass --git-no-verify info to convention scripts - #54

Merged
ejball merged 2 commits into
Faithlife:masterfrom
TyMick:git-no-verify
Jun 10, 2026
Merged

Pass --git-no-verify info to convention scripts#54
ejball merged 2 commits into
Faithlife:masterfrom
TyMick:git-no-verify

Conversation

@TyMick

@TyMick TyMick commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

I was trying to add Repo Conventions to reading-plan-wizard, and I used --git-no-verify in an attempt to bypass the Commitlint hook there. The first two commits succeeded, but it choked on the third:

$ dnx repo-conventions add LogosBible/AgentConfiguration/common/web --apply --git-no-verify
Added convention path 'LogosBible/AgentConfiguration/common/web' to '.github/conventions.yml'.
Applying 15 conventions...

Convention auto-apply-conventions < coding < web
Added template-updater marker to '.github/conventions.yml'.
Created 1 commit for convention auto-apply-conventions.

Convention gitattributes-lf < coding < web
Creating '.gitattributes' with LF normalization enabled.
⧗   input: Use LF
✖   type may not be empty [type-empty]
✖   scope may not be empty [scope-empty]
✖   subject may not be empty [subject-empty]

✖   found 3 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky - commit-msg script failed (code 1)
Exception: /var/folders/sc/tck259x53hj7_6ryfh4gmhxn5l9k88/T/rc_f9cb9f24/conventions/gitattributes-lf/convention.ps1:36:3
Line |
  36 |          throw $FailureMessage
     |          ~~~~~~~~~~~~~~~~~~~~~
     | Failed to create commit 'Use LF'.
Convention gitattributes-lf failed.

With this change plus Faithlife/CodingGuidelines#70, the gitattributes-lf commits succeed in my local reading-plan-wizard. 🥳

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the executable-convention script input contract so convention scripts can detect when the CLI was run with --git-no-verify and, when they create their own commits/pushes, pass --no-verify to bypass the same hooks RepoConventions bypasses.

Changes:

  • Include a git.noVerify boolean in the JSON input file passed to convention.ps1.
  • Update/extend commit-mode tests to cover the new git.noVerify input and adjust expectations for the expanded JSON payload.
  • Update authoring and CLI reference documentation to describe the new git input contract and expected script behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/RepoConventions.Tests/ConventionExecutionTests.cs Updates the existing script-input test expectation and adds coverage ensuring --git-no-verify flows into script input as git.noVerify.
src/RepoConventions/ConventionRunner.cs Adds git.noVerify to the JSON input file written before invoking convention.ps1.
skills/repo-conventions/references/convention-authoring.md Documents the expanded JSON input contract and how scripts should honor git.noVerify for their own commits/pushes.
skills/repo-conventions/references/cli-reference.md Updates CLI docs to note that --git-no-verify is also exposed to convention scripts via git.noVerify.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TyMick

TyMick commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@ejball, does this need a version bump (dc42bcb) to get published? I assume v1.1.0 would be right for this?

@ejball
ejball merged commit 7f58c06 into Faithlife:master Jun 10, 2026
5 checks passed
@ejball

ejball commented Jun 10, 2026

Copy link
Copy Markdown
Member

It does, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants