GitHub PullRequestEvent at 2014-07-15 16:34:15
Repository: PHPCI
Actor: Libbux
Payload: {"action":"closed","number":489,"pull_request":{"url":"https://api.github.com/repos/Block8/PHPCI/pulls/489","id":18238155,"html_url":"https://github.com/Block8/PHPCI/pull/489","diff_url":"https://github.com/Block8/PHPCI/pull/489.diff","patch_url":"https://github.com/Block8/PHPCI/pull/489.patch","issue_url":"https://api.github.com/repos/Block8/PHPCI/issues/489","number":489,"state":"closed","title":"Fix issue Block8/PHPCI#484 - generate correct commit and branch links when a port is included in the reference URL","user":{"login":"Libbux","id":2374543,"avatar_url":"https://avatars.githubusercontent.com/u/2374543?","gravatar_id":"ec8dda4d17d6a08bb61640a672c0ba5d","url":"https://api.github.com/users/Libbux","html_url":"https://github.com/Libbux","followers_url":"https://api.github.com/users/Libbux/followers","following_url":"https://api.github.com/users/Libbux/following{/other_user}","gists_url":"https://api.github.com/users/Libbux/gists{/gist_id}","starred_url":"https://api.github.com/users/Libbux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Libbux/subscriptions","organizations_url":"https://api.github.com/users/Libbux/orgs","repos_url":"https://api.github.com/users/Libbux/repos","events_url":"https://api.github.com/users/Libbux/events{/privacy}","received_events_url":"https://api.github.com/users/Libbux/received_events","type":"User","site_admin":false},"body":"This pull request fixes issue Block8/PHPCI#484, which affects the generation of links to commits and branches on the project page. \r\n\r\nWhen a project is added using the `ssh://foo@git.example.com:port/user/repo.git` form, the reference URL stored in the database includes the port number at the beginning. This is necessary as the port stored in the reference URL is used for cloning the repository, but it causes links to commits and branches on the project page (pictured below)\r\n\r\n![screen shot 2014-07-10 at 01 29 33 am](https://cloud.githubusercontent.com/assets/2374543/3533078/5471dc88-07c9-11e4-88a9-552e4e52497e.png)\r\n\r\nto point to `http://git.example.com/port/user/repo/commit|branch` (note that the port is included in the URL, thus malforming it and causing it to 404).\r\n\r\nThis pull request solves the problem by adding an *optional* boolean parameter to the `PHPCI\\Model\\Base\\getReference()` method (`Model/Base/ProjectBase.php`). \r\n\r\nIf the parameter is set to `false` or simply not included (as to not inhibit the functionality of the rest of the codebase relying on this method), the method will return the reference URL *with* the port prefix, as the assumption is that the rest of the codebase still needs to be able to access the actual reference URL properly. However, when the parameter is set to `true`, the method returns a \"link friendly\" version which does not include the port number prefix.\r\n\r\nI'll try and implement this in the other vendor-specific build models if this issue affects them, I just haven't had time to test this issue with those platforms yet.\r\n","created_at":"2014-07-10T18:42:33Z","updated_at":"2014-07-15T16:34:15Z","closed_at":"2014-07-15T16:34:15Z","merged_at":null,"merge_commit_sha":"fe6e493741038919d9f14efc0fd1542ea1d662c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Block8/PHPCI/pulls/489/commits","review_comments_url":"https://api.github.com/repos/Block8/PHPCI/pulls/489/comments","review_comment_url":"https://api.github.com/repos/Block8/PHPCI/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Block8/PHPCI/issues/489/comments","statuses_url":"https://api.github.com/repos/Block8/PHPCI/statuses/4a0deca25fd88796fa0d089292fbad88015f3720","head":{"label":"Libbux:master","ref":"master","sha":"4a0deca25fd88796fa0d089292fbad88015f3720","user":{"login":"Libbux","id":2374543,"avatar_url":"https://avatars.githubusercontent.com/u/2374543?","gravatar_id":"ec8dda4d17d6a08bb61640a672c0ba5d","url":"https://api.github.com/users/Libbux","html_url":"https://github.com/Libbux","followers_url":"https://api.github.com/users/Libbux/followers","following_url":"https://api.github.com/users/Libbux/following{/other_user}","gists_url":"https://api.github.com/users/Libbux/gists{/gist_id}","starred_url":"https://api.github.com/users/Libbux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Libbux/subscriptions","organizations_url":"https://api.github.com/users/Libbux/orgs","repos_url":"https://api.github.com/users/Libbux/repos","events_url":"https://api.github.com/users/Libbux/events{/privacy}","received_events_url":"https://api.github.com/users/Libbux/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"Block8:master","ref":"master","sha":"1696fa1d2b262eef2b1bc70594d9ec5757282aae","user":{"login":"Block8","id":2234295,"avatar_url":"https://avatars.githubusercontent.com/u/2234295?","gravatar_id":"067948c7237c54c03e7d5d694f5c00a7","url":"https://api.github.com/users/Block8","html_url":"https://github.com/Block8","followers_url":"https://api.github.com/users/Block8/followers","following_url":"https://api.github.com/users/Block8/following{/other_user}","gists_url":"https://api.github.com/users/Block8/gists{/gist_id}","starred_url":"https://api.github.com/users/Block8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block8/subscriptions","organizations_url":"https://api.github.com/users/Block8/orgs","repos_url":"https://api.github.com/users/Block8/repos","events_url":"https://api.github.com/users/Block8/events{/privacy}","received_events_url":"https://api.github.com/users/Block8/received_events","type":"Organization","site_admin":false},"repo":{"id":9982892,"name":"PHPCI","full_name":"Block8/PHPCI","owner":{"login":"Block8","id":2234295,"avatar_url":"https://avatars.githubusercontent.com/u/2234295?","gravatar_id":"067948c7237c54c03e7d5d694f5c00a7","url":"https://api.github.com/users/Block8","html_url":"https://github.com/Block8","followers_url":"https://api.github.com/users/Block8/followers","following_url":"https://api.github.com/users/Block8/following{/other_user}","gists_url":"https://api.github.com/users/Block8/gists{/gist_id}","starred_url":"https://api.github.com/users/Block8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block8/subscriptions","organizations_url":"https://api.github.com/users/Block8/orgs","repos_url":"https://api.github.com/users/Block8/repos","events_url":"https://api.github.com/users/Block8/events{/privacy}","received_events_url":"https://api.github.com/users/Block8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Block8/PHPCI","description":"PHPCI is a free and open source continuous integration tool specifically designed for PHP.","fork":false,"url":"https://api.github.com/repos/Block8/PHPCI","forks_url":"https://api.github.com/repos/Block8/PHPCI/forks","keys_url":"https://api.github.com/repos/Block8/PHPCI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Block8/PHPCI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Block8/PHPCI/teams","hooks_url":"https://api.github.com/repos/Block8/PHPCI/hooks","issue_events_url":"https://api.github.com/repos/Block8/PHPCI/issues/events{/number}","events_url":"https://api.github.com/repos/Block8/PHPCI/events","assignees_url":"https://api.github.com/repos/Block8/PHPCI/assignees{/user}","branches_url":"https://api.github.com/repos/Block8/PHPCI/branches{/branch}","tags_url":"https://api.github.com/repos/Block8/PHPCI/tags","blobs_url":"https://api.github.com/repos/Block8/PHPCI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Block8/PHPCI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Block8/PHPCI/git/refs{/sha}","trees_url":"https://api.github.com/repos/Block8/PHPCI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Block8/PHPCI/statuses/{sha}","languages_url":"https://api.github.com/repos/Block8/PHPCI/languages","stargazers_url":"https://api.github.com/repos/Block8/PHPCI/stargazers","contributors_url":"https://api.github.com/repos/Block8/PHPCI/contributors","subscribers_url":"https://api.github.com/repos/Block8/PHPCI/subscribers","subscription_url":"https://api.github.com/repos/Block8/PHPCI/subscription","commits_url":"https://api.github.com/repos/Block8/PHPCI/commits{/sha}","git_commits_url":"https://api.github.com/repos/Block8/PHPCI/git/commits{/sha}","comments_url":"https://api.github.com/repos/Block8/PHPCI/comments{/number}","issue_comment_url":"https://api.github.com/repos/Block8/PHPCI/issues/comments/{number}","contents_url":"https://api.github.com/repos/Block8/PHPCI/contents/{+path}","compare_url":"https://api.github.com/repos/Block8/PHPCI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Block8/PHPCI/merges","archive_url":"https://api.github.com/repos/Block8/PHPCI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Block8/PHPCI/downloads","issues_url":"https://api.github.com/repos/Block8/PHPCI/issues{/number}","pulls_url":"https://api.github.com/repos/Block8/PHPCI/pulls{/number}","milestones_url":"https://api.github.com/repos/Block8/PHPCI/milestones{/number}","notifications_url":"https://api.github.com/repos/Block8/PHPCI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Block8/PHPCI/labels{/name}","releases_url":"https://api.github.com/repos/Block8/PHPCI/releases{/id}","created_at":"2013-05-10T14:17:41Z","updated_at":"2014-07-15T09:29:01Z","pushed_at":"2014-07-14T15:08:21Z","git_url":"git://github.com/Block8/PHPCI.git","ssh_url":"git@github.com:Block8/PHPCI.git","clone_url":"https://github.com/Block8/PHPCI.git","svn_url":"https://github.com/Block8/PHPCI","homepage":"http://www.phptesting.org/","size":8744,"stargazers_count":1008,"watchers_count":1008,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":166,"mirror_url":null,"open_issues_count":57,"forks":166,"open_issues":57,"watchers":1008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Block8/PHPCI/pulls/489"},"html":{"href":"https://github.com/Block8/PHPCI/pull/489"},"issue":{"href":"https://api.github.com/repos/Block8/PHPCI/issues/489"},"comments":{"href":"https://api.github.com/repos/Block8/PHPCI/issues/489/comments"},"review_comments":{"href":"https://api.github.com/repos/Block8/PHPCI/pulls/489/comments"},"review_comment":{"href":"https://api.github.com/repos/Block8/PHPCI/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Block8/PHPCI/pulls/489/commits"},"statuses":{"href":"https://api.github.com/repos/Block8/PHPCI/statuses/4a0deca25fd88796fa0d089292fbad88015f3720"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"commits":6,"additions":52,"deletions":8,"changed_files":5}}