Skip to content
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

Is there a way to disable the commit Message Hook ? #248

Closed
ErwanLeroux opened this issue Jan 15, 2023 · 5 comments
Closed

Is there a way to disable the commit Message Hook ? #248

ErwanLeroux opened this issue Jan 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@ErwanLeroux
Copy link

What would you like to be able to do?

Hello, I'm exploring the integration of this plugin inside one of my projects, and for now, I only want to use a pre commit hook, that part is working, but my commits are rejected because of the commit message hook :)

Is there a way to disable the creation of this hook ?

PS: nice work !

If you have any ideas on how this should be implemented, please tell us here.

Naively I would use something like this

commitMsg {
    disabled = true
}

Is this a feature you are interested in implementing yourself?

Yes

@ErwanLeroux ErwanLeroux added the enhancement New feature or request label Jan 15, 2023
@ErwanLeroux
Copy link
Author

I tried commitMsg {}, that created an empty file .git\hooks\commit-msg but the commit failed with "error: cannot spawn .git/hooks/commit-msg: No such file or directory" as if the empty file was not set with +x right

DanySK added a commit that referenced this issue Dec 10, 2023
@DanySK
Copy link
Owner

DanySK commented Dec 10, 2023

Hi, I tried to reproduce this issue, and I was not able to. Can you provide a minimal reproduction example?

DanySK added a commit that referenced this issue Dec 10, 2023
DanySK added a commit that referenced this issue Dec 10, 2023
DanySK added a commit that referenced this issue Dec 10, 2023
@ErwanLeroux
Copy link
Author

I will be on holiday next week, I can try to do so then.

DanySK added a commit that referenced this issue Dec 10, 2023
@DanySK
Copy link
Owner

DanySK commented Dec 10, 2023

Consider the following options:

  1. If you do not want a commit-msg, just omit that configuration block
  2. although commitMsg { } seems to work on Linux and OSX, it seems to be not to on Windows (sic). Try also commitMsg { from("#!/bin/sh") { "true" } }

DanySK pushed a commit that referenced this issue Dec 21, 2023
## [1.1.17](1.1.16...1.1.17) (2023-12-21)

### Dependency updates

* **core-deps:** update dependency org.jetbrains.kotlin.jvm to v1.9.22 ([4ff7b98](4ff7b98))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.79 ([57b2bfe](57b2bfe))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.80 ([1d858d1](1d858d1))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.81 ([bba4840](bba4840))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.82 ([078c46c](078c46c))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.83 ([cce2b32](cce2b32))
* **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.84 ([80b7f37](80b7f37))
* **deps:** update plugin com.gradle.enterprise to v3.16 ([63e8233](63e8233))
* **deps:** update plugin com.gradle.enterprise to v3.16.1 ([35a24a1](35a24a1))
* **deps:** update plugin gitsemver to v2.0.4 ([04d8611](04d8611))
* **deps:** update plugin gitsemver to v2.0.5 ([fdc7740](fdc7740))
* **deps:** update plugin kotlin-qa to v0.55.2 ([4ba8bc8](4ba8bc8))
* **deps:** update plugin kotlin-qa to v0.56.0 ([7060bab](7060bab))
* **deps:** update plugin kotlin-qa to v0.57.0 ([52bc7b7](52bc7b7))
* **deps:** update plugin org.danilopianini.gradle-pre-commit-git-hooks to v1.1.16 ([d202592](d202592))

### Tests

* add test for issue [#248](#248) ([be4aa6b](be4aa6b))

### Build and continuous integration

* **deps:** update danysk/build-check-deploy-gradle-action action to v2.2.12 ([0f0fd66](0f0fd66))
@DanySK
Copy link
Owner

DanySK commented Jan 23, 2025

Closing as stale. Please reopen if the issue persists and there is a way to reproduce it.

@DanySK DanySK closed this as completed Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants