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
@@ -1,133 +1,135 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
3
|
+
class Gitlab::Client
|
4
|
+
# Defines methods related to pipeline schedules.
|
5
|
+
# @see https://docs.gitlab.com/ce/api/pipeline_schedules.html
|
6
|
+
module PipelineSchedules
|
7
|
+
# Gets a list of project pipeline schedules.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# Gitlab.pipeline_schedules(5)
|
11
|
+
# Gitlab.pipeline_schedules(5, { scope: 'active' })
|
12
|
+
#
|
13
|
+
# @param [Integer, String] project the ID or name of a project.
|
14
|
+
# @param [Hash] options A customizable set of options.
|
15
|
+
# @options options [String] :scope The scope of pipeline schedules, one of a 'active' or 'inactive'.
|
16
|
+
# @return [Array<Gitlab::ObjectifiedHash>]
|
17
|
+
def pipeline_schedules(project, options = {})
|
18
|
+
get("/projects/#{url_encode project}/pipeline_schedules", query: options)
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
# Gets a single pipeline schedule.
|
22
|
+
#
|
23
|
+
# @example
|
24
|
+
# Gitlab.pipeline_schedule(5, 3)
|
25
|
+
#
|
26
|
+
# @param [Integer, String] project The ID or name of a project.
|
27
|
+
# @param [Integer] id The ID of the pipeline schedule.
|
28
|
+
# @return [Gitlab::ObjectifiedHash]
|
29
|
+
def pipeline_schedule(project, id)
|
30
|
+
get("/projects/#{url_encode project}/pipeline_schedules/#{id}")
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
33
|
+
# Create a pipeline schedule.
|
34
|
+
#
|
35
|
+
# @example
|
36
|
+
# Gitlab.create_pipeline_schedule(5, { description: 'example' })
|
37
|
+
#
|
38
|
+
# @param [Integer, String] project The ID or name of a project.
|
39
|
+
# @param [Hash] options A customizable set of options.
|
40
|
+
# @option options [String] :description The description of pipeline scehdule.
|
41
|
+
# @option options [String] :ref The branch/tag name will be triggered.
|
42
|
+
# @option options [String] :cron The cron (e.g. 0 1 * * *).
|
43
|
+
# @option options [String] :cron_timezone The timezone supproted by ActiveSupport::TimeZone (e.g. Pacific Time (US & Canada)) (default: 'UTC').
|
44
|
+
# @option options [Boolean] :active The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially (default: true).
|
45
|
+
# @return [Array<Gitlab::ObjectifiedHash>]
|
46
|
+
def create_pipeline_schedule(project, options = {})
|
47
|
+
post("/projects/#{url_encode project}/pipeline_schedules", query: options)
|
48
|
+
end
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
50
|
+
# Updates the pipeline schedule of a project.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
# Gitlab.edit_pipeline_schedule(3, 2, { description: 'example2' })
|
54
|
+
#
|
55
|
+
# @param [Integer, String] project The ID or name of a project.
|
56
|
+
# @param [Integer] The pipeline schedule ID.
|
57
|
+
# @param [Hash] options A customizable set of options.
|
58
|
+
# @option options [String] :description The description of pipeline scehdule.
|
59
|
+
# @option options [String] :ref The branch/tag name will be triggered.
|
60
|
+
# @option options [String] :cron The cron (e.g. 0 1 * * *).
|
61
|
+
# @option options [String] :cron_timezone The timezone supproted by ActiveSupport::TimeZone (e.g. Pacific Time (US & Canada)) (default: 'UTC').
|
62
|
+
# @option options [Boolean] :active The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially (default: true).
|
63
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The updated pipeline schedule.
|
64
|
+
def edit_pipeline_schedule(project, pipeline_schedule_id, options = {})
|
65
|
+
put("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}", query: options)
|
66
|
+
end
|
66
67
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
68
|
+
# Take ownership of a pipeline schedule.
|
69
|
+
#
|
70
|
+
# @example
|
71
|
+
# Gitlab.pipeline_schedule_take_ownership(5, 1)
|
72
|
+
#
|
73
|
+
# @param [Integer, String] project The ID or name of a project.
|
74
|
+
# @param [Integer] trigger_id The pipeline schedule ID.
|
75
|
+
# @return [Gitlab::ObjectifiedHash] The updated pipeline schedule.
|
76
|
+
def pipeline_schedule_take_ownership(project, pipeline_schedule_id)
|
77
|
+
post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/take_ownership")
|
78
|
+
end
|
78
79
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
80
|
+
# Delete a pipeline schedule.
|
81
|
+
#
|
82
|
+
# @example
|
83
|
+
# Gitlab.delete_pipeline_schedule(5, 1)
|
84
|
+
#
|
85
|
+
# @param [Integer, String] project The ID or name of a project.
|
86
|
+
# @param [Integer] trigger_id The pipeline schedule ID.
|
87
|
+
# @return [Gitlab::ObjectifiedHash] The deleted pipeline schedule.
|
88
|
+
def delete_pipeline_schedule(project, pipeline_schedule_id)
|
89
|
+
delete("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}")
|
90
|
+
end
|
90
91
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
92
|
+
# Create a pipeline schedule variable.
|
93
|
+
#
|
94
|
+
# @example
|
95
|
+
# Gitlab.create_pipeline_schedule_variable(5, 1, { key: 'foo', value: 'bar' })
|
96
|
+
#
|
97
|
+
# @param [Integer, String] project The ID or name of a project.
|
98
|
+
# @param [Integer] trigger_id The pipeline schedule ID.
|
99
|
+
# @param [Hash] options A customizable set of options.
|
100
|
+
# @option options [String] :key The key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed.
|
101
|
+
# @option options [String] :value The value of a variable
|
102
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The created pipeline schedule variable.
|
103
|
+
def create_pipeline_schedule_variable(project, pipeline_schedule_id, options = {})
|
104
|
+
post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables", query: options)
|
105
|
+
end
|
105
106
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
107
|
+
# Updates the variable of a pipeline schedule.
|
108
|
+
#
|
109
|
+
# @example
|
110
|
+
# Gitlab.edit_pipeline_schedule_variable(3, 2, "foo" { value: 'bar' })
|
111
|
+
#
|
112
|
+
# @param [Integer, String] project The ID or name of a project.
|
113
|
+
# @param [Integer] The pipeline schedule ID.
|
114
|
+
# @param [String] The key of a variable.
|
115
|
+
# @param [Hash] options A customizable set of options.
|
116
|
+
# @option options [String] :value The value of a variable.
|
117
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The updated pipeline schedule variable.
|
118
|
+
def edit_pipeline_schedule_variable(project, pipeline_schedule_id, key, options = {})
|
119
|
+
put("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables/#{url_encode key}", query: options)
|
120
|
+
end
|
120
121
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
122
|
+
# Delete the variable of a pipeline schedule
|
123
|
+
#
|
124
|
+
# @example
|
125
|
+
# Gitlab.delete_pipeline_schedule_variable(3, 2, "foo")
|
126
|
+
#
|
127
|
+
# @param [Integer, String] project The ID or name of a project.
|
128
|
+
# @param [Integer] The pipeline schedule ID.
|
129
|
+
# @param [String] The key of a variable.
|
130
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The deleted pipeline schedule variable.
|
131
|
+
def delete_pipeline_schedule_variable(project, pipeline_schedule_id, key, _options = {})
|
132
|
+
delete("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables/#{url_encode key}")
|
133
|
+
end
|
132
134
|
end
|
133
135
|
end
|
@@ -1,101 +1,103 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
# @see https://docs.gitlab.com/ce/
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
class Gitlab::Client
|
4
|
+
# Defines methods related to pipelines.
|
5
|
+
# @see https://docs.gitlab.com/ce/api/pipeline_triggers.html
|
6
|
+
# @see https://docs.gitlab.com/ce/ci/triggers/README.html
|
7
|
+
module PipelineTriggers
|
8
|
+
# Gets a list of the project's pipeline triggers
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
# Gitlab.triggers(5)
|
12
|
+
#
|
13
|
+
# @param [Integer, String] project The ID or name of a project.
|
14
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The list of triggers.
|
15
|
+
def triggers(project)
|
16
|
+
get("/projects/#{url_encode project}/triggers")
|
17
|
+
end
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
# Gets details of project's pipeline trigger.
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# Gitlab.trigger(5, 1)
|
23
|
+
#
|
24
|
+
# @param [Integer, String] project The ID or name of a project.
|
25
|
+
# @param [Integer] trigger_id The trigger ID.
|
26
|
+
# @return [Gitlab::ObjectifiedHash] The trigger.
|
27
|
+
def trigger(project, trigger_id)
|
28
|
+
get("/projects/#{url_encode project}/triggers/#{trigger_id}")
|
29
|
+
end
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
# Create a pipeline trigger for a project.
|
32
|
+
#
|
33
|
+
# @example
|
34
|
+
# Gitlab.create_trigger(5, description: "my description")
|
35
|
+
#
|
36
|
+
# @param [Integer, String] project The ID or name of a project.
|
37
|
+
# @param [String] description The trigger name
|
38
|
+
# @return [Gitlab::ObjectifiedHash] The created trigger.
|
39
|
+
def create_trigger(project, description)
|
40
|
+
post("/projects/#{url_encode project}/triggers", body: { description: description })
|
41
|
+
end
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
43
|
+
# Update a project trigger
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
# Gitlab.update_trigger(5, 1, description: "my description")
|
47
|
+
#
|
48
|
+
# @param [Integer, String] project The ID or name of a project.
|
49
|
+
# @param [Integer] trigger_id The trigger ID.
|
50
|
+
# @param [Hash] options A customizable set of options.
|
51
|
+
# @option options [String] :description The trigger name.
|
52
|
+
# @return [Gitlab::ObjectifiedHash] The updated trigger.
|
53
|
+
def update_trigger(project, trigger_id, options = {})
|
54
|
+
put("/projects/#{url_encode project}/triggers/#{trigger_id}", body: options)
|
55
|
+
end
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
# Take ownership of a project trigger
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# Gitlab.trigger_take_ownership(5, 1)
|
61
|
+
#
|
62
|
+
# @param [Integer, String] project The ID or name of a project.
|
63
|
+
# @param [Integer] trigger_id The trigger ID.
|
64
|
+
# @return [Gitlab::ObjectifiedHash] The updated trigger.
|
65
|
+
def trigger_take_ownership(project, trigger_id)
|
66
|
+
post("/projects/#{url_encode project}/triggers/#{trigger_id}/take_ownership")
|
67
|
+
end
|
67
68
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
69
|
+
# Remove a project's pipeline trigger.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# Gitlab.remove_trigger(5, 1)
|
73
|
+
#
|
74
|
+
# @param [Integer, String] project The ID or name of a project.
|
75
|
+
# @param [Integer] trigger_id The trigger ID.
|
76
|
+
# @return [void] This API call returns an empty response body.
|
77
|
+
def remove_trigger(project, trigger_id)
|
78
|
+
delete("/projects/#{url_encode project}/triggers/#{trigger_id}")
|
79
|
+
end
|
80
|
+
alias delete_trigger remove_trigger
|
80
81
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
82
|
+
# Run the given project pipeline trigger.
|
83
|
+
#
|
84
|
+
# @example
|
85
|
+
# Gitlab.run_trigger(5, '7b9148c158980bbd9bcea92c17522d', 'master')
|
86
|
+
# Gitlab.run_trigger(5, '7b9148c158980bbd9bcea92c17522d', 'master', { variable1: "value", variable2: "value2" })
|
87
|
+
#
|
88
|
+
# @see https://docs.gitlab.com/ce/ci/triggers/README.html
|
89
|
+
#
|
90
|
+
# @param [Integer, String] project The ID or name of the project.
|
91
|
+
# @param [String] token The token of a trigger.
|
92
|
+
# @param [String] ref Branch or tag name to build.
|
93
|
+
# @param [Hash] variables A set of build variables to use for the build. (optional)
|
94
|
+
# @return [Gitlab::ObjectifiedHash] The trigger.
|
95
|
+
def run_trigger(project, token, ref, variables = {})
|
96
|
+
post("/projects/#{url_encode project}/trigger/pipeline", unauthenticated: true, body: {
|
97
|
+
token: token,
|
98
|
+
ref: ref,
|
99
|
+
variables: variables
|
100
|
+
})
|
101
|
+
end
|
100
102
|
end
|
101
103
|
end
|
@@ -1,68 +1,81 @@
|
|
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 pipelines.
|
5
|
+
# @see https://docs.gitlab.com/ce/api/pipelines.html
|
6
|
+
module Pipelines
|
7
|
+
# Gets a list of project pipelines.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# Gitlab.pipelines(5)
|
11
|
+
# Gitlab.pipelines(5, { per_page: 10, page: 2 })
|
12
|
+
#
|
13
|
+
# @param [Integer, String] project The ID or name of a project.
|
14
|
+
# @param [Hash] options A customizable set of options.
|
15
|
+
# @option options [Integer] :page The page number.
|
16
|
+
# @option options [Integer] :per_page The number of results per page.
|
17
|
+
# @return [Array<Gitlab::ObjectifiedHash>]
|
18
|
+
def pipelines(project, options = {})
|
19
|
+
get("/projects/#{url_encode project}/pipelines", query: options)
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
# Gets a single pipeline.
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Gitlab.pipeline(5, 36)
|
26
|
+
#
|
27
|
+
# @param [Integer, String] project The ID or name of a project.
|
28
|
+
# @param [Integer] id The ID of a pipeline.
|
29
|
+
# @return [Gitlab::ObjectifiedHash]
|
30
|
+
def pipeline(project, id)
|
31
|
+
get("/projects/#{url_encode project}/pipelines/#{id}")
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
# Create a pipeline.
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# Gitlab.create_pipeline(5, 'master')
|
38
|
+
#
|
39
|
+
# @param [Integer, String] project The ID or name of a project.
|
40
|
+
# @param [String] ref Reference to commit.
|
41
|
+
# @param [Hash] variables Variables passed to pipelines
|
42
|
+
# @return [Gitlab::ObjectifiedHash] The pipelines changes.
|
43
|
+
def create_pipeline(project, ref, variables = {})
|
44
|
+
body = {}
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
46
|
+
# This mapping is necessary, cause the API expects an array with objects (with `key` and `value` keys)
|
47
|
+
# See: https://docs.gitlab.com/ee/api/pipelines.html#create-a-new-pipeline
|
48
|
+
body[:variables] = variables.map { |(key, value)| { key: key, value: value } } if variables.any?
|
49
|
+
|
50
|
+
post(
|
51
|
+
"/projects/#{url_encode project}/pipeline",
|
52
|
+
query: { ref: ref },
|
53
|
+
body: body
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Cancels a pipeline.
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# Gitlab.cancel_pipeline(5, 1)
|
61
|
+
#
|
62
|
+
# @param [Integer, String] project The ID or name of a project.
|
63
|
+
# @param [Integer] id The ID of a pipeline.
|
64
|
+
# @return [Gitlab::ObjectifiedHash] The pipelines changes.
|
65
|
+
def cancel_pipeline(project, id)
|
66
|
+
post("/projects/#{url_encode project}/pipelines/#{id}/cancel")
|
67
|
+
end
|
56
68
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
69
|
+
# Retry a pipeline.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# Gitlab.retry_pipeline(5, 1)
|
73
|
+
#
|
74
|
+
# @param [Integer, String] project The ID or name of a project.
|
75
|
+
# @param [Integer] id The ID of a pipeline.
|
76
|
+
# @return [Array<Gitlab::ObjectifiedHash>] The pipelines changes.
|
77
|
+
def retry_pipeline(project, id)
|
78
|
+
post("/projects/#{url_encode project}/pipelines/#{id}/retry")
|
79
|
+
end
|
67
80
|
end
|
68
81
|
end
|