gitlab 4.6.0 → 4.7.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 +4 -4
- data/lib/gitlab/client/access_requests.rb +92 -90
- data/lib/gitlab/client/award_emojis.rb +126 -124
- data/lib/gitlab/client/boards.rb +81 -79
- data/lib/gitlab/client/branches.rb +89 -87
- data/lib/gitlab/client/build_variables.rb +117 -115
- data/lib/gitlab/client/builds.rb +98 -96
- data/lib/gitlab/client/commits.rb +167 -152
- data/lib/gitlab/client/deployments.rb +29 -27
- data/lib/gitlab/client/environments.rb +80 -78
- data/lib/gitlab/client/events.rb +54 -52
- data/lib/gitlab/client/group_milestones.rb +85 -83
- data/lib/gitlab/client/groups.rb +178 -176
- data/lib/gitlab/client/issues.rb +212 -188
- data/lib/gitlab/client/jobs.rb +150 -148
- data/lib/gitlab/client/keys.rb +14 -12
- data/lib/gitlab/client/labels.rb +79 -77
- data/lib/gitlab/client/merge_request_approvals.rb +101 -99
- data/lib/gitlab/client/merge_requests.rb +291 -277
- data/lib/gitlab/client/milestones.rb +85 -83
- data/lib/gitlab/client/namespaces.rb +18 -16
- data/lib/gitlab/client/notes.rb +260 -258
- data/lib/gitlab/client/pipeline_schedules.rb +123 -121
- data/lib/gitlab/client/pipeline_triggers.rb +93 -91
- data/lib/gitlab/client/pipelines.rb +73 -60
- data/lib/gitlab/client/projects.rb +538 -524
- data/lib/gitlab/client/repositories.rb +67 -65
- data/lib/gitlab/client/repository_files.rb +103 -101
- data/lib/gitlab/client/runners.rb +114 -112
- data/lib/gitlab/client/services.rb +45 -43
- data/lib/gitlab/client/sidekiq.rb +32 -30
- data/lib/gitlab/client/snippets.rb +86 -84
- data/lib/gitlab/client/system_hooks.rb +57 -55
- data/lib/gitlab/client/tags.rb +88 -86
- data/lib/gitlab/client/todos.rb +40 -38
- data/lib/gitlab/client/users.rb +243 -241
- data/lib/gitlab/client/versions.rb +13 -11
- data/lib/gitlab/error.rb +1 -1
- data/lib/gitlab/help.rb +1 -1
- data/lib/gitlab/page_links.rb +1 -1
- data/lib/gitlab/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 421115b0e89dbdc41a5b604763a4d2f8c159117ea7a750112cd4ae4384716f46
|
4
|
+
data.tar.gz: f29e4c90ebf303275d2cdb40814019d537b7cd79d9ca620b234eab78f990c7ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa2447b6dff0b4335d542f199b3dac0b5171850417b01f8f0d2238eca7015707548308ccfa235b60443b2bf4fa436bb4981f6d21a36126d37c4432359c7a2b5
|
7
|
+
data.tar.gz: 15acf72e2442ea9aca44941545db106560ac07090c32012cc70a734dea36abb74ca57b1852350a29b825cf8080725a6989948e4faa92b09eaf75a209a7f6ddc2
|
@@ -1,101 +1,103 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
class Gitlab::Client
|
4
|
+
# Defines methods related to Award Emojis.
|
5
|
+
# @see https://docs.gitlab.com/ce/api/access_requests.html
|
6
|
+
module AccessRequests
|
7
|
+
# Gets a list of access requests for a project viewable by the authenticated user.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# Gitlab.project_access_requests(1)
|
11
|
+
#
|
12
|
+
# @param [Integer, String] :project(required) The ID or name of a project.
|
13
|
+
# @return [Array<Gitlab::ObjectifiedHash>] List of project access requests
|
14
|
+
def project_access_requests(project)
|
15
|
+
get("/projects/#{url_encode project}/access_requests")
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
# Gets a list of access requests for a group viewable by the authenticated user.
|
19
|
+
#
|
20
|
+
# @example
|
21
|
+
# Gitlab.group_access_requests(1)
|
22
|
+
#
|
23
|
+
# @param [Integer, String] :group(required) The ID or name of a group.
|
24
|
+
# @return [Array<Gitlab::ObjectifiedHash>] List of group access requests
|
25
|
+
def group_access_requests(group)
|
26
|
+
get("/groups/#{url_encode group}/access_requests")
|
27
|
+
end
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
# Requests access for the authenticated user to a project.
|
30
|
+
#
|
31
|
+
# @example
|
32
|
+
# Gitlab.request_project_access(1)
|
33
|
+
#
|
34
|
+
# @param [Integer, String] :project(required) The ID or name of a project.
|
35
|
+
# @return <Gitlab::ObjectifiedHash] Information about the requested project access
|
36
|
+
def request_project_access(project)
|
37
|
+
post("/projects/#{url_encode project}/access_requests")
|
38
|
+
end
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
40
|
+
# Requests access for the authenticated user to a group.
|
41
|
+
#
|
42
|
+
# @example
|
43
|
+
# Gitlab.request_group_access(1)
|
44
|
+
#
|
45
|
+
# @param [Integer, String] :group(required) The ID or name of a group.
|
46
|
+
# @return <Gitlab::ObjectifiedHash] Information about the requested group access
|
47
|
+
def request_group_access(group)
|
48
|
+
post("/groups/#{url_encode group}/access_requests")
|
49
|
+
end
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
51
|
+
# Approves a project access request for the given user.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
# Gitlab.approve_project_access_request(1, 1)
|
55
|
+
# Gitlab.approve_project_access_request(1, 1, {access_level: '30'})
|
56
|
+
#
|
57
|
+
# @param [Integer, String] :project(required) The ID or name of a project.
|
58
|
+
# @param [Integer] :user_id(required) The user ID of the access requester
|
59
|
+
# @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
|
60
|
+
# @return <Gitlab::ObjectifiedHash] Information about the approved project access request
|
61
|
+
def approve_project_access_request(project, user_id, options = {})
|
62
|
+
put("/projects/#{url_encode project}/access_requests/#{user_id}/approve", body: options)
|
63
|
+
end
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
65
|
+
# Approves a group access request for the given user.
|
66
|
+
#
|
67
|
+
# @example
|
68
|
+
# Gitlab.approve_group_access_request(1, 1)
|
69
|
+
# Gitlab.approve_group_access_request(1, 1, {access_level: '30'})
|
70
|
+
#
|
71
|
+
# @param [Integer, String] :group(required) The ID or name of a group.
|
72
|
+
# @param [Integer] :user_id(required) The user ID of the access requester
|
73
|
+
# @option options [Integer] :access_level(optional) A valid access level (defaults: 30, developer access level)
|
74
|
+
# @return <Gitlab::ObjectifiedHash] Information about the approved group access request
|
75
|
+
def approve_group_access_request(group, user_id, options = {})
|
76
|
+
put("/groups/#{url_encode group}/access_requests/#{user_id}/approve", body: options)
|
77
|
+
end
|
77
78
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
79
|
+
# Denies a project access request for the given user.
|
80
|
+
#
|
81
|
+
# @example
|
82
|
+
# Gitlab.deny_project_access_request(1, 1)
|
83
|
+
#
|
84
|
+
# @param [Integer, String] :project(required) The ID or name of a project.
|
85
|
+
# @param [Integer] :user_id(required) The user ID of the access requester
|
86
|
+
# @return [void] This API call returns an empty response body.
|
87
|
+
def deny_project_access_request(project, user_id)
|
88
|
+
delete("/projects/#{url_encode project}/access_requests/#{user_id}")
|
89
|
+
end
|
89
90
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
91
|
+
# Denies a group access request for the given user.
|
92
|
+
#
|
93
|
+
# @example
|
94
|
+
# Gitlab.deny_group_access_request(1, 1)
|
95
|
+
#
|
96
|
+
# @param [Integer, String] :group(required) The ID or name of a group.
|
97
|
+
# @param [Integer] :user_id(required) The user ID of the access requester
|
98
|
+
# @return [void] This API call returns an empty response body.
|
99
|
+
def deny_group_access_request(group, user_id)
|
100
|
+
delete("/groups/#{url_encode group}/access_requests/#{user_id}")
|
101
|
+
end
|
100
102
|
end
|
101
103
|
end
|
@@ -1,135 +1,137 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
3
|
+
class Gitlab::Client
|
4
|
+
# Defines methods related to Award Emojis.
|
5
|
+
# @see https://docs.gitlab.com/ce/api/award_emoji.html
|
6
|
+
module AwardEmojis
|
7
|
+
# Gets a list of all award emoji for an awardable(issue, merge request or snippet)
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# Gitlab.award_emojis(1, 80, 'issue')
|
11
|
+
# Gitlab.award_emojis(1, 60, 'merge_request')
|
12
|
+
# Gitlab.award_emojis(1, 40, 'snippet')
|
13
|
+
#
|
14
|
+
# @param [Integer] project The ID of a project.
|
15
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
16
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
17
|
+
# @return [Array<Gitlab::ObjectifiedHash>]
|
18
|
+
def award_emojis(project, awardable_id, awardable_type)
|
19
|
+
get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji")
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
# Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet)
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Gitlab.note_award_emojis(1, 80, 'issue', 1)
|
26
|
+
# Gitlab.note_award_emojis(1, 60, 'merge_request', 1)
|
27
|
+
# Gitlab.note_award_emojis(1, 40, 'snippet', 1)
|
28
|
+
#
|
29
|
+
# @param [Integer] project The ID of a project.
|
30
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
31
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
32
|
+
# @param [Integer] note_id The ID of a note.
|
33
|
+
# @return [Array<Gitlab::ObjectifiedHash>]
|
34
|
+
def note_award_emojis(project, awardable_id, awardable_type, note_id)
|
35
|
+
get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji")
|
36
|
+
end
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
38
|
+
# Gets a single award emoji for an awardable(issue, merge request or snippet)
|
39
|
+
#
|
40
|
+
# @example
|
41
|
+
# Gitlab.award_emoji(1, 80, 'issue', 4)
|
42
|
+
# Gitlab.award_emoji(1, 60, 'merge_request', 4)
|
43
|
+
# Gitlab.award_emoji(1, 40, 'snippet', 4)
|
44
|
+
#
|
45
|
+
# @param [Integer] project The ID of a project.
|
46
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
47
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
48
|
+
# @param [Integer] award_id The ID of an award emoji.
|
49
|
+
# @return [Gitlab::ObjectifiedHash]
|
50
|
+
def award_emoji(project, awardable_id, awardable_type, award_id)
|
51
|
+
get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
|
52
|
+
end
|
52
53
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
54
|
+
# Gets a single award emoji from a single note on an awardable(issue, merge request or snippet)
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
# Gitlab.note_award_emoji(1, 80, 'issue', 1, 4)
|
58
|
+
# Gitlab.note_award_emoji(1, 60, 'merge_request', 1, 4)
|
59
|
+
# Gitlab.note_award_emoji(1, 40, 'snippet', 1, 4)
|
60
|
+
#
|
61
|
+
# @param [Integer] project The ID of a project.
|
62
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
63
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
64
|
+
# @param [Integer] note_id The ID of a note.
|
65
|
+
# @param [Integer] award_id The ID of an award emoji.
|
66
|
+
# @return [Gitlab::ObjectifiedHash]
|
67
|
+
def note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
|
68
|
+
get("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
|
69
|
+
end
|
69
70
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
71
|
+
# Awards a new emoji to an awardable(issue, merge request or snippet)
|
72
|
+
#
|
73
|
+
# @example
|
74
|
+
# Gitlab.create_award_emoji(1, 80, 'issue', 'blowfish')
|
75
|
+
# Gitlab.create_award_emoji(1, 80, 'merge_request', 'blowfish')
|
76
|
+
# Gitlab.create_award_emoji(1, 80, 'snippet', 'blowfish')
|
77
|
+
#
|
78
|
+
# @param [Integer] project The ID of a project.
|
79
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
80
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
81
|
+
# @param [String] emoji_name The name of the emoji, without colons.
|
82
|
+
# @return [Gitlab::ObjectifiedHash]
|
83
|
+
def create_award_emoji(project, awardable_id, awardable_type, emoji_name)
|
84
|
+
post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji", body: { name: emoji_name })
|
85
|
+
end
|
85
86
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
87
|
+
# Awards a new emoji to a note on an awardable(issue, merge request or snippet)
|
88
|
+
#
|
89
|
+
# @example
|
90
|
+
# Gitlab.create_note_award_emoji(1, 80, 'issue', 1, 'blowfish')
|
91
|
+
# Gitlab.create_note_award_emoji(1, 80, 'merge_request', 1, 'blowfish')
|
92
|
+
# Gitlab.create_note_award_emoji(1, 80, 'snippet', 1, 'blowfish')
|
93
|
+
#
|
94
|
+
# @param [Integer] project The ID of a project.
|
95
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
96
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
97
|
+
# @param [Integer] note_id The ID of a note.
|
98
|
+
# @param [String] emoji_name The name of the emoji, without colons.
|
99
|
+
# @return [Gitlab::ObjectifiedHash]
|
100
|
+
def create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name)
|
101
|
+
post("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji", body: { name: emoji_name })
|
102
|
+
end
|
102
103
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
104
|
+
# Deletes a single award emoji from an awardable(issue, merge request or snippet)
|
105
|
+
#
|
106
|
+
# @example
|
107
|
+
# Gitlab.delete_award_emoji(1, 80, 'issue', 4)
|
108
|
+
# Gitlab.delete_award_emoji(1, 60, 'merge_request', 4)
|
109
|
+
# Gitlab.delete_award_emoji(1, 40, 'snippet', 4)
|
110
|
+
#
|
111
|
+
# @param [Integer] project The ID of a project.
|
112
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
113
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
114
|
+
# @param [Integer] award_id The ID of an award emoji.
|
115
|
+
# @return [void] This API call returns an empty response body.
|
116
|
+
def delete_award_emoji(project, awardable_id, awardable_type, award_id)
|
117
|
+
delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/award_emoji/#{award_id}")
|
118
|
+
end
|
118
119
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
120
|
+
# Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet)
|
121
|
+
#
|
122
|
+
# @example
|
123
|
+
# Gitlab.delete_note_award_emoji(1, 80, 'issue', 1, 4)
|
124
|
+
# Gitlab.delete_note_award_emoji(1, 60, 'merge_request', 1, 4)
|
125
|
+
# Gitlab.delete_note_award_emoji(1, 40, 'snippet', 1, 4)
|
126
|
+
#
|
127
|
+
# @param [Integer] project The ID of a project.
|
128
|
+
# @param [Integer] awardable_id The ID of an awardable(issue, merge request or snippet).
|
129
|
+
# @param [String] awardable_type The type of the awardable(can be 'issue', 'merge_request' or 'snippet')
|
130
|
+
# @param [Integer] note_id The ID of a note.
|
131
|
+
# @param [Integer] award_id The ID of an award emoji.
|
132
|
+
# @return [void] This API call returns an empty response body.
|
133
|
+
def delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id)
|
134
|
+
delete("/projects/#{url_encode project}/#{awardable_type}s/#{awardable_id}/notes/#{note_id}/award_emoji/#{award_id}")
|
135
|
+
end
|
134
136
|
end
|
135
137
|
end
|