{"action":"created","comment":{"url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/comments/46448794","id":46448794,"diff_hunk":"@@ -0,0 +1,71 @@\n+package com.e_gineering;\n+\n+import org.apache.maven.execution.MavenSession;\n+import org.apache.maven.model.Scm;\n+import org.apache.maven.plugin.BuildPluginManager;\n+import org.apache.maven.plugin.MojoExecutionException;\n+import org.apache.maven.plugin.MojoFailureException;\n+import org.apache.maven.plugins.annotations.Component;\n+import org.apache.maven.plugins.annotations.LifecyclePhase;\n+import org.apache.maven.plugins.annotations.Mojo;\n+import org.apache.maven.plugins.annotations.Parameter;\n+\n+import static org.twdata.maven.mojoexecutor.MojoExecutor.*;\n+\n+/**\n+ * Invokes configures the builds SCM settings based on environment variables from Jenkins, and does an scm:tag\n+ * If the env.GIT_BRANCH matches the masterBranchPattern.\n+ */\n+@Mojo(name = \"tag-master\", defaultPhase = LifecyclePhase.VERIFY)\n+public class TagMasterMojo extends AbstractGitEnforcerMojo {\n+\n+    @Parameter(defaultValue = \"${project.version}\", property = \"tag\", required = true)\n+    private String tag;\n+\n+    @Component\n+    private MavenSession mavenSession;\n+\n+    @Component\n+    private BuildPluginManager pluginManager;\n+\n+    public void execute() throws MojoFailureException, MojoExecutionException {\n+        String gitBranch = System.getenv(\"GIT_BRANCH\");\n+        String gitURL = System.getenv(\"GIT_URL\");\n+\n+        if (gitBranch != null && gitURL != null) {\n+            getLog().info(\"Detected GIT_BRANCH: '\" + gitBranch + \"' in build environment.\");\n+            getLog().info(\"Detected GIT_URL: '\" + gitURL + \"' in build enviornment.\");","path":"src/main/java/com/e_gineering/TagMasterMojo.java","position":37,"original_position":37,"commit_id":"7ef9d014e96fe452da99d9f05ce1e418fa5a710f","original_commit_id":"7ef9d014e96fe452da99d9f05ce1e418fa5a710f","user":{"login":"nderwin","id":3226831,"avatar_url":"https://avatars.githubusercontent.com/u/3226831?v=3","gravatar_id":"","url":"https://api.github.com/users/nderwin","html_url":"https://github.com/nderwin","followers_url":"https://api.github.com/users/nderwin/followers","following_url":"https://api.github.com/users/nderwin/following{/other_user}","gists_url":"https://api.github.com/users/nderwin/gists{/gist_id}","starred_url":"https://api.github.com/users/nderwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nderwin/subscriptions","organizations_url":"https://api.github.com/users/nderwin/orgs","repos_url":"https://api.github.com/users/nderwin/repos","events_url":"https://api.github.com/users/nderwin/events{/privacy}","received_events_url":"https://api.github.com/users/nderwin/received_events","type":"User","site_admin":false},"body":"Typo on \"environment\"","created_at":"2015-12-02T17:53:33Z","updated_at":"2015-12-02T17:53:33Z","html_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3#discussion_r46448794","pull_request_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/comments/46448794"},"html":{"href":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3#discussion_r46448794"},"pull_request":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3","id":52424552,"html_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3","diff_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3.diff","patch_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3.patch","issue_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/3","number":3,"state":"open","locked":false,"title":"Minor fixes and added tagging.","user":{"login":"bvarner","id":1652015,"avatar_url":"https://avatars.githubusercontent.com/u/1652015?v=3","gravatar_id":"","url":"https://api.github.com/users/bvarner","html_url":"https://github.com/bvarner","followers_url":"https://api.github.com/users/bvarner/followers","following_url":"https://api.github.com/users/bvarner/following{/other_user}","gists_url":"https://api.github.com/users/bvarner/gists{/gist_id}","starred_url":"https://api.github.com/users/bvarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvarner/subscriptions","organizations_url":"https://api.github.com/users/bvarner/orgs","repos_url":"https://api.github.com/users/bvarner/repos","events_url":"https://api.github.com/users/bvarner/events{/privacy}","received_events_url":"https://api.github.com/users/bvarner/received_events","type":"User","site_admin":false},"body":"Now supports conditional tagging in the verify phase, using the GIT information provided by a jenkins / hudson build.","created_at":"2015-12-02T17:07:37Z","updated_at":"2015-12-02T17:53:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d99676c2744a34f9a967f2b7987c57eb9cc4e7bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3/commits","review_comments_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3/comments","review_comment_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/3/comments","statuses_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/statuses/7ef9d014e96fe452da99d9f05ce1e418fa5a710f","head":{"label":"egineering-llc:fixes-and-tagging","ref":"fixes-and-tagging","sha":"7ef9d014e96fe452da99d9f05ce1e418fa5a710f","user":{"login":"egineering-llc","id":3812028,"avatar_url":"https://avatars.githubusercontent.com/u/3812028?v=3","gravatar_id":"","url":"https://api.github.com/users/egineering-llc","html_url":"https://github.com/egineering-llc","followers_url":"https://api.github.com/users/egineering-llc/followers","following_url":"https://api.github.com/users/egineering-llc/following{/other_user}","gists_url":"https://api.github.com/users/egineering-llc/gists{/gist_id}","starred_url":"https://api.github.com/users/egineering-llc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egineering-llc/subscriptions","organizations_url":"https://api.github.com/users/egineering-llc/orgs","repos_url":"https://api.github.com/users/egineering-llc/repos","events_url":"https://api.github.com/users/egineering-llc/events{/privacy}","received_events_url":"https://api.github.com/users/egineering-llc/received_events","type":"Organization","site_admin":false},"repo":{"id":47195499,"name":"gitflow-helper-maven-plugin","full_name":"egineering-llc/gitflow-helper-maven-plugin","owner":{"login":"egineering-llc","id":3812028,"avatar_url":"https://avatars.githubusercontent.com/u/3812028?v=3","gravatar_id":"","url":"https://api.github.com/users/egineering-llc","html_url":"https://github.com/egineering-llc","followers_url":"https://api.github.com/users/egineering-llc/followers","following_url":"https://api.github.com/users/egineering-llc/following{/other_user}","gists_url":"https://api.github.com/users/egineering-llc/gists{/gist_id}","starred_url":"https://api.github.com/users/egineering-llc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egineering-llc/subscriptions","organizations_url":"https://api.github.com/users/egineering-llc/orgs","repos_url":"https://api.github.com/users/egineering-llc/repos","events_url":"https://api.github.com/users/egineering-llc/events{/privacy}","received_events_url":"https://api.github.com/users/egineering-llc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin","description":"A Maven plugin for enforcing gitflow version semantics and configuring maven deployment targets based on environment variables populated by Jenkins / Hudson","fork":false,"url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin","forks_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/forks","keys_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/teams","hooks_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/events","assignees_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/tags","blobs_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/subscription","commits_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/merges","archive_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/downloads","issues_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/releases{/id}","created_at":"2015-12-01T14:42:25Z","updated_at":"2015-12-02T04:52:44Z","pushed_at":"2015-12-02T17:07:37Z","git_url":"git://github.com/egineering-llc/gitflow-helper-maven-plugin.git","ssh_url":"git@github.com:egineering-llc/gitflow-helper-maven-plugin.git","clone_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin.git","svn_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin","homepage":null,"size":24,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"egineering-llc:development","ref":"development","sha":"f1af1bf9d3178330165c17e40fa0fd9df009a6ae","user":{"login":"egineering-llc","id":3812028,"avatar_url":"https://avatars.githubusercontent.com/u/3812028?v=3","gravatar_id":"","url":"https://api.github.com/users/egineering-llc","html_url":"https://github.com/egineering-llc","followers_url":"https://api.github.com/users/egineering-llc/followers","following_url":"https://api.github.com/users/egineering-llc/following{/other_user}","gists_url":"https://api.github.com/users/egineering-llc/gists{/gist_id}","starred_url":"https://api.github.com/users/egineering-llc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egineering-llc/subscriptions","organizations_url":"https://api.github.com/users/egineering-llc/orgs","repos_url":"https://api.github.com/users/egineering-llc/repos","events_url":"https://api.github.com/users/egineering-llc/events{/privacy}","received_events_url":"https://api.github.com/users/egineering-llc/received_events","type":"Organization","site_admin":false},"repo":{"id":47195499,"name":"gitflow-helper-maven-plugin","full_name":"egineering-llc/gitflow-helper-maven-plugin","owner":{"login":"egineering-llc","id":3812028,"avatar_url":"https://avatars.githubusercontent.com/u/3812028?v=3","gravatar_id":"","url":"https://api.github.com/users/egineering-llc","html_url":"https://github.com/egineering-llc","followers_url":"https://api.github.com/users/egineering-llc/followers","following_url":"https://api.github.com/users/egineering-llc/following{/other_user}","gists_url":"https://api.github.com/users/egineering-llc/gists{/gist_id}","starred_url":"https://api.github.com/users/egineering-llc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egineering-llc/subscriptions","organizations_url":"https://api.github.com/users/egineering-llc/orgs","repos_url":"https://api.github.com/users/egineering-llc/repos","events_url":"https://api.github.com/users/egineering-llc/events{/privacy}","received_events_url":"https://api.github.com/users/egineering-llc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin","description":"A Maven plugin for enforcing gitflow version semantics and configuring maven deployment targets based on environment variables populated by Jenkins / Hudson","fork":false,"url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin","forks_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/forks","keys_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/teams","hooks_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/events","assignees_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/tags","blobs_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/subscription","commits_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/merges","archive_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/downloads","issues_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/releases{/id}","created_at":"2015-12-01T14:42:25Z","updated_at":"2015-12-02T04:52:44Z","pushed_at":"2015-12-02T17:07:37Z","git_url":"git://github.com/egineering-llc/gitflow-helper-maven-plugin.git","ssh_url":"git@github.com:egineering-llc/gitflow-helper-maven-plugin.git","clone_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin.git","svn_url":"https://github.com/egineering-llc/gitflow-helper-maven-plugin","homepage":null,"size":24,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3"},"html":{"href":"https://github.com/egineering-llc/gitflow-helper-maven-plugin/pull/3"},"issue":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/3"},"comments":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/egineering-llc/gitflow-helper-maven-plugin/statuses/7ef9d014e96fe452da99d9f05ce1e418fa5a710f"}}}}