Skip to content

Honor git.noVerify from RepoConventions#70

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

Honor git.noVerify from RepoConventions#70
TyMick merged 2 commits into
Faithlife:masterfrom
TyMick:git-no-verify

Conversation

@TyMick

@TyMick TyMick commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Depends on Faithlife/RepoConventions#54.

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 commits executed by RepoConventions itself succeeded, but the first gitattributes-lf commit failed:

$ 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 (on top of Faithlife/RepoConventions#54), 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 updates the gitattributes-lf convention to honor RepoConventions’ --git-no-verify request so that convention-generated commits can bypass local Git hooks (e.g., commitlint/husky), aligning convention behavior with the caller’s intent.

Changes:

  • Added Read-ConventionGitNoVerify helper to read git.noVerify from the RepoConventions input JSON.
  • Updated gitattributes-lf to append --no-verify to git commit when requested.
  • Added Pester coverage validating behavior with and without the hook bypass request.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
conventions/scripts/TestHelpers.ps1 Extends test input generation to include git.noVerify for structured inputs.
conventions/scripts/Helpers.ps1 Adds Read-ConventionGitNoVerify to read the git.noVerify flag from input JSON.
conventions/gitattributes-lf/convention.Tests.ps1 Adds tests covering commit hook bypass and non-bypass scenarios.
conventions/gitattributes-lf/convention.ps1 Uses git.noVerify to conditionally pass --no-verify to commit creation.

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

Comment thread conventions/gitattributes-lf/convention.ps1
@TyMick TyMick enabled auto-merge (rebase) June 10, 2026 16:56
@TyMick TyMick merged commit 2a9e118 into Faithlife:master Jun 10, 2026
4 checks passed
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