gitlab 3.0.0 → 4.0.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.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.travis.yml +6 -2
  4. data/CHANGELOG.md +244 -0
  5. data/CONTRIBUTING.md +195 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +122 -10
  8. data/Rakefile +1 -1
  9. data/bin/console +10 -0
  10. data/bin/setup +6 -0
  11. data/exe/gitlab +7 -0
  12. data/gitlab.gemspec +9 -3
  13. data/lib/gitlab.rb +18 -2
  14. data/lib/gitlab/api.rb +6 -4
  15. data/lib/gitlab/cli.rb +89 -0
  16. data/lib/gitlab/cli_helpers.rb +241 -0
  17. data/lib/gitlab/client.rb +42 -6
  18. data/lib/gitlab/client/branches.rb +91 -0
  19. data/lib/gitlab/client/build_triggers.rb +51 -0
  20. data/lib/gitlab/client/build_variables.rb +66 -0
  21. data/lib/gitlab/client/builds.rb +106 -0
  22. data/lib/gitlab/client/commits.rb +146 -0
  23. data/lib/gitlab/client/groups.rb +66 -10
  24. data/lib/gitlab/client/issues.rb +61 -16
  25. data/lib/gitlab/client/labels.rb +57 -0
  26. data/lib/gitlab/client/merge_requests.rb +137 -26
  27. data/lib/gitlab/client/milestones.rb +44 -9
  28. data/lib/gitlab/client/namespaces.rb +20 -0
  29. data/lib/gitlab/client/notes.rb +71 -16
  30. data/lib/gitlab/client/pipelines.rb +68 -0
  31. data/lib/gitlab/client/projects.rb +236 -27
  32. data/lib/gitlab/client/repositories.rb +39 -45
  33. data/lib/gitlab/client/repository_files.rb +107 -0
  34. data/lib/gitlab/client/runners.rb +115 -0
  35. data/lib/gitlab/client/services.rb +50 -0
  36. data/lib/gitlab/client/snippets.rb +26 -21
  37. data/lib/gitlab/client/system_hooks.rb +59 -0
  38. data/lib/gitlab/client/tags.rb +96 -0
  39. data/lib/gitlab/client/users.rb +151 -7
  40. data/lib/gitlab/configuration.rb +20 -4
  41. data/lib/gitlab/error.rb +55 -12
  42. data/lib/gitlab/file_response.rb +46 -0
  43. data/lib/gitlab/help.rb +95 -0
  44. data/lib/gitlab/objectified_hash.rb +19 -3
  45. data/lib/gitlab/page_links.rb +33 -0
  46. data/lib/gitlab/paginated_response.rb +97 -0
  47. data/lib/gitlab/request.rb +65 -33
  48. data/lib/gitlab/shell.rb +84 -0
  49. data/lib/gitlab/shell_history.rb +59 -0
  50. data/lib/gitlab/version.rb +1 -1
  51. data/spec/fixtures/{project_branch.json → branch.json} +1 -1
  52. data/spec/fixtures/branch_delete.json +3 -0
  53. data/spec/fixtures/{project_branches.json → branches.json} +0 -0
  54. data/spec/fixtures/build.json +38 -0
  55. data/spec/fixtures/build_artifacts.json +0 -0
  56. data/spec/fixtures/build_cancel.json +24 -0
  57. data/spec/fixtures/build_erase.json +24 -0
  58. data/spec/fixtures/build_retry.json +24 -0
  59. data/spec/fixtures/builds.json +78 -0
  60. data/spec/fixtures/builds_commits.json +64 -0
  61. data/spec/fixtures/compare_merge_request_diff.json +31 -0
  62. data/spec/fixtures/error_project_not_found.json +1 -0
  63. data/spec/fixtures/get_repository_file.json +1 -0
  64. data/spec/fixtures/group_create_with_description.json +1 -0
  65. data/spec/fixtures/group_delete.json +1 -0
  66. data/spec/fixtures/group_member_edit.json +1 -0
  67. data/spec/fixtures/group_projects.json +44 -0
  68. data/spec/fixtures/group_search.json +2 -0
  69. data/spec/fixtures/label.json +1 -0
  70. data/spec/fixtures/labels.json +1 -0
  71. data/spec/fixtures/merge_request_changes.json +1 -0
  72. data/spec/fixtures/merge_request_closes_issues.json +1 -0
  73. data/spec/fixtures/{comment_merge_request.json → merge_request_comment.json} +0 -0
  74. data/spec/fixtures/merge_request_comments.json +1 -0
  75. data/spec/fixtures/merge_request_commits.json +1 -0
  76. data/spec/fixtures/milestone_issues.json +1 -0
  77. data/spec/fixtures/milestone_merge_requests.json +1 -0
  78. data/spec/fixtures/namespaces.json +1 -0
  79. data/spec/fixtures/pipeline.json +23 -0
  80. data/spec/fixtures/pipeline_cancel.json +23 -0
  81. data/spec/fixtures/pipeline_create.json +23 -0
  82. data/spec/fixtures/pipeline_retry.json +23 -0
  83. data/spec/fixtures/pipelines.json +48 -0
  84. data/spec/fixtures/project_commit.json +13 -0
  85. data/spec/fixtures/project_commit_comment.json +1 -0
  86. data/spec/fixtures/project_commit_comments.json +1 -0
  87. data/spec/fixtures/project_commit_create.json +22 -0
  88. data/spec/fixtures/project_commit_diff.json +10 -0
  89. data/spec/fixtures/project_commit_status.json +42 -0
  90. data/spec/fixtures/project_edit.json +21 -0
  91. data/spec/fixtures/project_events.json +1 -0
  92. data/spec/fixtures/project_fork.json +50 -0
  93. data/spec/fixtures/project_forked_for_user.json +50 -0
  94. data/spec/fixtures/project_runner_enable.json +7 -0
  95. data/spec/fixtures/project_runners.json +16 -0
  96. data/spec/fixtures/project_search.json +1 -0
  97. data/spec/fixtures/project_star.json +44 -0
  98. data/spec/fixtures/project_tag_annotated.json +1 -0
  99. data/spec/fixtures/project_tag_lightweight.json +1 -0
  100. data/spec/fixtures/project_unstar.json +44 -0
  101. data/spec/fixtures/project_update_commit_status.json +20 -0
  102. data/spec/fixtures/push_rule.json +1 -0
  103. data/spec/fixtures/raw_file.json +2 -0
  104. data/spec/fixtures/release_create.json +1 -0
  105. data/spec/fixtures/release_update.json +1 -0
  106. data/spec/fixtures/repository_file.json +1 -0
  107. data/spec/fixtures/runner.json +26 -0
  108. data/spec/fixtures/runner_delete.json +7 -0
  109. data/spec/fixtures/runner_edit.json +26 -0
  110. data/spec/fixtures/runners.json +16 -0
  111. data/spec/fixtures/runners_all.json +30 -0
  112. data/spec/fixtures/service.json +1 -0
  113. data/spec/fixtures/shell_history.json +2 -0
  114. data/spec/fixtures/snippet_content.json +3 -0
  115. data/spec/fixtures/system_hook.json +1 -0
  116. data/spec/fixtures/system_hooks.json +1 -0
  117. data/spec/fixtures/tag.json +1 -0
  118. data/spec/fixtures/tag_create.json +1 -0
  119. data/spec/fixtures/tag_create_with_description.json +1 -0
  120. data/spec/fixtures/tag_delete.json +1 -0
  121. data/spec/fixtures/tags.json +1 -0
  122. data/spec/fixtures/tree.json +1 -0
  123. data/spec/fixtures/trigger.json +7 -0
  124. data/spec/fixtures/triggers.json +16 -0
  125. data/spec/fixtures/user.json +1 -1
  126. data/spec/fixtures/user_block_unblock.json +1 -0
  127. data/spec/fixtures/user_email.json +1 -0
  128. data/spec/fixtures/user_emails.json +1 -0
  129. data/spec/fixtures/user_search.json +1 -0
  130. data/spec/fixtures/users.json +1 -1
  131. data/spec/fixtures/variable.json +4 -0
  132. data/spec/fixtures/variables.json +10 -0
  133. data/spec/gitlab/cli_helpers_spec.rb +57 -0
  134. data/spec/gitlab/cli_spec.rb +119 -0
  135. data/spec/gitlab/client/branches_spec.rb +99 -0
  136. data/spec/gitlab/client/build_triggers_spec.rb +67 -0
  137. data/spec/gitlab/client/build_variables_spec.rb +86 -0
  138. data/spec/gitlab/client/builds_spec.rb +148 -0
  139. data/spec/gitlab/client/client_spec.rb +11 -0
  140. data/spec/gitlab/client/commits_spec.rb +168 -0
  141. data/spec/gitlab/client/groups_spec.rb +116 -30
  142. data/spec/gitlab/client/issues_spec.rb +93 -29
  143. data/spec/gitlab/client/labels_spec.rb +68 -0
  144. data/spec/gitlab/client/merge_requests_spec.rb +171 -39
  145. data/spec/gitlab/client/milestones_spec.rb +45 -13
  146. data/spec/gitlab/client/namespaces_spec.rb +22 -0
  147. data/spec/gitlab/client/notes_spec.rb +82 -33
  148. data/spec/gitlab/client/pipelines_spec.rb +95 -0
  149. data/spec/gitlab/client/projects_spec.rb +371 -71
  150. data/spec/gitlab/client/repositories_spec.rb +51 -30
  151. data/spec/gitlab/client/repository_files_spec.rb +77 -0
  152. data/spec/gitlab/client/runners_spec.rb +185 -0
  153. data/spec/gitlab/client/services_spec.rb +55 -0
  154. data/spec/gitlab/client/snippets_spec.rb +35 -20
  155. data/spec/gitlab/client/system_hooks_spec.rb +69 -0
  156. data/spec/gitlab/client/tags_spec.rb +109 -0
  157. data/spec/gitlab/client/users_spec.rb +296 -34
  158. data/spec/gitlab/error_spec.rb +45 -0
  159. data/spec/gitlab/file_response_spec.rb +33 -0
  160. data/spec/gitlab/help_spec.rb +46 -0
  161. data/spec/gitlab/objectified_hash_spec.rb +48 -0
  162. data/spec/gitlab/page_links_spec.rb +16 -0
  163. data/spec/gitlab/paginated_response_spec.rb +60 -0
  164. data/spec/gitlab/request_spec.rb +73 -0
  165. data/spec/gitlab/shell_history_spec.rb +53 -0
  166. data/spec/gitlab/shell_spec.rb +80 -0
  167. data/spec/gitlab_spec.rb +48 -7
  168. data/spec/spec_helper.rb +24 -13
  169. metadata +287 -33
  170. data/spec/fixtures/create_merge_request.json +0 -1
  171. data/spec/fixtures/project_delete_key.json +0 -8
  172. data/spec/fixtures/update_merge_request.json +0 -1
