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

Disabling BLT commit-msg #2128

Closed
justinlevi opened this issue Oct 12, 2017 · 1 comment
Closed

Disabling BLT commit-msg #2128

justinlevi opened this issue Oct 12, 2017 · 1 comment
Labels
Support A support request

Comments

@justinlevi
Copy link
Contributor

justinlevi commented Oct 12, 2017

When I run this command:

$ `git commit -m "Removing commit msg requirement"`

I get the following output:

Executing .git/hooks/pre-commit...
> validate:phpcs
[ExecStack] /Users/justinwinter/Sites/askwebny/vendor/bin/phpcs
[ExecStack] Running /Users/justinwinter/Sites/askwebny/vendor/bin/phpcs in /Users/justinwinter/Sites/askwebny
........

Time: 102ms; Memory: 7.75Mb

[ExecStack] Done in 0.185s
> validate:twig:files
Linting twig files...
> validate:yaml:files
Linting YAML files...
Your local code has passed git pre-commit validation.
Executing .git/hooks/commit-msg...
Validating commit message syntax...
[error]  Invalid commit message! 
Commit messages must:
* Contain the project prefix followed by a hyphen
* Contain a ticket number followed by a colon and a space
* Be at least 15 characters long and end with a period.
Valid example: BLT-135: Added the new picture field to the article feature.

And I expected this to happen:
The commit happens without phpcs and the commit-msg command running.

I've been trying to follow along with the documentation here:
https://github.com/acquia/blt/blob/f3ca1cf0123d4b6b641e65d54ddad79358009182/readme/extending-blt.md#disabling-a-command

  disable-targets:
    validate:
      phpcs: true
    git:
      commit-msg: true

I have my project.yml setup as:

project:
  machine_name: blt
  prefix: BLT
  human_name: 'BLTed 8'
  profile:
    name: projectname
  local:
    protocol: http
    hostname: 'local.${project.machine_name}.com'
disable-targets:
  validate:
    phpcs: false
  git:
    commit-msg: false
git:
  default_branch: master
  remotes:
    - 'xxx'
drush:
  aliases:
    remote: '${project.machine_name}.test'
    local: self
    ci: self
  default_alias: '${drush.aliases.local}'
modules:
  local:
    enable: [dblog, devel, seckit, views_ui]
    uninstall: [acsf, acquia_connector, shield]
  ci:
    enable: {  }
    uninstall: [acquia_connector, shield]
  dev:
    enable: [acquia_connector, shield]
    uninstall: {  }
  test:
    enable: [acquia_connector, shield]
    uninstall: [devel, views_ui]
  prod:
    enable: [acquia_connector, shield]
    uninstall: [devel, views_ui]

Struggling with how to override this message and/or disable it.

@danepowell danepowell added the Support A support request label Oct 12, 2017
@justinlevi
Copy link
Contributor Author

ok, I was using Tower for my git GUI, which must not get the changes to my project.yml file after I make them.

After making the following changes, I was able to commit via the command line without a commit message or phpcs running.

disable-targets:
  validate:
    phpcs: true
  git:
    commit-msg: true
    pre-commit: true
git:
  pre-commit: false
  commit-msg: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

No branches or pull requests

2 participants