dependabot-common 0.112.21 → 0.112.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/pull_request_creator/branch_namer.rb +5 -2
- data/lib/dependabot/pull_request_creator/message_builder/issue_linker.rb +13 -2
- data/lib/dependabot/pull_request_creator/message_builder/link_and_mention_sanitizer.rb +4 -2
- data/lib/dependabot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0cc3dacc3f64a8b5bd86bd99017e5f43fe3494445c01eefa4409975bbe28a2
|
4
|
+
data.tar.gz: '08272b00ef4c7a12428fe475eb296a7c5790cf1cdbbdc8c11aae7feeca9d4b4a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8714dbcbd7858505ea3c23942f93e27c1991fb575b599c2e6aa8fe692ff1ac3e5d2640edc4b98c33563e49e9387722f7e49ded95e9cbb58a99c962f959aab465
|
7
|
+
data.tar.gz: 8d4f8769368db9659837280b671353a7abbe21587358e840c3d92ac63af7346abfcf87e8ffd0ce5ddff0e65c6d64cab9b10c24812b4f35a45b6ea8d57faff39f
|
@@ -43,7 +43,9 @@ module Dependabot
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
branch_name = File.join(prefixes, @name).
|
46
|
+
branch_name = File.join(prefixes, @name).
|
47
|
+
gsub(%r{/\.}, "/dot-").
|
48
|
+
gsub(%r{/\.}, "/dot-")
|
47
49
|
|
48
50
|
# Some users need branch names without slashes
|
49
51
|
branch_name.gsub("/", separator)
|
@@ -114,7 +116,8 @@ module Dependabot
|
|
114
116
|
gsub(">", "gt-").
|
115
117
|
gsub("<", "lt-").
|
116
118
|
gsub("*", "star").
|
117
|
-
gsub(",", "-and-")
|
119
|
+
gsub(",", "-and-").
|
120
|
+
sub(/\.$/, "")
|
118
121
|
end
|
119
122
|
|
120
123
|
def new_version(dependency)
|
@@ -6,9 +6,13 @@ module Dependabot
|
|
6
6
|
class PullRequestCreator
|
7
7
|
class MessageBuilder
|
8
8
|
class IssueLinker
|
9
|
+
REPO_REGEX = %r{(?<repo>[\w.-]+/(?:(?!\.git|\.\s)[\w.-])+)}.freeze
|
9
10
|
TAG_REGEX = /(?<tag>(?:\#|GH-)\d+)/i.freeze
|
10
11
|
ISSUE_LINK_REGEXS = [
|
11
|
-
/
|
12
|
+
/
|
13
|
+
(?:(?<=[^A-Za-z0-9\[\\]|^)\\*#{TAG_REGEX}(?=[^A-Za-z0-9\-]|$))|
|
14
|
+
(?:(?<=\s|^)#{REPO_REGEX}#{TAG_REGEX}(?=[^A-Za-z0-9\-]|$))
|
15
|
+
/x.freeze,
|
12
16
|
/\[#{TAG_REGEX}\](?=[^A-Za-z0-9\-\(])/.freeze,
|
13
17
|
/\[(?<tag>(?:\#|GH-)?\d+)\]\(\)/i.freeze
|
14
18
|
].freeze
|
@@ -28,7 +32,14 @@ module Dependabot
|
|
28
32
|
match(/(?<tag>(?:\#|GH-)?\d+)/i).
|
29
33
|
named_captures.fetch("tag")
|
30
34
|
number = tag.match(/\d+/).to_s
|
31
|
-
|
35
|
+
|
36
|
+
repo = issue_link.
|
37
|
+
match("#{REPO_REGEX}#{TAG_REGEX}")&.
|
38
|
+
named_captures&.
|
39
|
+
fetch("repo", nil)
|
40
|
+
source = repo ? "https://github.com/#{repo}" : source_url
|
41
|
+
|
42
|
+
"[#{repo ? (repo + tag) : tag}](#{source}/issues/#{number})"
|
32
43
|
end
|
33
44
|
end
|
34
45
|
end
|
@@ -9,7 +9,7 @@ module Dependabot
|
|
9
9
|
GITHUB_USERNAME = /[a-z0-9]+(-[a-z0-9]+)*/i.freeze
|
10
10
|
GITHUB_REF_REGEX = %r{
|
11
11
|
(?:https?://)?
|
12
|
-
github\.com
|
12
|
+
github\.com/(?<repo>#{GITHUB_USERNAME}/[^/\s]+)/
|
13
13
|
(?:issue|pull)s?/(?<number>\d+)
|
14
14
|
}x.freeze
|
15
15
|
|
@@ -76,7 +76,9 @@ module Dependabot
|
|
76
76
|
ref.gsub("github.com", github_redirection_service || "github.com")
|
77
77
|
if (previous_char.nil? || previous_char.match?(/\s/)) &&
|
78
78
|
(next_char.nil? || next_char.match?(/\s/))
|
79
|
-
|
79
|
+
number = last_match.named_captures.fetch("number")
|
80
|
+
repo = last_match.named_captures.fetch("repo")
|
81
|
+
"[#{repo}##{number}]"\
|
80
82
|
"(#{sanitized_url})"
|
81
83
|
else
|
82
84
|
sanitized_url
|
data/lib/dependabot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.112.
|
4
|
+
version: 0.112.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-ecr
|