@@ -0,0 +1,84 @@
1
+ require 'gitlab'
2
+ require 'gitlab/help'
3
+ require 'gitlab/cli_helpers'
4
+ require 'gitlab/shell_history'
5
+ require 'readline'
6
+ require 'shellwords'
7
+
8
+ class Gitlab::Shell
9
+ extend Gitlab::CLI::Helpers
10
+
11
+ class << self
12
+ attr_reader :arguments, :command
13
+
14
+ def start
15
+ trap('INT') { quit_shell } # capture ctrl-c
16
+ setup
17
+
18
+ while buffer = Readline.readline('gitlab> ')
19
+ begin
20
+ parse_input buffer
21
+
22
+ @arguments.map! { |arg| symbolize_keys(yaml_load(arg)) }
23
+
24
+ case buffer
25
+ when nil, ''
26
+ next
27
+ when 'exit'
28
+ quit_shell
29
+ when /^\bhelp\b+/
30
+ puts help(arguments[0]) { |out| out.gsub!(/Gitlab\./, 'gitlab> ') }
31
+ else
32
+ history << buffer
33
+
34
+ data = execute command, arguments
35
+ output_table command, arguments, data
36
+ end
37
+ rescue => e
38
+ puts e.message
39
+ end
40
+ end
41
+
42
+ quit_shell # save history if user presses ctrl-d
43
+ end
44
+
45
+ def parse_input(buffer)
46
+ buf = Shellwords.shellwords(buffer)
47
+
48
+ @command = buf.shift
49
+ @arguments = buf.count > 0 ? buf : []
50
+ end
51
+
52
+ def setup
53
+ history.load
54
+
55
+ Readline.completion_proc = completion
56
+ Readline.completion_append_character = ' '
57
+ end
58
+
59
+ # Gets called when user hits TAB key to do completion
60
+ def completion
61
+ proc { |str| actions.map(&:to_s).grep(/^#{Regexp.escape(str)}/) }
62
+ end
63
+
64
+ # Execute a given command with arguements
65
+ def execute(cmd=command, args=arguments)
66
+ if actions.include?(cmd.to_sym)
67
+ confirm_command(cmd)
68
+ gitlab_helper(cmd, args)
69
+ else
70
+ fail "Unknown command: #{cmd}. " \
71
+ "See the 'help' for a list of valid commands."
72
+ end
73
+ end
74
+
75
+ def quit_shell
76
+ history.save
77
+ exit
78
+ end
79
+
80
+ def history
81
+ @history ||= History.new
82
+ end
83
+ end # class << self
84
+ end
@@ -0,0 +1,59 @@
1
+ class Gitlab::Shell
2
+ class History
3
+ DEFAULT_HISTFILESIZE = 200
4
+ DEFAULT_FILE_PATH = File.join(Dir.home, '.gitlab_shell_history')
5
+
6
+ def initialize(options={})
7
+ @file_path = options[:file_path] || DEFAULT_FILE_PATH
8
+ Readline::HISTORY.clear
9
+ end
10
+
11
+ def load
12
+ read_from_file { |line| Readline::HISTORY << line.chomp }
13
+ end
14
+
15
+ def save
16
+ lines.each { |line| history_file.puts line if history_file }
17
+ end
18
+
19
+ def push(line)
20
+ Readline::HISTORY << line
21
+ end
22
+ alias_method :<<, :push
23
+
24
+ def lines
25
+ Readline::HISTORY.to_a.last(max_lines)
26
+ end
27
+
28
+ private
29
+
30
+ def history_file
31
+ if defined?(@history_file)
32
+ @history_file
33
+ else
34
+ @history_file = File.open(history_file_path, 'w', 0600).tap do |file|
35
+ file.sync = true
36
+ end
37
+ end
38
+ rescue Errno::EACCES
39
+ warn 'History not saved; unable to open your history file for writing.'
40
+ @history_file = false
41
+ end
42
+
43
+ def history_file_path
44
+ File.expand_path(@file_path)
45
+ end
46
+
47
+ def read_from_file
48
+ path = history_file_path
49
+
50
+ File.foreach(path) { |line| yield(line) } if File.exist?(path)
51
+ rescue => error
52
+ warn "History file not loaded: #{error.message}"
53
+ end
54
+
55
+ def max_lines
56
+ (ENV['GITLAB_HISTFILESIZE'] || DEFAULT_HISTFILESIZE).to_i
57
+ end
58
+ end
59
+ end
@@ -1,3 +1,3 @@
1
1
  module Gitlab
2
- VERSION = "3.0.0"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -1 +1 @@
1
- {"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"}}
1
+ {"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"},"protected": true}
@@ -0,0 +1,3 @@
1
+ {
2
+ "branch_name": "api"
3
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "Administrator",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2015-12-24T15:51:21.880Z",
13
+ "download_url": null,
14
+ "finished_at": "2015-12-24T17:54:31.198Z",
15
+ "id": 8,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": "2015-12-24T17:54:30.733Z",
21
+ "status": "failed",
22
+ "tag": false,
23
+ "user": {
24
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
25
+ "bio": null,
26
+ "created_at": "2015-12-21T13:14:24.077Z",
27
+ "id": 1,
28
+ "is_admin": true,
29
+ "linkedin": "",
30
+ "name": "John Smith",
31
+ "skype": "",
32
+ "state": "active",
33
+ "twitter": "",
34
+ "username": "root",
35
+ "web_url": "http://gitlab.dev/u/root",
36
+ "website_url": ""
37
+ }
38
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2016-01-11T10:13:33.506Z",
13
+ "download_url": null,
14
+ "finished_at": "2016-01-11T10:14:09.526Z",
15
+ "id": 69,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": null,
21
+ "status": "canceled",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "download_url": null,
13
+ "id": 69,
14
+ "name": "rubocop",
15
+ "ref": "master",
16
+ "runner": null,
17
+ "stage": "test",
18
+ "created_at": "2016-01-11T10:13:33.506Z",
19
+ "started_at": "2016-01-11T10:13:33.506Z",
20
+ "finished_at": "2016-01-11T10:15:10.506Z",
21
+ "status": "failed",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2016-01-11T10:13:33.506Z",
13
+ "download_url": null,
14
+ "finished_at": null,
15
+ "id": 69,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": null,
21
+ "status": "pending",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,78 @@
1
+ [
2
+ {
3
+ "commit": {
4
+ "author_email": "admin@example.com",
5
+ "author_name": "Administrator",
6
+ "created_at": "2015-12-24T16:51:14.000+01:00",
7
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
8
+ "message": "Test the CI integration.",
9
+ "short_id": "0ff3ae19",
10
+ "title": "Test the CI integration."
11
+ },
12
+ "coverage": null,
13
+ "created_at": "2015-12-24T15:51:21.802Z",
14
+ "download_url": null,
15
+ "finished_at": "2015-12-24T17:54:27.895Z",
16
+ "id": 7,
17
+ "name": "teaspoon",
18
+ "ref": "master",
19
+ "runner": null,
20
+ "stage": "test",
21
+ "started_at": "2015-12-24T17:54:27.722Z",
22
+ "status": "failed",
23
+ "tag": false,
24
+ "user": {
25
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
26
+ "bio": null,
27
+ "created_at": "2015-12-21T13:14:24.077Z",
28
+ "id": 1,
29
+ "is_admin": true,
30
+ "linkedin": "",
31
+ "name": "Administrator",
32
+ "skype": "",
33
+ "state": "active",
34
+ "twitter": "",
35
+ "username": "root",
36
+ "web_url": "http://gitlab.dev/u/root",
37
+ "website_url": ""
38
+ }
39
+ },
40
+ {
41
+ "commit": {
42
+ "author_email": "admin@example.com",
43
+ "author_name": "Administrator",
44
+ "created_at": "2015-12-24T16:51:14.000+01:00",
45
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
46
+ "message": "Test the CI integration.",
47
+ "short_id": "0ff3ae19",
48
+ "title": "Test the CI integration."
49
+ },
50
+ "coverage": null,
51
+ "created_at": "2015-12-24T15:51:21.727Z",
52
+ "download_url": null,
53
+ "finished_at": "2015-12-24T17:54:24.921Z",
54
+ "id": 6,
55
+ "name": "spinach:other",
56
+ "ref": "master",
57
+ "runner": null,
58
+ "stage": "test",
59
+ "started_at": "2015-12-24T17:54:24.729Z",
60
+ "status": "failed",
61
+ "tag": false,
62
+ "user": {
63
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
64
+ "bio": null,
65
+ "created_at": "2015-12-21T13:14:24.077Z",
66
+ "id": 1,
67
+ "is_admin": true,
68
+ "linkedin": "",
69
+ "name": "Administrator",
70
+ "skype": "",
71
+ "state": "active",
72
+ "twitter": "",
73
+ "username": "root",
74
+ "web_url": "http://gitlab.dev/u/root",
75
+ "website_url": ""
76
+ }
77
+ }
78
+ ]
@@ -0,0 +1,64 @@
1
+ [
2
+ {
3
+ "commit": {
4
+ "author_email": "admin@example.com",
5
+ "author_name": "Administrator",
6
+ "created_at": "2015-12-24T16:51:14.000+01:00",
7
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
8
+ "message": "Test the CI integration.",
9
+ "short_id": "0ff3ae19",
10
+ "title": "Test the CI integration."
11
+ },
12
+ "coverage": null,
13
+ "created_at": "2016-01-11T10:13:33.506Z",
14
+ "download_url": null,
15
+ "finished_at": "2016-01-11T10:14:09.526Z",
16
+ "id": 69,
17
+ "name": "rubocop",
18
+ "ref": "master",
19
+ "runner": null,
20
+ "stage": "test",
21
+ "started_at": null,
22
+ "status": "canceled",
23
+ "tag": false,
24
+ "user": null
25
+ },
26
+ {
27
+ "commit": {
28
+ "author_email": "admin@example.com",
29
+ "author_name": "Administrator",
30
+ "created_at": "2015-12-24T16:51:14.000+01:00",
31
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
32
+ "message": "Test the CI integration.",
33
+ "short_id": "0ff3ae19",
34
+ "title": "Test the CI integration."
35
+ },
36
+ "coverage": null,
37
+ "created_at": "2015-12-24T15:51:21.957Z",
38
+ "download_url": null,
39
+ "finished_at": "2015-12-24T17:54:33.913Z",
40
+ "id": 9,
41
+ "name": "brakeman",
42
+ "ref": "master",
43
+ "runner": null,
44
+ "stage": "test",
45
+ "started_at": "2015-12-24T17:54:33.727Z",
46
+ "status": "failed",
47
+ "tag": false,
48
+ "user": {
49
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
50
+ "bio": null,
51
+ "created_at": "2015-12-21T13:14:24.077Z",
52
+ "id": 1,
53
+ "is_admin": true,
54
+ "linkedin": "",
55
+ "name": "Administrator",
56
+ "skype": "",
57
+ "state": "active",
58
+ "twitter": "",
59
+ "username": "root",
60
+ "web_url": "http://gitlab.dev/u/root",
61
+ "website_url": ""
62
+ }
63
+ }
64
+ ]
@@ -0,0 +1,31 @@
1
+
2
+ {
3
+ "commit": {
4
+ "id": "12d65c8dd2b2676fa3ac47d955accc085a37a9c1",
5
+ "short_id": "12d65c8dd2b",
6
+ "title": "JS fix",
7
+ "author_name": "Dmitriy Zaporozhets",
8
+ "author_email": "dmitriy.zaporozhets@gmail.com",
9
+ "created_at": "2014-02-27T10:27:00+02:00"
10
+ },
11
+ "commits": [{
12
+ "id": "12d65c8dd2b2676fa3ac47d955accc085a37a9c1",
13
+ "short_id": "12d65c8dd2b",
14
+ "title": "JS fix",
15
+ "author_name": "Dmitriy Zaporozhets",
16
+ "author_email": "dmitriy.zaporozhets@gmail.com",
17
+ "created_at": "2014-02-27T10:27:00+02:00"
18
+ }],
19
+ "diffs": [{
20
+ "old_path": "files/js/application.js",
21
+ "new_path": "files/js/application.js",
22
+ "a_mode": null,
23
+ "b_mode": "100644",
24
+ "diff": "--- a/files/js/application.js\n+++ b/files/js/application.js\n@@ -24,8 +24,10 @@\n //= require g.raphael-min\n //= require g.bar-min\n //= require branch-graph\n-//= require highlightjs.min\n-//= require ace/ace\n //= require_tree .\n //= require d3\n //= require underscore\n+\n+function fix() { \n+ alert(\"Fixed\")\n+}",
25
+ "new_file": false,
26
+ "renamed_file": false,
27
+ "deleted_file": false
28
+ }],
29
+ "compare_timeout": false,
30
+ "compare_same_ref": false
31
+ }