git-lint 11.0.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09bc2331e668a1ed5e6851a60926668d1d392f4addd54a49ffed7fba63d78fcd'
4
- data.tar.gz: b5937a91c8e8e100e054ef5209f5eb594c8facbca2fbd974acf637f3a147527d
3
+ metadata.gz: 1a398440d3a796edbf3a4b4d1e93feb848e5ce64b5e7ba5cfdc88125232467f5
4
+ data.tar.gz: 1ffb61ebc1605e237c633325b11421c508e06419e0c93ffa89a7820592177f39
5
5
  SHA512:
6
- metadata.gz: 6219f9cd5dad3b933a99ce75873c2f9bc8142f5cbf03c6886d2351b29fb1575396b2f4ddc0aff045b0cad546fe14419bd34d90dc1b6262a978d9991523e42a2c
7
- data.tar.gz: a98ad6176494113b9eec2cde32f24412f6e4c361e240afed7260c90cc8e50f384f3d3a23a85f49e430566392d26e619d25fc066b5420f893257bd1642d88f009
6
+ metadata.gz: 4bc2132df51e741c9c4b6486d66dc15e3e6939404d0131af907f3c7a4300bed0f649e9afe7ef0a3d38f4576736c0eb74ab2d166340ff9a652f4e6ea3a084fb5e
7
+ data.tar.gz: 6971baf71e978c16005c37b02bc7ff3550e5177b4b630919ae3df7938775d8e5c518ff1107f1aa3c49def405cae42d043a1c150ce886d8585beb9ca568096613
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,4 @@
1
- X�1 {I���r��&ο�me�ok_�ʬig8�ٯ��R�ű��ߩ���H��2�#Los�\��`��������;Ѧ�����%��$���*2x�qψud���2�: �:}y���ɷY�%�%�|�N;}P����4$ ZS]e# ��~�ap��Qz��lM&[_rEva���E�b�����slT�,!��;��.�kB�{��v�郁Q>3��p�:@��Ie�������Ȁ�#}� SL���c���<��lH N��w��,i�D^A���Ŏ�o�ص_L��1
2
-
3
- ��p5�'��v�n1ٿd5���4^t�^'h_}���3F����Yw �2O~! &H���Y�� 'v��N��q�e��~�1L�
1
+ ,X��qBcd��U<��ZT*�q]y djO(� y.{X�p�����}%ϒ��v\(Љ�k9_nN36ltY���bdءX��Q����GN���
2
+ ���7���Sض�\eA���"֒�QE��;k��ܚ� �������:�7���kN�����H�6~��?F
3
+ B�+��8]k���V(vLbag[�>�IP&�SR8�d��P&��û���Q��P��u
4
+ �N�e��%�@˫��x���Q�E���iJ�0��Mx��ń.y[��pe���W���O�W88�X�,��o���8�0�Į4�Wrۅ�\!�2J����������[U��4�O����"]����@މi}���x>���yeek�Ϟ�@ �W�[
data/README.adoc CHANGED
@@ -590,7 +590,7 @@ and provides the missing spec to ensure this doesn't happen again.
590
590
  Ensures a minimum number of lines are present within the commit body. Lines with empty characters
591
591
  (i.e. whitespace, carriage returns, etc.) are considered to be empty.
592
592
 
593
- Automatically ignores _fixup!_ commits as they are not meant to have bodies.
593
+ Automatically ignores _fixup!_ directives because they are not meant to have bodies.
594
594
 
595
595
  ==== Commit Body Tracker Shorthand
596
596
 
@@ -675,7 +675,7 @@ Added documentation
675
675
  Added documentation
676
676
  ....
677
677
 
678
- Automatically ignores _amend!_, _fixup!_, or _squash!_ commit prefixes.
678
+ Automatically ignores _amend!_, _fixup!_, and _squash!_ directives.
679
679
 
680
680
  ==== Commit Subject Length
681
681
 
@@ -690,7 +690,7 @@ lenient than the link:http://tbaggery.com/2008/04/19/a-note-about-git-commit-mes
690
690
  rule] as it gives one the ability to formulate a more descriptive subject line without being too
691
691
  wordy or suffer being word wrapped.
692
692
 
693
- Automatically ignores _fixup!_ or _squash!_ commit prefixes when calculating subject length.
693
+ Automatically ignores _amend!_, _fixup!_, and _squash!_ directives.
694
694
 
695
695
  ==== Commit Subject Prefix
696
696
 
@@ -737,8 +737,7 @@ Each prefix is delimited by a space which is the default setting but can be cust
737
737
  Whatever you choose for a delimiter will not affect Git's special bang prefixes as described in the
738
738
  tip below.
739
739
 
740
- 💡 This analyzer automatically ignores _amend!_, _fixup!_, or _squash!_ commit prefixes when used as
741
- a Git Hook in order to not disturb interactive rebase workflows.
740
+ Automatically ignores _amend!_, _fixup!_, and _squash!_ directives.
742
741
 
743
742
  ==== Commit Subject Suffix
744
743
 
@@ -960,6 +959,8 @@ Milestone: patch
960
959
 
961
960
  This key is mandatory by default which means the key must always be present unless the repository is unpublished (i.e. has no origin). When the repository is unpublished, this gives you the freedom to release your initial version (i.e. 0.0.0) without this trailer. Once published, you'll need the trailer. To make the key optional, set mandatory to `false`.
962
961
 
962
+ Automatically ignores _amend!_, _fixup!_, and _squash!_ directives.
963
+
963
964
  ==== Commit Trailer Milestone Value
964
965
 
965
966
  [options="header"]
data/git-lint.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "git-lint"
5
- spec.version = "11.0.0"
5
+ spec.version = "11.0.1"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/git-lint"
@@ -7,9 +7,7 @@ module Git
7
7
  class CommitTrailerMilestoneKey < Abstract
8
8
  include Dependencies[:git, setting: "trailers.milestone"]
9
9
 
10
- def valid?
11
- optional? && affected_commit_trailers.empty?
12
- end
10
+ def valid? = !mandatory? && affected_commit_trailers.empty?
13
11
 
14
12
  def issue
15
13
  return {} if valid?
@@ -32,13 +30,13 @@ module Git
32
30
 
33
31
  private
34
32
 
35
- def optional?
36
- return true unless mandatory?
33
+ def mandatory?
34
+ return false if commit.directive?
37
35
 
38
- commit.trailers.any? { it.key == setting.name }
39
- end
36
+ missing = commit.trailers.none? { it.key == setting.name }
40
37
 
41
- def mandatory? = settings.commits_trailer_milestone_key_mandatory && git.origin?
38
+ settings.commits_trailer_milestone_key_mandatory && git.origin? && missing
39
+ end
42
40
 
43
41
  def hint_prefix
44
42
  settings.commits_trailer_milestone_key_mandatory ? "Use (manditory)" : "Use"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.0
4
+ version: 11.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
metadata.gz.sig CHANGED
Binary file