{"action":"created","comment":{"url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/comments/30551016","id":30551016,"diff_hunk":"@@ -83,12 +87,16 @@ class GitRepository implements ScmRepository {\n     }\n \n     private void callPush(String remoteName, boolean all) {\n-        repository.push(remote: remoteName, all: all)\n+        if(pushTagsOnly == false) {\n+            repository.push(remote: remoteName, all: all)\n+        }\n         repository.push(remote: remoteName, tags: true, all: all)\n     }\n \n     private void callLowLevelPush(ScmIdentity identity, String remoteName, boolean all) {\n-        pushCommand(identity, remoteName, all).call()\n+        if(pushTagsOnly == false) {","path":"src/main/groovy/pl/allegro/tech/build/axion/release/infrastructure/git/GitRepository.groovy","position":31,"original_position":31,"commit_id":"c20848e305df8b8bd54ae43de9e21dcb7c4ad08d","original_commit_id":"c20848e305df8b8bd54ae43de9e21dcb7c4ad08d","user":{"login":"szpak","id":148013,"avatar_url":"https://avatars.githubusercontent.com/u/148013?v=3","gravatar_id":"","url":"https://api.github.com/users/szpak","html_url":"https://github.com/szpak","followers_url":"https://api.github.com/users/szpak/followers","following_url":"https://api.github.com/users/szpak/following{/other_user}","gists_url":"https://api.github.com/users/szpak/gists{/gist_id}","starred_url":"https://api.github.com/users/szpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szpak/subscriptions","organizations_url":"https://api.github.com/users/szpak/orgs","repos_url":"https://api.github.com/users/szpak/repos","events_url":"https://api.github.com/users/szpak/events{/privacy}","received_events_url":"https://api.github.com/users/szpak/received_events","type":"User","site_admin":false},"body":"I agree that some people could prefer that style, but several lines earlier there is `if (!isOnExistingTag) {` and it would be probably good to keep similar style in the whole file. Of course there is a chance that `== false` is already used in some other places and maybe @adamdubiel will prefer to change everything to a verbose syntax.","created_at":"2015-05-18T21:48:35Z","updated_at":"2015-05-18T21:48:35Z","html_url":"https://github.com/allegro/axion-release-plugin/pull/81#discussion_r30551016","pull_request_url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/comments/30551016"},"html":{"href":"https://github.com/allegro/axion-release-plugin/pull/81#discussion_r30551016"},"pull_request":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81","id":35672626,"html_url":"https://github.com/allegro/axion-release-plugin/pull/81","diff_url":"https://github.com/allegro/axion-release-plugin/pull/81.diff","patch_url":"https://github.com/allegro/axion-release-plugin/pull/81.patch","issue_url":"https://api.github.com/repos/allegro/axion-release-plugin/issues/81","number":81,"state":"open","locked":false,"title":"Added repository configuration to only push tags to remote repositories","user":{"login":"erichsend","id":3843879,"avatar_url":"https://avatars.githubusercontent.com/u/3843879?v=3","gravatar_id":"","url":"https://api.github.com/users/erichsend","html_url":"https://github.com/erichsend","followers_url":"https://api.github.com/users/erichsend/followers","following_url":"https://api.github.com/users/erichsend/following{/other_user}","gists_url":"https://api.github.com/users/erichsend/gists{/gist_id}","starred_url":"https://api.github.com/users/erichsend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichsend/subscriptions","organizations_url":"https://api.github.com/users/erichsend/orgs","repos_url":"https://api.github.com/users/erichsend/repos","events_url":"https://api.github.com/users/erichsend/events{/privacy}","received_events_url":"https://api.github.com/users/erichsend/received_events","type":"User","site_admin":false},"body":"This relates to https://github.com/allegro/axion-release-plugin/issues/66\r\n\r\nIn a detached head state that can occur on some CI systems, the release task will fail when it attempts to push local commits to the remote repository. My attempt to fix was to add an optional configuration parameter to signal that only local tags, and not local commits, should be pushed to the remote repository.\r\n\r\nOutput of my jenkins job showing a successful push from a detached head state:\r\nhttps://gist.github.com/erichsend/4b9327c58dec98e22ae2\r\n","created_at":"2015-05-18T20:55:41Z","updated_at":"2015-05-18T21:48:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c61c206de336695da3bcd89976386a15cd2a49d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81/commits","review_comments_url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81/comments","review_comment_url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/allegro/axion-release-plugin/issues/81/comments","statuses_url":"https://api.github.com/repos/allegro/axion-release-plugin/statuses/c20848e305df8b8bd54ae43de9e21dcb7c4ad08d","head":{"label":"erichsend:conditional-tag-only-push","ref":"conditional-tag-only-push","sha":"c20848e305df8b8bd54ae43de9e21dcb7c4ad08d","user":{"login":"erichsend","id":3843879,"avatar_url":"https://avatars.githubusercontent.com/u/3843879?v=3","gravatar_id":"","url":"https://api.github.com/users/erichsend","html_url":"https://github.com/erichsend","followers_url":"https://api.github.com/users/erichsend/followers","following_url":"https://api.github.com/users/erichsend/following{/other_user}","gists_url":"https://api.github.com/users/erichsend/gists{/gist_id}","starred_url":"https://api.github.com/users/erichsend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichsend/subscriptions","organizations_url":"https://api.github.com/users/erichsend/orgs","repos_url":"https://api.github.com/users/erichsend/repos","events_url":"https://api.github.com/users/erichsend/events{/privacy}","received_events_url":"https://api.github.com/users/erichsend/received_events","type":"User","site_admin":false},"repo":{"id":27191648,"name":"axion-release-plugin","full_name":"erichsend/axion-release-plugin","owner":{"login":"erichsend","id":3843879,"avatar_url":"https://avatars.githubusercontent.com/u/3843879?v=3","gravatar_id":"","url":"https://api.github.com/users/erichsend","html_url":"https://github.com/erichsend","followers_url":"https://api.github.com/users/erichsend/followers","following_url":"https://api.github.com/users/erichsend/following{/other_user}","gists_url":"https://api.github.com/users/erichsend/gists{/gist_id}","starred_url":"https://api.github.com/users/erichsend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichsend/subscriptions","organizations_url":"https://api.github.com/users/erichsend/orgs","repos_url":"https://api.github.com/users/erichsend/repos","events_url":"https://api.github.com/users/erichsend/events{/privacy}","received_events_url":"https://api.github.com/users/erichsend/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erichsend/axion-release-plugin","description":"Gradle release & version management plugin.","fork":true,"url":"https://api.github.com/repos/erichsend/axion-release-plugin","forks_url":"https://api.github.com/repos/erichsend/axion-release-plugin/forks","keys_url":"https://api.github.com/repos/erichsend/axion-release-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erichsend/axion-release-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erichsend/axion-release-plugin/teams","hooks_url":"https://api.github.com/repos/erichsend/axion-release-plugin/hooks","issue_events_url":"https://api.github.com/repos/erichsend/axion-release-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/erichsend/axion-release-plugin/events","assignees_url":"https://api.github.com/repos/erichsend/axion-release-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/erichsend/axion-release-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/erichsend/axion-release-plugin/tags","blobs_url":"https://api.github.com/repos/erichsend/axion-release-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erichsend/axion-release-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erichsend/axion-release-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/erichsend/axion-release-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erichsend/axion-release-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/erichsend/axion-release-plugin/languages","stargazers_url":"https://api.github.com/repos/erichsend/axion-release-plugin/stargazers","contributors_url":"https://api.github.com/repos/erichsend/axion-release-plugin/contributors","subscribers_url":"https://api.github.com/repos/erichsend/axion-release-plugin/subscribers","subscription_url":"https://api.github.com/repos/erichsend/axion-release-plugin/subscription","commits_url":"https://api.github.com/repos/erichsend/axion-release-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/erichsend/axion-release-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/erichsend/axion-release-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/erichsend/axion-release-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/erichsend/axion-release-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/erichsend/axion-release-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erichsend/axion-release-plugin/merges","archive_url":"https://api.github.com/repos/erichsend/axion-release-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erichsend/axion-release-plugin/downloads","issues_url":"https://api.github.com/repos/erichsend/axion-release-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/erichsend/axion-release-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/erichsend/axion-release-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/erichsend/axion-release-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erichsend/axion-release-plugin/labels{/name}","releases_url":"https://api.github.com/repos/erichsend/axion-release-plugin/releases{/id}","created_at":"2014-11-26T18:59:22Z","updated_at":"2014-11-26T18:59:22Z","pushed_at":"2015-05-18T19:49:53Z","git_url":"git://github.com/erichsend/axion-release-plugin.git","ssh_url":"git@github.com:erichsend/axion-release-plugin.git","clone_url":"https://github.com/erichsend/axion-release-plugin.git","svn_url":"https://github.com/erichsend/axion-release-plugin","homepage":null,"size":194,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"allegro:master","ref":"master","sha":"a5de4d725814ff907a8cf1f5666b9f01e8361655","user":{"login":"allegro","id":562236,"avatar_url":"https://avatars.githubusercontent.com/u/562236?v=3","gravatar_id":"","url":"https://api.github.com/users/allegro","html_url":"https://github.com/allegro","followers_url":"https://api.github.com/users/allegro/followers","following_url":"https://api.github.com/users/allegro/following{/other_user}","gists_url":"https://api.github.com/users/allegro/gists{/gist_id}","starred_url":"https://api.github.com/users/allegro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allegro/subscriptions","organizations_url":"https://api.github.com/users/allegro/orgs","repos_url":"https://api.github.com/users/allegro/repos","events_url":"https://api.github.com/users/allegro/events{/privacy}","received_events_url":"https://api.github.com/users/allegro/received_events","type":"Organization","site_admin":false},"repo":{"id":24092835,"name":"axion-release-plugin","full_name":"allegro/axion-release-plugin","owner":{"login":"allegro","id":562236,"avatar_url":"https://avatars.githubusercontent.com/u/562236?v=3","gravatar_id":"","url":"https://api.github.com/users/allegro","html_url":"https://github.com/allegro","followers_url":"https://api.github.com/users/allegro/followers","following_url":"https://api.github.com/users/allegro/following{/other_user}","gists_url":"https://api.github.com/users/allegro/gists{/gist_id}","starred_url":"https://api.github.com/users/allegro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allegro/subscriptions","organizations_url":"https://api.github.com/users/allegro/orgs","repos_url":"https://api.github.com/users/allegro/repos","events_url":"https://api.github.com/users/allegro/events{/privacy}","received_events_url":"https://api.github.com/users/allegro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/allegro/axion-release-plugin","description":"Gradle release & version management plugin.","fork":false,"url":"https://api.github.com/repos/allegro/axion-release-plugin","forks_url":"https://api.github.com/repos/allegro/axion-release-plugin/forks","keys_url":"https://api.github.com/repos/allegro/axion-release-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allegro/axion-release-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allegro/axion-release-plugin/teams","hooks_url":"https://api.github.com/repos/allegro/axion-release-plugin/hooks","issue_events_url":"https://api.github.com/repos/allegro/axion-release-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/allegro/axion-release-plugin/events","assignees_url":"https://api.github.com/repos/allegro/axion-release-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/allegro/axion-release-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/allegro/axion-release-plugin/tags","blobs_url":"https://api.github.com/repos/allegro/axion-release-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allegro/axion-release-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allegro/axion-release-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/allegro/axion-release-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allegro/axion-release-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/allegro/axion-release-plugin/languages","stargazers_url":"https://api.github.com/repos/allegro/axion-release-plugin/stargazers","contributors_url":"https://api.github.com/repos/allegro/axion-release-plugin/contributors","subscribers_url":"https://api.github.com/repos/allegro/axion-release-plugin/subscribers","subscription_url":"https://api.github.com/repos/allegro/axion-release-plugin/subscription","commits_url":"https://api.github.com/repos/allegro/axion-release-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/allegro/axion-release-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/allegro/axion-release-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/allegro/axion-release-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/allegro/axion-release-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/allegro/axion-release-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allegro/axion-release-plugin/merges","archive_url":"https://api.github.com/repos/allegro/axion-release-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allegro/axion-release-plugin/downloads","issues_url":"https://api.github.com/repos/allegro/axion-release-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/allegro/axion-release-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/allegro/axion-release-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/allegro/axion-release-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allegro/axion-release-plugin/labels{/name}","releases_url":"https://api.github.com/repos/allegro/axion-release-plugin/releases{/id}","created_at":"2014-09-16T09:09:16Z","updated_at":"2015-05-17T20:39:55Z","pushed_at":"2015-05-18T20:55:43Z","git_url":"git://github.com/allegro/axion-release-plugin.git","ssh_url":"git@github.com:allegro/axion-release-plugin.git","clone_url":"https://github.com/allegro/axion-release-plugin.git","svn_url":"https://github.com/allegro/axion-release-plugin","homepage":null,"size":1143,"stargazers_count":58,"watchers_count":58,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":13,"forks":13,"open_issues":13,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81"},"html":{"href":"https://github.com/allegro/axion-release-plugin/pull/81"},"issue":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/issues/81"},"comments":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/allegro/axion-release-plugin/statuses/c20848e305df8b8bd54ae43de9e21dcb7c4ad08d"}}}}