GitHub PullRequestReviewCommentEvent at 2014-07-21 15:37:04
Repository: gitlabhq
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/15175737","id":15175737,"diff_hunk":"@@ -317,4 +317,73 @@ def source_branches\n       source_project.repository.branch_names\n     end\n   end\n+\n+  def conflicts\n+    # TODO stub\n+    [\n+      # Context don't touch each other nor file borders.\n+      OpenStruct.new(\n+        path: 'conflict/conflict1.md',\n+        lines: [\n+          OpenStruct.new(type: :context,  content: 'a', number: 1),\n+          OpenStruct.new(type: :context,  content: 'b', number: 2),\n+          OpenStruct.new(type: :context,  content: 'c', number: 3),\n+          OpenStruct.new(type: :conflict, id: 1,\n+            ours:   %{d d <span class=\"idiff\">2</span>\\nd <span class=\"idiff\">2</span> d\\n},\n+            base:   %{d <span class=\"idiff\">d</span> <span class=\"idiff\">d</span>\\nd <span class=\"idiff\">d</span> <span class=\"idiff\">d</span>\\n},\n+            theirs: %{d <span class=\"idiff\">1</span> d\\nd d <span class=\"idiff\">1</span>\\n},\n+            custom: %{d d 2\\nd 2 d\\n},\n+          ),\n+          OpenStruct.new(type: :context,  content: 'e', number: 5),\n+          OpenStruct.new(type: :context,  content: 'f', number: 6),\n+          OpenStruct.new(type: :context,  content: 'g', number: 7),\n+          OpenStruct.new(type: :match),\n+          OpenStruct.new(type: :context,  content: 'i', number: 9),\n+          OpenStruct.new(type: :context,  content: 'j', number: 10),\n+          OpenStruct.new(type: :context,  content: 'k', number: 11),\n+          OpenStruct.new(type: :conflict, id: 2,\n+            ours:   %{l l <span class=\"idiff\">2</span>\\nl <span class=\"idiff\">2</span> l\\n},\n+            base:   %{l <span class=\"idiff\">l</span> <span class=\"idiff\">l</span>\\nl <span class=\"idiff\">l</span> <span class=\"idiff\">l</span>\\n},\n+            theirs: %{l <span class=\"idiff\">1</span> l\\nl l <span class=\"idiff\">1</span>\\n},\n+            custom: %{l l 2\\nl 2 l\\n},\n+          ),\n+          OpenStruct.new(type: :context,  content: 'm', number: 13),\n+          OpenStruct.new(type: :context,  content: 'n', number: 14),\n+          OpenStruct.new(type: :context,  content: 'o', number: 15),\n+        ]\n+      ),\n+\n+      # Context don't touch each other nor file borders.\n+      OpenStruct.new(\n+        path: 'conflict/conflict2.md',\n+        lines: [\n+          OpenStruct.new(type: :context,  content: 'a', number: 1),\n+          OpenStruct.new(type: :context,  content: 'b', number: 2),\n+          OpenStruct.new(type: :context,  content: 'c', number: 3),\n+          OpenStruct.new(type: :conflict, id: 1,\n+            ours:   %{d d <span class=\"idiff\">2</span>\\nd <span class=\"idiff\">2</span> d\\n},\n+            base:   %{d <span class=\"idiff\">d</span> <span class=\"idiff\">d</span>\\nd <span class=\"idiff\">d</span> <span class=\"idiff\">d</span>\\n},\n+            theirs: %{d <span class=\"idiff\">1</span> d\\nd d <span class=\"idiff\">1</span>\\n},\n+            custom: %{d d 2\\nd 2 d\\n},","path":"app/models/merge_request.rb","position":51,"original_position":51,"commit_id":"6410799d92cece8a0d61387aa5ceeed51235649d","original_commit_id":"6410799d92cece8a0d61387aa5ceeed51235649d","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","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":"Align the elements of a hash literal if they span more than one line.","created_at":"2014-07-21T15:37:04Z","updated_at":"2014-07-21T15:37:04Z","html_url":"https://github.com/gitlabhq/gitlabhq/pull/7345#discussion_r15175737","pull_request_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345","_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/15175737"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/7345#discussion_r15175737"},"pull_request":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345"}}},"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345","id":18661185,"html_url":"https://github.com/gitlabhq/gitlabhq/pull/7345","diff_url":"https://github.com/gitlabhq/gitlabhq/pull/7345.diff","patch_url":"https://github.com/gitlabhq/gitlabhq/pull/7345.patch","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/7345","number":7345,"state":"open","title":"[WIP][Awaiting developer action/feedback] Resolve MR conflicts from web interface.","user":{"login":"cirosantilli","id":1429315,"avatar_url":"https://avatars.githubusercontent.com/u/1429315?","gravatar_id":"c979bd881b6755f84947a5a8ecc7c6f7","url":"https://api.github.com/users/cirosantilli","html_url":"https://github.com/cirosantilli","followers_url":"https://api.github.com/users/cirosantilli/followers","following_url":"https://api.github.com/users/cirosantilli/following{/other_user}","gists_url":"https://api.github.com/users/cirosantilli/gists{/gist_id}","starred_url":"https://api.github.com/users/cirosantilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirosantilli/subscriptions","organizations_url":"https://api.github.com/users/cirosantilli/orgs","repos_url":"https://api.github.com/users/cirosantilli/repos","events_url":"https://api.github.com/users/cirosantilli/events{/privacy}","received_events_url":"https://api.github.com/users/cirosantilli/received_events","type":"User","site_admin":false},"body":"Fixes AMR http://feedback.gitlab.com/forums/176466-general/suggestions/5590496-resolve-any-merge-request-conflict-from-the-web-in\r\n\r\nWhen there are conflicts it shows:\r\n\r\n![screenshot from 2014-07-21 17 02 05 gitlab resolve here](https://cloud.githubusercontent.com/assets/1429315/3645227/583b6906-10e8-11e4-93dc-810a19b9c137.png)\r\n\r\nThen under the `conflicts` URL, there is an AJAX tab like \"Changes\":\r\n\r\n![screenshot from 2014-07-21 17 23 40 gitlab resolve conflicts tab](https://cloud.githubusercontent.com/assets/1429315/3645505/14386436-10eb-11e4-98a2-69095b48562f.png)\r\n\r\nDetail of one of the conflicts:\r\n\r\n![screenshot from 2014-07-21 17 26 13 gitlab resolve detail](https://cloud.githubusercontent.com/assets/1429315/3645535/64850fd4-10eb-11e4-8627-24ba14af6f24.png)\r\n\r\nFor each conflict, user must select one of 4 radio boxes: `ours`, `base`, `theirs`, or `custom`.\r\n\r\n`ours`, `base` and `theirs` will contain fixed values parsed directly from `git checkout --conflict=diff3`. Bytes that changed between `ours` and `base` and `theirs` and `base` are highlighted like in the diffs with `idiff` spans by Diffy. \r\n\r\n`custom` will use the value of the textarea for a custom resolution. It's value defaults to `ours` which is a reasonable starting point for custom edits.\r\n\r\nIt is currently not possible to modify parts of the text outside of the conflict: one web UI workaround would be to leave them there, choose ours, merge the MR and only then those points by editing.\r\n\r\nTell me if the concept is OK so I can proceed do the backend.","created_at":"2014-07-21T15:36:53Z","updated_at":"2014-07-21T15:37:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b39c7503ca534e0ebdb7389bb87226975af3b7f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345/commits","review_comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345/comments","review_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/7345/comments","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/6410799d92cece8a0d61387aa5ceeed51235649d","head":{"label":"cirosantilli:resolve","ref":"resolve","sha":"6410799d92cece8a0d61387aa5ceeed51235649d","user":{"login":"cirosantilli","id":1429315,"avatar_url":"https://avatars.githubusercontent.com/u/1429315?","gravatar_id":"c979bd881b6755f84947a5a8ecc7c6f7","url":"https://api.github.com/users/cirosantilli","html_url":"https://github.com/cirosantilli","followers_url":"https://api.github.com/users/cirosantilli/followers","following_url":"https://api.github.com/users/cirosantilli/following{/other_user}","gists_url":"https://api.github.com/users/cirosantilli/gists{/gist_id}","starred_url":"https://api.github.com/users/cirosantilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirosantilli/subscriptions","organizations_url":"https://api.github.com/users/cirosantilli/orgs","repos_url":"https://api.github.com/users/cirosantilli/repos","events_url":"https://api.github.com/users/cirosantilli/events{/privacy}","received_events_url":"https://api.github.com/users/cirosantilli/received_events","type":"User","site_admin":false},"repo":{"id":20253897,"name":"gitlabhq","full_name":"cirosantilli/gitlabhq","owner":{"login":"cirosantilli","id":1429315,"avatar_url":"https://avatars.githubusercontent.com/u/1429315?","gravatar_id":"c979bd881b6755f84947a5a8ecc7c6f7","url":"https://api.github.com/users/cirosantilli","html_url":"https://github.com/cirosantilli","followers_url":"https://api.github.com/users/cirosantilli/followers","following_url":"https://api.github.com/users/cirosantilli/following{/other_user}","gists_url":"https://api.github.com/users/cirosantilli/gists{/gist_id}","starred_url":"https://api.github.com/users/cirosantilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirosantilli/subscriptions","organizations_url":"https://api.github.com/users/cirosantilli/orgs","repos_url":"https://api.github.com/users/cirosantilli/repos","events_url":"https://api.github.com/users/cirosantilli/events{/privacy}","received_events_url":"https://api.github.com/users/cirosantilli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cirosantilli/gitlabhq","description":"Project management and code hosting  application. Follow us on twitter @gitlabhq","fork":true,"url":"https://api.github.com/repos/cirosantilli/gitlabhq","forks_url":"https://api.github.com/repos/cirosantilli/gitlabhq/forks","keys_url":"https://api.github.com/repos/cirosantilli/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cirosantilli/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cirosantilli/gitlabhq/teams","hooks_url":"https://api.github.com/repos/cirosantilli/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/cirosantilli/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/cirosantilli/gitlabhq/events","assignees_url":"https://api.github.com/repos/cirosantilli/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/cirosantilli/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/cirosantilli/gitlabhq/tags","blobs_url":"https://api.github.com/repos/cirosantilli/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cirosantilli/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cirosantilli/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/cirosantilli/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cirosantilli/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/cirosantilli/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/cirosantilli/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/cirosantilli/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/cirosantilli/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/cirosantilli/gitlabhq/subscription","commits_url":"https://api.github.com/repos/cirosantilli/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/cirosantilli/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/cirosantilli/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/cirosantilli/gitlabhq/issues/comments/{number}","contents_url":"https://api.github.com/repos/cirosantilli/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/cirosantilli/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cirosantilli/gitlabhq/merges","archive_url":"https://api.github.com/repos/cirosantilli/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cirosantilli/gitlabhq/downloads","issues_url":"https://api.github.com/repos/cirosantilli/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/cirosantilli/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/cirosantilli/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/cirosantilli/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cirosantilli/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/cirosantilli/gitlabhq/releases{/id}","created_at":"2014-05-28T10:39:55Z","updated_at":"2014-07-04T06:14:34Z","pushed_at":"2014-07-21T15:01:21Z","git_url":"git://github.com/cirosantilli/gitlabhq.git","ssh_url":"git@github.com:cirosantilli/gitlabhq.git","clone_url":"https://github.com/cirosantilli/gitlabhq.git","svn_url":"https://github.com/cirosantilli/gitlabhq","homepage":"gitlab.org","size":81667,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":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":"cfde0936ea20edab82081c3f1288098c882e7de9","user":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?","gravatar_id":"95b7f387358639ec09184a76151bc690","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":2500088,"name":"gitlabhq","full_name":"gitlabhq/gitlabhq","owner":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?","gravatar_id":"95b7f387358639ec09184a76151bc690","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/gitlabhq","description":"Open source software to collaborate on code. Follow us on twitter @gitlabhq","fork":false,"url":"https://api.github.com/repos/gitlabhq/gitlabhq","forks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/forks","keys_url":"https://api.github.com/repos/gitlabhq/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlabhq/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlabhq/gitlabhq/teams","hooks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/events","assignees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/gitlabhq/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/tags","blobs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlabhq/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscription","commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments/{number}","contents_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/gitlabhq/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlabhq/gitlabhq/merges","archive_url":"https://api.github.com/repos/gitlabhq/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlabhq/gitlabhq/downloads","issues_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlabhq/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlabhq/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/gitlabhq/gitlabhq/releases{/id}","created_at":"2011-10-02T16:25:27Z","updated_at":"2014-07-21T13:06:05Z","pushed_at":"2014-07-21T10:37:18Z","git_url":"git://github.com/gitlabhq/gitlabhq.git","ssh_url":"git@github.com:gitlabhq/gitlabhq.git","clone_url":"https://github.com/gitlabhq/gitlabhq.git","svn_url":"https://github.com/gitlabhq/gitlabhq","homepage":"https://about.gitlab.com/","size":137366,"stargazers_count":13537,"watchers_count":13537,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3510,"mirror_url":null,"open_issues_count":471,"forks":3510,"open_issues":471,"watchers":13537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/7345"},"issue":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/7345"},"comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/7345/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/7345/commits"},"statuses":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/6410799d92cece8a0d61387aa5ceeed51235649d"}}}}