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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 646d659c6c35e04cb766731b17a8156285b345bb9015cf67e373acb917d751f0
4
- data.tar.gz: 63b07790fb640afa359ad8286bf394ccd7decc9eabe59850610bc0d0e09d89a5
3
+ metadata.gz: 8d0cc3dacc3f64a8b5bd86bd99017e5f43fe3494445c01eefa4409975bbe28a2
4
+ data.tar.gz: '08272b00ef4c7a12428fe475eb296a7c5790cf1cdbbdc8c11aae7feeca9d4b4a'
5
5
  SHA512:
6
- metadata.gz: 6f18160de727eea5de67b1f95a84026242aaff34e618c04a46e853efb1a155dc86bbad304bd483284433e5f47fe881a5f9ffde1d3c15d831c36877600fa38b42
7
- data.tar.gz: ad22556b1e61e8048c085691f03541c75ee947bc21deb62dbaa2cc48b170ab6bd1bbf7cfff75a38e8aad2eb4ab2b3f909e22e0d887b1d5546d198e0f1346966f
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).gsub(%r{/\.}, "/dot-")
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
- /(?<=[^A-Za-z0-9\[\\]|^)\\*#{TAG_REGEX}(?=[^A-Za-z0-9\-]|$)/.freeze,
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
- "[#{tag}](#{source_url}/issues/#{number})"
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/#{GITHUB_USERNAME}/[^/\s]+/
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
- "[##{last_match.named_captures.fetch('number')}]"\
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.112.21"
4
+ VERSION = "0.112.26"
5
5
  end
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.21
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-29 00:00:00.000000000 Z
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