GitHub PullRequestReviewCommentEvent at 2014-10-02 17:01:08
Repository: gitlab-ci
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/comments/18351980","id":18351980,"diff_hunk":"@@ -157,8 +184,73 @@ def complete?\n     canceled? || success? || failed?\n   end\n \n+  def build_attributes_formatted\n+    build_attributes[\"config\"].to_yaml.sub(\"---\\n\", '').gsub(/^:/, '') if build_attributes.is_a?(Hash) and build_attributes[\"config\"]\n+  end\n+\n+  def matrix_attributes_formatted\n+    matrix_attributes.to_yaml.sub(\"---\\n\", '').gsub(/^:/, '') if matrix_attributes.is_a?(Hash)\n+  end\n+\n   def commands\n-    project.scripts\n+    case build_method\n+      when 'travis'\n+        data = { config: build_attributes.deep_symbolize_keys } if build_attributes['os']\n+        data ||= build_attributes.deep_symbolize_keys\n+        data = data.deep_merge({\n+            urls: {\n+            },\n+            repository: {\n+                source_url: repo_url,\n+                slug: repo_slug\n+            },\n+            source: {\n+                id: build_id,\n+                number: build_concurrent_id\n+            },\n+            job: {\n+                id: build_id,\n+                number: \"#{build_id}.#{build_concurrent_id}\",\n+                branch: ref,\n+                commit: sha,\n+                commit_range: \"#{short_before_sha}..#{short_sha}\",\n+                pull_request: false,\n+                tag: \"project_#{project.id}_build_#{id}\"\n+            },\n+            timeouts: {\n+                # git_clone: 300\n+            }\n+        })\n+\n+        if travis_build = GitlabCi.config.travis_build\n+          data = Extension.deep_merge(data, travis_build.deep_symbolize_keys) do |k, tv, v|","path":"app/models/build.rb","position":131,"original_position":131,"commit_id":"d2994f0f2b1f7878e146d7a32fdd1f01481ebc3c","original_commit_id":"d2994f0f2b1f7878e146d7a32fdd1f01481ebc3c","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Unused block argument - `k`. If it's necessary, use `_` or `_k` as an argument name to indicate that it won't be used.<br>Line is too long. [91/80]","created_at":"2014-10-02T17:01:08Z","updated_at":"2014-10-02T17:01:08Z","html_url":"https://github.com/gitlabhq/gitlab-ci/pull/462#discussion_r18351980","pull_request_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462","_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/comments/18351980"},"html":{"href":"https://github.com/gitlabhq/gitlab-ci/pull/462#discussion_r18351980"},"pull_request":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462"}}},"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462","id":19675050,"html_url":"https://github.com/gitlabhq/gitlab-ci/pull/462","diff_url":"https://github.com/gitlabhq/gitlab-ci/pull/462.diff","patch_url":"https://github.com/gitlabhq/gitlab-ci/pull/462.patch","issue_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/462","number":462,"state":"open","locked":false,"title":"Added Travis-CI compatibility layer","user":{"login":"ayufan","id":2419009,"avatar_url":"https://avatars.githubusercontent.com/u/2419009?v=2","gravatar_id":"","url":"https://api.github.com/users/ayufan","html_url":"https://github.com/ayufan","followers_url":"https://api.github.com/users/ayufan/followers","following_url":"https://api.github.com/users/ayufan/following{/other_user}","gists_url":"https://api.github.com/users/ayufan/gists{/gist_id}","starred_url":"https://api.github.com/users/ayufan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayufan/subscriptions","organizations_url":"https://api.github.com/users/ayufan/orgs","repos_url":"https://api.github.com/users/ayufan/repos","events_url":"https://api.github.com/users/ayufan/events{/privacy}","received_events_url":"https://api.github.com/users/ayufan/received_events","type":"User","site_admin":false},"body":"WARNING: This is WIP, please do not merge. This is preliminary work which still requires significant changes: i.e. better handling build matrix in terms of database representation and views.\r\n\r\nThis Pull Request adds Travis-CI support in GitLab CI. Most of the features already work: build matrices, languages, OSes. In order to test these changes at least this PR is required: https://github.com/gitlabhq/gitlab-ci-runner/pull/99. It uses Travis-CI libraries: https://github.com/travis-ci/travis-build and https://github.com/travis-ci/travis-yaml to create build matrix and generate shell script. Travis images can be built using https://github.com/travis-ci/travis-images or using my script: https://github.com/ayufan/travis-images/blob/master/build_docker_templates.\r\n\r\n- Use Travis::YAML to generate build matrices\r\n- Use Travis::Build to generate build scripts\r\n- Fetch .travis.yml from GitLab repository\r\n- Support for limiting runners with OS and Language support\r\n- Support for runners which can handle only build for project\r\n- Added 'Build Now' view which allows to force build\r\n- When using 'Deploy' in 'Build Now' try to fetch .release.yml first\r\n\r\n","created_at":"2014-08-12T17:01:15Z","updated_at":"2014-10-02T17:01:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26704a74465c0c3361c03d38ff86c5fddf56a4d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462/commits","review_comments_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462/comments","review_comment_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/462/comments","statuses_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/statuses/d2994f0f2b1f7878e146d7a32fdd1f01481ebc3c","head":{"label":"ayufan:topic/travis_support","ref":"topic/travis_support","sha":"d2994f0f2b1f7878e146d7a32fdd1f01481ebc3c","user":{"login":"ayufan","id":2419009,"avatar_url":"https://avatars.githubusercontent.com/u/2419009?v=2","gravatar_id":"","url":"https://api.github.com/users/ayufan","html_url":"https://github.com/ayufan","followers_url":"https://api.github.com/users/ayufan/followers","following_url":"https://api.github.com/users/ayufan/following{/other_user}","gists_url":"https://api.github.com/users/ayufan/gists{/gist_id}","starred_url":"https://api.github.com/users/ayufan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayufan/subscriptions","organizations_url":"https://api.github.com/users/ayufan/orgs","repos_url":"https://api.github.com/users/ayufan/repos","events_url":"https://api.github.com/users/ayufan/events{/privacy}","received_events_url":"https://api.github.com/users/ayufan/received_events","type":"User","site_admin":false},"repo":{"id":22503242,"name":"gitlab-ci","full_name":"ayufan/gitlab-ci","owner":{"login":"ayufan","id":2419009,"avatar_url":"https://avatars.githubusercontent.com/u/2419009?v=2","gravatar_id":"","url":"https://api.github.com/users/ayufan","html_url":"https://github.com/ayufan","followers_url":"https://api.github.com/users/ayufan/followers","following_url":"https://api.github.com/users/ayufan/following{/other_user}","gists_url":"https://api.github.com/users/ayufan/gists{/gist_id}","starred_url":"https://api.github.com/users/ayufan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayufan/subscriptions","organizations_url":"https://api.github.com/users/ayufan/orgs","repos_url":"https://api.github.com/users/ayufan/repos","events_url":"https://api.github.com/users/ayufan/events{/privacy}","received_events_url":"https://api.github.com/users/ayufan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ayufan/gitlab-ci","description":"Continuous integration server for gitlabhq | Coordinator","fork":true,"url":"https://api.github.com/repos/ayufan/gitlab-ci","forks_url":"https://api.github.com/repos/ayufan/gitlab-ci/forks","keys_url":"https://api.github.com/repos/ayufan/gitlab-ci/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayufan/gitlab-ci/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayufan/gitlab-ci/teams","hooks_url":"https://api.github.com/repos/ayufan/gitlab-ci/hooks","issue_events_url":"https://api.github.com/repos/ayufan/gitlab-ci/issues/events{/number}","events_url":"https://api.github.com/repos/ayufan/gitlab-ci/events","assignees_url":"https://api.github.com/repos/ayufan/gitlab-ci/assignees{/user}","branches_url":"https://api.github.com/repos/ayufan/gitlab-ci/branches{/branch}","tags_url":"https://api.github.com/repos/ayufan/gitlab-ci/tags","blobs_url":"https://api.github.com/repos/ayufan/gitlab-ci/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayufan/gitlab-ci/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayufan/gitlab-ci/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayufan/gitlab-ci/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayufan/gitlab-ci/statuses/{sha}","languages_url":"https://api.github.com/repos/ayufan/gitlab-ci/languages","stargazers_url":"https://api.github.com/repos/ayufan/gitlab-ci/stargazers","contributors_url":"https://api.github.com/repos/ayufan/gitlab-ci/contributors","subscribers_url":"https://api.github.com/repos/ayufan/gitlab-ci/subscribers","subscription_url":"https://api.github.com/repos/ayufan/gitlab-ci/subscription","commits_url":"https://api.github.com/repos/ayufan/gitlab-ci/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayufan/gitlab-ci/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayufan/gitlab-ci/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayufan/gitlab-ci/issues/comments/{number}","contents_url":"https://api.github.com/repos/ayufan/gitlab-ci/contents/{+path}","compare_url":"https://api.github.com/repos/ayufan/gitlab-ci/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayufan/gitlab-ci/merges","archive_url":"https://api.github.com/repos/ayufan/gitlab-ci/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayufan/gitlab-ci/downloads","issues_url":"https://api.github.com/repos/ayufan/gitlab-ci/issues{/number}","pulls_url":"https://api.github.com/repos/ayufan/gitlab-ci/pulls{/number}","milestones_url":"https://api.github.com/repos/ayufan/gitlab-ci/milestones{/number}","notifications_url":"https://api.github.com/repos/ayufan/gitlab-ci/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayufan/gitlab-ci/labels{/name}","releases_url":"https://api.github.com/repos/ayufan/gitlab-ci/releases{/id}","created_at":"2014-08-01T09:24:50Z","updated_at":"2014-08-01T09:27:07Z","pushed_at":"2014-10-02T17:01:00Z","git_url":"git://github.com/ayufan/gitlab-ci.git","ssh_url":"git@github.com:ayufan/gitlab-ci.git","clone_url":"https://github.com/ayufan/gitlab-ci.git","svn_url":"https://github.com/ayufan/gitlab-ci","homepage":"https://www.gitlab.com/gitlab-ci/","size":2723,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gitlabhq:master","ref":"master","sha":"1db1755b3b3e38abae4408383dab9b5be127b851","user":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=2","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"repo":{"id":6154653,"name":"gitlab-ci","full_name":"gitlabhq/gitlab-ci","owner":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=2","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlabhq/gitlab-ci","description":"Continuous integration server for gitlabhq | Coordinator","fork":false,"url":"https://api.github.com/repos/gitlabhq/gitlab-ci","forks_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/forks","keys_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/teams","hooks_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/hooks","issue_events_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/events{/number}","events_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/events","assignees_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/assignees{/user}","branches_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/branches{/branch}","tags_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/tags","blobs_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/languages","stargazers_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/stargazers","contributors_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/contributors","subscribers_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/subscribers","subscription_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/subscription","commits_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/comments/{number}","contents_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/contents/{+path}","compare_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/merges","archive_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/downloads","issues_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues{/number}","pulls_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/labels{/name}","releases_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/releases{/id}","created_at":"2012-10-10T09:00:53Z","updated_at":"2014-10-02T10:33:45Z","pushed_at":"2014-10-02T15:20:08Z","git_url":"git://github.com/gitlabhq/gitlab-ci.git","ssh_url":"git@github.com:gitlabhq/gitlab-ci.git","clone_url":"https://github.com/gitlabhq/gitlab-ci.git","svn_url":"https://github.com/gitlabhq/gitlab-ci","homepage":"https://www.gitlab.com/gitlab-ci/","size":6625,"stargazers_count":1177,"watchers_count":1177,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":285,"mirror_url":null,"open_issues_count":114,"forks":285,"open_issues":114,"watchers":1177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462"},"html":{"href":"https://github.com/gitlabhq/gitlab-ci/pull/462"},"issue":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/462"},"comments":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/462/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/462/commits"},"statuses":{"href":"https://api.github.com/repos/gitlabhq/gitlab-ci/statuses/d2994f0f2b1f7878e146d7a32fdd1f01481ebc3c"}}}}