dependabot-common 0.206.0 → 0.209.0

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: ea1de4e8ed9e1191edf8fe8be8da7956abf9ad9590e23df3450606782eddf2dd
4
- data.tar.gz: c784ce9a204423790aaae87cc100853cfd0847b0645244f2ab3c2511ac18fc65
3
+ metadata.gz: 994a7ee1509cbaef535cc67655cb1707638d271e1f04645fc9fadff485259149
4
+ data.tar.gz: efca3b54851d22bfe9568f795cfcc6aa52177790d0c99f3b8dbf9f1d382e4534
5
5
  SHA512:
6
- metadata.gz: 5e826b6506bcbe04b201ba900caad14a3ce041f6b37ca2b5f70199013862906cd0faf1b732effa0bba01b647e27f78681cec10ac7ab539e76bd8a5b8a4bac86f
7
- data.tar.gz: fe7a78207bd88895e6a56aee1084608c1bdadba3f3d56fb5b569698c91427ee1f3d775df217f99719cb1c3c5b92eed4736d68ca8a9376221ce24508b3ad74689
6
+ metadata.gz: 78ae2e2d95eb6b033548698e646c3dde4e15cfcfa4ad110604f6e9d2da21d9abe8029c95974c16f7b93bc87b58e4863b0ff17c7177427db57fafe928569852bf
7
+ data.tar.gz: a964c4d8e720d2787ed878bc8e003456ecc8a941c460e9404090f93e4012bdf35a78f2d828bf40b2a3540fbab19024e24235f125c964ec1e7c0e977a6d9c0b82
@@ -120,6 +120,8 @@ module Dependabot
120
120
  # rubocop:disable Metrics/ParameterLists
121
121
  def create_pull_request(repo, pr_name, source_branch, target_branch,
122
122
  pr_description, _labels, _work_item = nil)
123
+ reviewers = default_reviewers(repo)
124
+
123
125
  content = {
124
126
  title: pr_name,
125
127
  source: {
@@ -133,6 +135,7 @@ module Dependabot
133
135
  }
134
136
  },
135
137
  description: pr_description,
138
+ reviewers: reviewers,
136
139
  close_source_branch: true
137
140
  }
138
141
 
@@ -141,6 +144,21 @@ module Dependabot
141
144
  end
142
145
  # rubocop:enable Metrics/ParameterLists
143
146
 
147
+ def default_reviewers(repo)
148
+ path = "#{repo}/default-reviewers?pagelen=100&fields=values.uuid,next"
149
+ reviewers_url = base_url + path
150
+
151
+ default_reviewers = paginate({ "next" => reviewers_url })
152
+
153
+ reviewer_data = []
154
+
155
+ default_reviewers.each do |reviewer|
156
+ reviewer_data.append({ uuid: reviewer.fetch("uuid") })
157
+ end
158
+
159
+ reviewer_data
160
+ end
161
+
144
162
  def tags(repo)
145
163
  path = "#{repo}/refs/tags?pagelen=100"
146
164
  response = get(base_url + path)
@@ -15,7 +15,7 @@ require "dependabot/shared_helpers"
15
15
  module Dependabot
16
16
  module FileFetchers
17
17
  class Base
18
- attr_reader :source, :credentials, :repo_contents_path
18
+ attr_reader :source, :credentials, :repo_contents_path, :options
19
19
 
20
20
  CLIENT_NOT_FOUND_ERRORS = [
21
21
  Octokit::NotFound,
@@ -42,11 +42,14 @@ module Dependabot
42
42
  # If provided, file _data_ will be loaded from the clone.
43
43
  # Submodules and directory listings are _not_ currently supported
44
44
  # by repo_contents_path and still use an API trip.
45
- def initialize(source:, credentials:, repo_contents_path: nil)
45
+ #
46
+ # options supports custom feature enablement
47
+ def initialize(source:, credentials:, repo_contents_path: nil, options: {})
46
48
  @source = source
47
49
  @credentials = credentials
48
50
  @repo_contents_path = repo_contents_path
49
51
  @linked_paths = {}
52
+ @options = options
50
53
  end
51
54
 
52
55
  def repo
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.206.0"
4
+ VERSION = "0.209.0"
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.206.0
4
+ version: 0.209.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport