pull_request_templates 0.3.0.pre.2 → 0.3.0

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: 9038ada19f6b753fe0c7bdde625a38ddf76aa4b91a64dd0761b55223e0d04c6e
4
- data.tar.gz: 7ed0febfb2172bb9b65f79a205f3d2685c3846e876a91cdb1f59233b7e00758c
3
+ metadata.gz: 95ddd43a03464906a1436dab7a0167817113bf43fe5d8c59c53fb7b8658da2f1
4
+ data.tar.gz: 7f385ff70f9be681072eaa3c5b52e6290a8edc6c902dc2ae41ecaae7201fdcce
5
5
  SHA512:
6
- metadata.gz: 1a6526cd5bfb2dbb0d5f9f46c3d7baf9ac3f1b5b5d0448f2c757077caaa8d3ada57348d3249a288d0be088c77213a3d0532b30e947c5b33603ad1a44191e8bad
7
- data.tar.gz: ed7973df8bc2125fd0b29600a102378c52b94d2f7bb66a6e9d321f64a4cb3b50db93603a36e950ba6cd853cd9d4a2f4627aa706462058e61fbcaab2131b3b34d
6
+ metadata.gz: 6b914f1efe7ee44d378c53a2468de2283914d7e4a125f4079bb7408963a633e2dc8284544bff47a6b9b26921b9b5f951f0b64b4ba8ebd89182a17a2c60445228
7
+ data.tar.gz: d60ea637488d20978570ecefaee4c4da01ea6fcdc7e91c3b2b6ca2a1088d0715617e3deb9d96fdef6a35177b811f1dbacba78ea5c5a2e74e43f8cbd6ff0dc844
@@ -62,7 +62,7 @@ module PullRequestTemplates
62
62
  templates.each do |template|
63
63
  patterns = template.fetch("pattern")
64
64
  Array(patterns).each do |pattern|
65
- matches[template] << file if File.fnmatch(pattern, file, File::FNM_PATHNAME | File::FNM_EXTGLOB)
65
+ matches[template] << file if File.fnmatch(pattern, file, File::FNM_PATHNAME | File::FNM_EXTGLOB | File::Constants::FNM_DOTMATCH)
66
66
  end
67
67
  end
68
68
  end
@@ -71,7 +71,7 @@ module PullRequestTemplates
71
71
  end
72
72
  candidates = template_files.map { {"file" => _1} } if candidates.empty?
73
73
 
74
- # If we have a default template with catch-all pattern, use it when multiple templates match
74
+ # If we have a template with fallback: true, use it when multiple templates match
75
75
  if candidates.length > 1
76
76
  fallback = candidates.find { _1.fetch("fallback", false) }
77
77
  return fallback.fetch("file") if fallback
@@ -88,7 +88,7 @@ module PullRequestTemplates
88
88
 
89
89
  To resolve this, add a fallback template to your config.yml:
90
90
  - file: default.md
91
- pattern: "**"
91
+ pattern: "**/*"
92
92
  fallback: true
93
93
  MESSAGE
94
94
  else
@@ -98,13 +98,13 @@ module PullRequestTemplates
98
98
 
99
99
  To resolve this, add a fallback template to your config.yml:
100
100
  - file: default.md
101
- pattern: "**"
101
+ pattern: "**/*"
102
102
  fallback: true
103
103
 
104
104
  Run this command to create the fallback template:
105
105
  echo 'templates:
106
106
  - file: default.md
107
- pattern: "**"
107
+ pattern: "**/*"
108
108
  fallback: true
109
109
  ' >> .github/PULL_REQUEST_TEMPLATE/config.yml
110
110
  MESSAGE
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PullRequestTemplates
4
- VERSION = "0.3.0.pre.2"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pull_request_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Buxton