dependabot-common 0.163.0 → 0.164.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15d09c789245d49223db4df88b82fa3376f9ca598b926ce44e9c10018d0442c1
|
4
|
+
data.tar.gz: 9e6ed02b46b8cbe7b574a515abf1179b136d0501b657620d187914f9f29b7e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a47e494cd76b7569d4fba0212f188f2b401fd087f70cc44b94f39ad16650edcacf90440200e6d16f0978c84d832d97eb24d892d8f74a38607b875b932f8eb1c
|
7
|
+
data.tar.gz: 89cac44d3a3febd767e78146deba6758b821c0d61bded08856c098117f2388a052e6063a879282a75f4346727517374ed936af5b78975ea7ab68ffbd1d4c3eed
|
@@ -10,25 +10,26 @@ module Dependabot
|
|
10
10
|
attr_reader :source, :branch_name, :base_commit, :credentials,
|
11
11
|
:files, :pr_description, :pr_name, :commit_message,
|
12
12
|
:author_details, :labeler, :approvers, :assignees,
|
13
|
-
:milestone
|
13
|
+
:milestone, :target_project_id
|
14
14
|
|
15
15
|
def initialize(source:, branch_name:, base_commit:, credentials:,
|
16
16
|
files:, commit_message:, pr_description:, pr_name:,
|
17
17
|
author_details:, labeler:, approvers:, assignees:,
|
18
|
-
milestone:)
|
19
|
-
@source
|
20
|
-
@branch_name
|
21
|
-
@base_commit
|
22
|
-
@credentials
|
23
|
-
@files
|
24
|
-
@commit_message
|
25
|
-
@pr_description
|
26
|
-
@pr_name
|
27
|
-
@author_details
|
28
|
-
@labeler
|
29
|
-
@approvers
|
30
|
-
@assignees
|
31
|
-
@milestone
|
18
|
+
milestone:, target_project_id:)
|
19
|
+
@source = source
|
20
|
+
@branch_name = branch_name
|
21
|
+
@base_commit = base_commit
|
22
|
+
@credentials = credentials
|
23
|
+
@files = files
|
24
|
+
@commit_message = commit_message
|
25
|
+
@pr_description = pr_description
|
26
|
+
@pr_name = pr_name
|
27
|
+
@author_details = author_details
|
28
|
+
@labeler = labeler
|
29
|
+
@approvers = approvers
|
30
|
+
@assignees = assignees
|
31
|
+
@milestone = milestone
|
32
|
+
@target_project_id = target_project_id
|
32
33
|
end
|
33
34
|
|
34
35
|
def create
|
@@ -76,7 +77,7 @@ module Dependabot
|
|
76
77
|
|
77
78
|
def merge_request_exists?
|
78
79
|
gitlab_client_for_source.merge_requests(
|
79
|
-
source.repo,
|
80
|
+
target_project_id || source.repo,
|
80
81
|
source_branch: branch_name,
|
81
82
|
target_branch: source.branch || default_branch,
|
82
83
|
state: "all"
|
@@ -143,7 +144,8 @@ module Dependabot
|
|
143
144
|
remove_source_branch: true,
|
144
145
|
assignee_ids: assignees,
|
145
146
|
labels: labeler.labels_for_pr.join(","),
|
146
|
-
milestone_id: milestone
|
147
|
+
milestone_id: milestone,
|
148
|
+
target_project_id: target_project_id
|
147
149
|
)
|
148
150
|
end
|
149
151
|
|
@@ -156,7 +158,7 @@ module Dependabot
|
|
156
158
|
approvers.keys.map { |k| [k.to_sym, approvers[k]] }.to_h
|
157
159
|
|
158
160
|
gitlab_client_for_source.edit_merge_request_approvers(
|
159
|
-
source.repo,
|
161
|
+
target_project_id || source.repo,
|
160
162
|
merge_request.iid,
|
161
163
|
approver_ids: approvers_hash[:approvers],
|
162
164
|
approver_group_ids: approvers_hash[:group_approvers]
|
@@ -8,16 +8,17 @@ module Dependabot
|
|
8
8
|
class PullRequestUpdater
|
9
9
|
class Gitlab
|
10
10
|
attr_reader :source, :files, :base_commit, :old_commit, :credentials,
|
11
|
-
:pull_request_number
|
11
|
+
:pull_request_number, :target_project_id
|
12
12
|
|
13
13
|
def initialize(source:, base_commit:, old_commit:, files:,
|
14
|
-
credentials:, pull_request_number:)
|
14
|
+
credentials:, pull_request_number:, target_project_id:)
|
15
15
|
@source = source
|
16
16
|
@base_commit = base_commit
|
17
17
|
@old_commit = old_commit
|
18
18
|
@files = files
|
19
19
|
@credentials = credentials
|
20
20
|
@pull_request_number = pull_request_number
|
21
|
+
@target_project_id = target_project_id
|
21
22
|
end
|
22
23
|
|
23
24
|
def update
|
@@ -39,7 +40,7 @@ module Dependabot
|
|
39
40
|
|
40
41
|
def merge_request
|
41
42
|
@merge_request ||= gitlab_client_for_source.merge_request(
|
42
|
-
source.repo,
|
43
|
+
target_project_id || source.repo,
|
43
44
|
pull_request_number
|
44
45
|
)
|
45
46
|
end
|
@@ -9,11 +9,12 @@ module Dependabot
|
|
9
9
|
class BranchProtected < StandardError; end
|
10
10
|
|
11
11
|
attr_reader :source, :files, :base_commit, :old_commit, :credentials,
|
12
|
-
:pull_request_number, :author_details, :signature_key
|
12
|
+
:pull_request_number, :author_details, :signature_key, :provider_metadata
|
13
13
|
|
14
14
|
def initialize(source:, base_commit:, old_commit:, files:,
|
15
15
|
credentials:, pull_request_number:,
|
16
|
-
author_details: nil, signature_key: nil
|
16
|
+
author_details: nil, signature_key: nil,
|
17
|
+
provider_metadata: {})
|
17
18
|
@source = source
|
18
19
|
@base_commit = base_commit
|
19
20
|
@old_commit = old_commit
|
@@ -22,6 +23,7 @@ module Dependabot
|
|
22
23
|
@pull_request_number = pull_request_number
|
23
24
|
@author_details = author_details
|
24
25
|
@signature_key = signature_key
|
26
|
+
@provider_metadata = provider_metadata
|
25
27
|
end
|
26
28
|
|
27
29
|
def update
|
@@ -55,7 +57,8 @@ module Dependabot
|
|
55
57
|
old_commit: old_commit,
|
56
58
|
files: files,
|
57
59
|
credentials: credentials,
|
58
|
-
pull_request_number: pull_request_number
|
60
|
+
pull_request_number: pull_request_number,
|
61
|
+
target_project_id: provider_metadata[:target_project_id]
|
59
62
|
)
|
60
63
|
end
|
61
64
|
|
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.
|
4
|
+
version: 0.164.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|