gitlab 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +33 -0
- data/.travis.yml +8 -3
- data/README.md +7 -7
- data/Rakefile +11 -3
- data/gitlab.gemspec +11 -11
- data/lib/gitlab.rb +2 -2
- data/lib/gitlab/api.rb +2 -1
- data/lib/gitlab/cli.rb +2 -6
- data/lib/gitlab/cli_helpers.rb +18 -20
- data/lib/gitlab/client.rb +8 -5
- data/lib/gitlab/client/branches.rb +4 -4
- data/lib/gitlab/client/build_variables.rb +64 -2
- data/lib/gitlab/client/deployments.rb +32 -0
- data/lib/gitlab/client/groups.rb +49 -0
- data/lib/gitlab/client/issues.rb +71 -0
- data/lib/gitlab/client/merge_requests.rb +1 -0
- data/lib/gitlab/client/pipeline_schedules.rb +133 -0
- data/lib/gitlab/client/pipeline_triggers.rb +2 -2
- data/lib/gitlab/client/projects.rb +1 -1
- data/lib/gitlab/client/repository_files.rb +2 -2
- data/lib/gitlab/client/users.rb +5 -5
- data/lib/gitlab/configuration.rb +2 -2
- data/lib/gitlab/error.rb +10 -2
- data/lib/gitlab/file_response.rb +1 -1
- data/lib/gitlab/help.rb +5 -6
- data/lib/gitlab/page_links.rb +2 -2
- data/lib/gitlab/request.rb +34 -50
- data/lib/gitlab/shell.rb +5 -8
- data/lib/gitlab/version.rb +1 -1
- data/spec/fixtures/deployment.json +57 -0
- data/spec/fixtures/deployments.json +116 -0
- data/spec/fixtures/group_edit.json +14 -0
- data/spec/fixtures/group_subgroups.json +16 -0
- data/spec/fixtures/pipeline_schedule.json +32 -0
- data/spec/fixtures/pipeline_schedule_create.json +21 -0
- data/spec/fixtures/pipeline_schedule_update.json +26 -0
- data/spec/fixtures/pipeline_schedule_variable.json +5 -0
- data/spec/fixtures/pipeline_schedule_variable_update.json +5 -0
- data/spec/fixtures/pipeline_schedules.json +22 -0
- data/spec/gitlab/api_spec.rb +11 -0
- data/spec/gitlab/cli_helpers_spec.rb +14 -15
- data/spec/gitlab/cli_spec.rb +11 -11
- data/spec/gitlab/client/award_emojis_spec.rb +55 -55
- data/spec/gitlab/client/boards_spec.rb +12 -12
- data/spec/gitlab/client/branches_spec.rb +22 -22
- data/spec/gitlab/client/build_variables_spec.rb +93 -10
- data/spec/gitlab/client/builds_spec.rb +36 -36
- data/spec/gitlab/client/commits_spec.rb +21 -21
- data/spec/gitlab/client/deployments_spec.rb +38 -0
- data/spec/gitlab/client/environments_spec.rb +18 -18
- data/spec/gitlab/client/groups_spec.rb +73 -22
- data/spec/gitlab/client/issues_spec.rb +121 -22
- data/spec/gitlab/client/jobs_spec.rb +13 -13
- data/spec/gitlab/client/keys_spec.rb +2 -2
- data/spec/gitlab/client/labels_spec.rb +12 -12
- data/spec/gitlab/client/merge_requests_spec.rb +23 -23
- data/spec/gitlab/client/milestones_spec.rb +12 -12
- data/spec/gitlab/client/namespaces_spec.rb +3 -3
- data/spec/gitlab/client/notes_spec.rb +40 -40
- data/spec/gitlab/client/pipeline_schedules_spec.rb +158 -0
- data/spec/gitlab/client/pipeline_triggers_spec.rb +17 -17
- data/spec/gitlab/client/pipelines_spec.rb +22 -22
- data/spec/gitlab/client/projects_spec.rb +75 -75
- data/spec/gitlab/client/repositories_spec.rb +16 -16
- data/spec/gitlab/client/repository_files_spec.rb +10 -10
- data/spec/gitlab/client/runners_spec.rb +20 -22
- data/spec/gitlab/client/services_spec.rb +6 -6
- data/spec/gitlab/client/snippets_spec.rb +12 -12
- data/spec/gitlab/client/system_hooks_spec.rb +12 -12
- data/spec/gitlab/client/tags_spec.rb +19 -20
- data/spec/gitlab/client/todos_spec.rb +12 -12
- data/spec/gitlab/client/users_spec.rb +49 -49
- data/spec/gitlab/error_spec.rb +50 -23
- data/spec/gitlab/file_response_spec.rb +6 -6
- data/spec/gitlab/help_spec.rb +5 -5
- data/spec/gitlab/objectified_hash_spec.rb +8 -8
- data/spec/gitlab/page_links_spec.rb +1 -1
- data/spec/gitlab/paginated_response_spec.rb +4 -4
- data/spec/gitlab/request_spec.rb +19 -19
- data/spec/gitlab/shell_spec.rb +12 -12
- data/spec/gitlab_spec.rb +13 -14
- data/spec/spec_helper.rb +10 -45
- metadata +46 -3
data/lib/gitlab/page_links.rb
CHANGED
@@ -6,7 +6,7 @@ module Gitlab
|
|
6
6
|
HEADER_LINK = 'Link'.freeze
|
7
7
|
DELIM_LINKS = ','.freeze
|
8
8
|
LINK_REGEX = /<([^>]+)>; rel=\"([^\"]+)\"/
|
9
|
-
METAS = %w(last next first prev)
|
9
|
+
METAS = %w(last next first prev).freeze
|
10
10
|
|
11
11
|
attr_accessor(*METAS)
|
12
12
|
|
@@ -25,7 +25,7 @@ module Gitlab
|
|
25
25
|
LINK_REGEX.match(link.strip) do |match|
|
26
26
|
url, meta = match[1], match[2]
|
27
27
|
next if !url || !meta || METAS.index(meta).nil?
|
28
|
-
|
28
|
+
send("#{meta}=", url)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
data/lib/gitlab/request.rb
CHANGED
@@ -26,58 +26,42 @@ module Gitlab
|
|
26
26
|
elsif body.nil?
|
27
27
|
false
|
28
28
|
else
|
29
|
-
raise Error::Parsing
|
29
|
+
raise Error::Parsing, "Couldn't parse a response body"
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
# Decodes a JSON response into Ruby object.
|
34
34
|
def self.decode(response)
|
35
|
-
JSON.load
|
35
|
+
return response ? JSON.load(response) : {}
|
36
36
|
rescue JSON::ParserError
|
37
|
-
raise Error::Parsing
|
37
|
+
raise Error::Parsing, 'The response is not a valid JSON'
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
def post(path, options={})
|
47
|
-
set_httparty_config(options)
|
48
|
-
set_authorization_header(options)
|
49
|
-
validate self.class.post(@endpoint + path, options)
|
50
|
-
end
|
51
|
-
|
52
|
-
def put(path, options={})
|
53
|
-
set_httparty_config(options)
|
54
|
-
set_authorization_header(options)
|
55
|
-
validate self.class.put(@endpoint + path, options)
|
56
|
-
end
|
57
|
-
|
58
|
-
def delete(path, options={})
|
59
|
-
set_httparty_config(options)
|
60
|
-
set_authorization_header(options)
|
61
|
-
validate self.class.delete(@endpoint + path, options)
|
40
|
+
%w(get post put delete).each do |method|
|
41
|
+
define_method method do |path, options={}|
|
42
|
+
httparty_config(options)
|
43
|
+
authorization_header(options)
|
44
|
+
validate self.class.send(method, @endpoint + path, options)
|
45
|
+
end
|
62
46
|
end
|
63
47
|
|
64
48
|
# Checks the response code for common errors.
|
65
49
|
# Returns parsed response for successful requests.
|
66
50
|
def validate(response)
|
67
51
|
error_klass = case response.code
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
52
|
+
when 400 then Error::BadRequest
|
53
|
+
when 401 then Error::Unauthorized
|
54
|
+
when 403 then Error::Forbidden
|
55
|
+
when 404 then Error::NotFound
|
56
|
+
when 405 then Error::MethodNotAllowed
|
57
|
+
when 409 then Error::Conflict
|
58
|
+
when 422 then Error::Unprocessable
|
59
|
+
when 500 then Error::InternalServerError
|
60
|
+
when 502 then Error::BadGateway
|
61
|
+
when 503 then Error::ServiceUnavailable
|
62
|
+
end
|
63
|
+
|
64
|
+
raise error_klass, response if error_klass
|
81
65
|
|
82
66
|
parsed = response.parsed_response
|
83
67
|
parsed.client = self if parsed.respond_to?(:client=)
|
@@ -87,9 +71,9 @@ module Gitlab
|
|
87
71
|
|
88
72
|
# Sets a base_uri and default_params for requests.
|
89
73
|
# @raise [Error::MissingCredentials] if endpoint not set.
|
90
|
-
def
|
74
|
+
def request_defaults(sudo=nil)
|
91
75
|
self.class.default_params sudo: sudo
|
92
|
-
raise Error::MissingCredentials
|
76
|
+
raise Error::MissingCredentials, 'Please set an endpoint to API' unless @endpoint
|
93
77
|
self.class.default_params.delete(:sudo) if sudo.nil?
|
94
78
|
end
|
95
79
|
|
@@ -100,20 +84,20 @@ module Gitlab
|
|
100
84
|
# @param [Hash] options A customizable set of options.
|
101
85
|
# @option options [Boolean] :unauthenticated true if the API call does not require user authentication.
|
102
86
|
# @raise [Error::MissingCredentials] if private_token and auth_token are not set.
|
103
|
-
def
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
87
|
+
def authorization_header(options)
|
88
|
+
return if options[:unauthenticated]
|
89
|
+
raise Error::MissingCredentials, 'Please provide a private_token or auth_token for user' unless @private_token
|
90
|
+
|
91
|
+
options[:headers] = if @private_token.size < 21
|
92
|
+
{ 'PRIVATE-TOKEN' => @private_token }
|
93
|
+
else
|
94
|
+
{ 'Authorization' => "Bearer #{@private_token}" }
|
95
|
+
end
|
112
96
|
end
|
113
97
|
|
114
98
|
# Set HTTParty configuration
|
115
99
|
# @see https://github.com/jnunemaker/httparty
|
116
|
-
def
|
100
|
+
def httparty_config(options)
|
117
101
|
options.merge!(httparty) if httparty
|
118
102
|
end
|
119
103
|
end
|
data/lib/gitlab/shell.rb
CHANGED
@@ -63,13 +63,10 @@ class Gitlab::Shell
|
|
63
63
|
|
64
64
|
# Execute a given command with arguements
|
65
65
|
def execute(cmd=command, args=arguments)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
fail "Unknown command: #{cmd}. " \
|
71
|
-
"See the 'help' for a list of valid commands."
|
72
|
-
end
|
66
|
+
raise "Unknown command: #{cmd}. See the 'help' for a list of valid commands." unless actions.include?(cmd.to_sym)
|
67
|
+
|
68
|
+
confirm_command(cmd)
|
69
|
+
gitlab_helper(cmd, args)
|
73
70
|
end
|
74
71
|
|
75
72
|
def quit_shell
|
@@ -80,5 +77,5 @@ class Gitlab::Shell
|
|
80
77
|
def history
|
81
78
|
@history ||= History.new
|
82
79
|
end
|
83
|
-
end
|
80
|
+
end
|
84
81
|
end
|
data/lib/gitlab/version.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
{
|
2
|
+
"id": 42,
|
3
|
+
"iid": 2,
|
4
|
+
"ref": "master",
|
5
|
+
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
6
|
+
"created_at": "2016-08-11T11:32:35.444Z",
|
7
|
+
"user": {
|
8
|
+
"name": "Administrator",
|
9
|
+
"username": "root",
|
10
|
+
"id": 1,
|
11
|
+
"state": "active",
|
12
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
13
|
+
"web_url": "http://localhost:3000/root"
|
14
|
+
},
|
15
|
+
"environment": {
|
16
|
+
"id": 9,
|
17
|
+
"name": "production",
|
18
|
+
"external_url": "https://about.gitlab.com"
|
19
|
+
},
|
20
|
+
"deployable": {
|
21
|
+
"id": 664,
|
22
|
+
"status": "success",
|
23
|
+
"stage": "deploy",
|
24
|
+
"name": "deploy",
|
25
|
+
"ref": "master",
|
26
|
+
"tag": false,
|
27
|
+
"coverage": null,
|
28
|
+
"created_at": "2016-08-11T11:32:24.456Z",
|
29
|
+
"started_at": null,
|
30
|
+
"finished_at": "2016-08-11T11:32:35.145Z",
|
31
|
+
"user": {
|
32
|
+
"name": "Administrator",
|
33
|
+
"username": "root",
|
34
|
+
"id": 1,
|
35
|
+
"state": "active",
|
36
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
37
|
+
"web_url": "http://localhost:3000/root",
|
38
|
+
"created_at": "2016-08-11T07:09:20.351Z",
|
39
|
+
"bio": null,
|
40
|
+
"location": null,
|
41
|
+
"skype": "",
|
42
|
+
"linkedin": "",
|
43
|
+
"twitter": "",
|
44
|
+
"website_url": ""
|
45
|
+
},
|
46
|
+
"commit": {
|
47
|
+
"id": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
48
|
+
"short_id": "a91957a8",
|
49
|
+
"title": "Merge branch 'rename-readme' into 'master'\r",
|
50
|
+
"author_name": "Administrator",
|
51
|
+
"author_email": "admin@example.com",
|
52
|
+
"created_at": "2016-08-11T13:28:26.000+02:00",
|
53
|
+
"message": "Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2"
|
54
|
+
},
|
55
|
+
"runner": null
|
56
|
+
}
|
57
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"created_at": "2016-08-11T07:36:40.222Z",
|
4
|
+
"deployable": {
|
5
|
+
"commit": {
|
6
|
+
"author_email": "admin@example.com",
|
7
|
+
"author_name": "Administrator",
|
8
|
+
"created_at": "2016-08-11T09:36:01.000+02:00",
|
9
|
+
"id": "99d03678b90d914dbb1b109132516d71a4a03ea8",
|
10
|
+
"message": "Merge branch 'new-title' into 'master'\r\n\r\nUpdate README\r\n\r\n\r\n\r\nSee merge request !1",
|
11
|
+
"short_id": "99d03678",
|
12
|
+
"title": "Merge branch 'new-title' into 'master'\r"
|
13
|
+
},
|
14
|
+
"coverage": null,
|
15
|
+
"created_at": "2016-08-11T07:36:27.357Z",
|
16
|
+
"finished_at": "2016-08-11T07:36:39.851Z",
|
17
|
+
"id": 657,
|
18
|
+
"name": "deploy",
|
19
|
+
"ref": "master",
|
20
|
+
"runner": null,
|
21
|
+
"stage": "deploy",
|
22
|
+
"started_at": null,
|
23
|
+
"status": "success",
|
24
|
+
"tag": false,
|
25
|
+
"user": {
|
26
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
27
|
+
"bio": null,
|
28
|
+
"created_at": "2016-08-11T07:09:20.351Z",
|
29
|
+
"id": 1,
|
30
|
+
"linkedin": "",
|
31
|
+
"location": null,
|
32
|
+
"name": "Administrator",
|
33
|
+
"skype": "",
|
34
|
+
"state": "active",
|
35
|
+
"twitter": "",
|
36
|
+
"username": "root",
|
37
|
+
"web_url": "http://localhost:3000/root",
|
38
|
+
"website_url": ""
|
39
|
+
}
|
40
|
+
},
|
41
|
+
"environment": {
|
42
|
+
"external_url": "https://about.gitlab.com",
|
43
|
+
"id": 9,
|
44
|
+
"name": "production"
|
45
|
+
},
|
46
|
+
"id": 41,
|
47
|
+
"iid": 1,
|
48
|
+
"ref": "master",
|
49
|
+
"sha": "99d03678b90d914dbb1b109132516d71a4a03ea8",
|
50
|
+
"user": {
|
51
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
52
|
+
"id": 1,
|
53
|
+
"name": "Administrator",
|
54
|
+
"state": "active",
|
55
|
+
"username": "root",
|
56
|
+
"web_url": "http://localhost:3000/root"
|
57
|
+
}
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"created_at": "2016-08-11T11:32:35.444Z",
|
61
|
+
"deployable": {
|
62
|
+
"commit": {
|
63
|
+
"author_email": "admin@example.com",
|
64
|
+
"author_name": "Administrator",
|
65
|
+
"created_at": "2016-08-11T13:28:26.000+02:00",
|
66
|
+
"id": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
67
|
+
"message": "Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2",
|
68
|
+
"short_id": "a91957a8",
|
69
|
+
"title": "Merge branch 'rename-readme' into 'master'\r"
|
70
|
+
},
|
71
|
+
"coverage": null,
|
72
|
+
"created_at": "2016-08-11T11:32:24.456Z",
|
73
|
+
"finished_at": "2016-08-11T11:32:35.145Z",
|
74
|
+
"id": 664,
|
75
|
+
"name": "deploy",
|
76
|
+
"ref": "master",
|
77
|
+
"runner": null,
|
78
|
+
"stage": "deploy",
|
79
|
+
"started_at": null,
|
80
|
+
"status": "success",
|
81
|
+
"tag": false,
|
82
|
+
"user": {
|
83
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
84
|
+
"bio": null,
|
85
|
+
"created_at": "2016-08-11T07:09:20.351Z",
|
86
|
+
"id": 1,
|
87
|
+
"linkedin": "",
|
88
|
+
"location": null,
|
89
|
+
"name": "Administrator",
|
90
|
+
"skype": "",
|
91
|
+
"state": "active",
|
92
|
+
"twitter": "",
|
93
|
+
"username": "root",
|
94
|
+
"web_url": "http://localhost:3000/root",
|
95
|
+
"website_url": ""
|
96
|
+
}
|
97
|
+
},
|
98
|
+
"environment": {
|
99
|
+
"external_url": "https://about.gitlab.com",
|
100
|
+
"id": 9,
|
101
|
+
"name": "production"
|
102
|
+
},
|
103
|
+
"id": 42,
|
104
|
+
"iid": 2,
|
105
|
+
"ref": "master",
|
106
|
+
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
107
|
+
"user": {
|
108
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
109
|
+
"id": 1,
|
110
|
+
"name": "Administrator",
|
111
|
+
"state": "active",
|
112
|
+
"username": "root",
|
113
|
+
"web_url": "http://localhost:3000/root"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
]
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"id": 1,
|
3
|
+
"name": "Foobar Group",
|
4
|
+
"path": "foo-bar",
|
5
|
+
"description": "An interesting group",
|
6
|
+
"visibility": "public",
|
7
|
+
"lfs_enabled": true,
|
8
|
+
"avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/foo.jpg",
|
9
|
+
"web_url": "http://gitlab.example.com/groups/foo-bar",
|
10
|
+
"request_access_enabled": false,
|
11
|
+
"full_name": "Foobar Group",
|
12
|
+
"full_path": "foo-bar",
|
13
|
+
"parent_id": 123
|
14
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"id": 1,
|
4
|
+
"name": "Foobar Group",
|
5
|
+
"path": "foo-bar",
|
6
|
+
"description": "An interesting group",
|
7
|
+
"visibility": "public",
|
8
|
+
"lfs_enabled": true,
|
9
|
+
"avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/foo.jpg",
|
10
|
+
"web_url": "http://gitlab.example.com/groups/foo-bar",
|
11
|
+
"request_access_enabled": false,
|
12
|
+
"full_name": "Foobar Group",
|
13
|
+
"full_path": "foo-bar",
|
14
|
+
"parent_id": 123
|
15
|
+
}
|
16
|
+
]
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"id": 13,
|
3
|
+
"description": "Test schedule pipeline",
|
4
|
+
"ref": "master",
|
5
|
+
"cron": "* * * * *",
|
6
|
+
"cron_timezone": "Asia/Tokyo",
|
7
|
+
"next_run_at": "2017-05-19T13:41:00.000Z",
|
8
|
+
"active": true,
|
9
|
+
"created_at": "2017-05-19T13:31:08.849Z",
|
10
|
+
"updated_at": "2017-05-19T13:40:17.727Z",
|
11
|
+
"last_pipeline": {
|
12
|
+
"id": 332,
|
13
|
+
"sha": "0e788619d0b5ec17388dffb973ecd505946156db",
|
14
|
+
"ref": "master",
|
15
|
+
"status": "pending"
|
16
|
+
},
|
17
|
+
"owner": {
|
18
|
+
"name": "Administrator",
|
19
|
+
"username": "root",
|
20
|
+
"id": 1,
|
21
|
+
"state": "active",
|
22
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
23
|
+
"web_url": "https://gitlab.example.com/root"
|
24
|
+
},
|
25
|
+
"variables": [
|
26
|
+
{
|
27
|
+
"key": "TEST_VARIABLE_1",
|
28
|
+
"value": "TEST_1"
|
29
|
+
}
|
30
|
+
]
|
31
|
+
}
|
32
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"id": 14,
|
3
|
+
"description": "Build packages",
|
4
|
+
"ref": "master",
|
5
|
+
"cron": "0 1 * * 5",
|
6
|
+
"cron_timezone": "UTC",
|
7
|
+
"next_run_at": "2017-05-26T01:00:00.000Z",
|
8
|
+
"active": true,
|
9
|
+
"created_at": "2017-05-19T13:43:08.169Z",
|
10
|
+
"updated_at": "2017-05-19T13:43:08.169Z",
|
11
|
+
"last_pipeline": null,
|
12
|
+
"owner": {
|
13
|
+
"name": "Administrator",
|
14
|
+
"username": "root",
|
15
|
+
"id": 1,
|
16
|
+
"state": "active",
|
17
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
18
|
+
"web_url": "https://gitlab.example.com/root"
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"id": 13,
|
3
|
+
"description": "Test schedule pipeline",
|
4
|
+
"ref": "master",
|
5
|
+
"cron": "0 2 * * *",
|
6
|
+
"cron_timezone": "Asia/Tokyo",
|
7
|
+
"next_run_at": "2017-05-19T17:00:00.000Z",
|
8
|
+
"active": true,
|
9
|
+
"created_at": "2017-05-19T13:31:08.849Z",
|
10
|
+
"updated_at": "2017-05-19T13:44:16.135Z",
|
11
|
+
"last_pipeline": {
|
12
|
+
"id": 332,
|
13
|
+
"sha": "0e788619d0b5ec17388dffb973ecd505946156db",
|
14
|
+
"ref": "master",
|
15
|
+
"status": "pending"
|
16
|
+
},
|
17
|
+
"owner": {
|
18
|
+
"name": "Administrator",
|
19
|
+
"username": "root",
|
20
|
+
"id": 1,
|
21
|
+
"state": "active",
|
22
|
+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
23
|
+
"web_url": "https://gitlab.example.com/root"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|