{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/comments/78666658","id":78666658,"diff_hunk":"@@ -0,0 +1,138 @@\n+/*\n+ * The MIT License\n+ *\n+ * Copyright (c) 2016, CloudBees, Inc.\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+\n+package org.jenkinsci.plugins.workflow.actions;\n+\n+import hudson.model.Action;\n+import org.jenkinsci.plugins.workflow.graph.FlowNode;\n+\n+import javax.annotation.CheckForNull;\n+import javax.annotation.Nonnull;\n+import java.util.Collections;\n+import java.util.LinkedHashMap;\n+import java.util.Map;\n+import java.util.Set;\n+\n+/**\n+ * Tracks arbitrary annotations on FlowNode used for a variety of purposes\n+ * This is designed to have a single action on the FlowNode to track all tags, for sanity.\n+ * Flexible implementation of JENKINS-26522, with Strings for the annotation.\n+ */\n+public class TagsAction implements Action{\n+    private static final String displayName = \"Tags\";\n+    private static final String urlSuffix = \"tags\";\n+\n+    private LinkedHashMap<String, String> tags = new LinkedHashMap<String, String>();\n+\n+    /**\n+     * Add a tag key:value pair to this FlowNode, null or empty values are ignored\n+     * Inputs are CheckForNull so you can directly pass in values without nullchecks upfront.\n+     * @param tag Tag to add to, null or empty values are no-ops\n+     * @param value Tag to add to, null or empty values are no-ops\n+     */\n+    public void addTag(@CheckForNull String tag, @@CheckForNull String value) {","path":"src/main/java/org/jenkinsci/plugins/workflow/actions/TagsAction.java","position":null,"original_position":54,"commit_id":"80a9140a50b47b0491a4ea58819a1e45a345ad4a","original_commit_id":"1e4af1145a27b341c067ec77d1ba747585b669ee","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"body":"`@@`? =) ","created_at":"2016-09-13T23:58:50Z","updated_at":"2016-09-13T23:58:50Z","html_url":"https://github.com/jenkinsci/workflow-api-plugin/pull/12#discussion_r78666658","pull_request_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/comments/78666658"},"html":{"href":"https://github.com/jenkinsci/workflow-api-plugin/pull/12#discussion_r78666658"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12","id":85091098,"html_url":"https://github.com/jenkinsci/workflow-api-plugin/pull/12","diff_url":"https://github.com/jenkinsci/workflow-api-plugin/pull/12.diff","patch_url":"https://github.com/jenkinsci/workflow-api-plugin/pull/12.patch","issue_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/12","number":12,"state":"open","locked":false,"title":"Create a new TagsAction [JENKINS-26522]","user":{"login":"svanoort","id":5400948,"avatar_url":"https://avatars.githubusercontent.com/u/5400948?v=3","gravatar_id":"","url":"https://api.github.com/users/svanoort","html_url":"https://github.com/svanoort","followers_url":"https://api.github.com/users/svanoort/followers","following_url":"https://api.github.com/users/svanoort/following{/other_user}","gists_url":"https://api.github.com/users/svanoort/gists{/gist_id}","starred_url":"https://api.github.com/users/svanoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanoort/subscriptions","organizations_url":"https://api.github.com/users/svanoort/orgs","repos_url":"https://api.github.com/users/svanoort/repos","events_url":"https://api.github.com/users/svanoort/events{/privacy}","received_events_url":"https://api.github.com/users/svanoort/received_events","type":"User","site_admin":false},"body":"Used for a variety of annotations for [JENKINS-26522](https://issues.jenkins-ci.org/browse/JENKINS-26522)","created_at":"2016-09-13T17:29:23Z","updated_at":"2016-09-13T23:58:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b767d6d388e7b46bb7150684c9d360e6319013ea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/12/comments","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/statuses/80a9140a50b47b0491a4ea58819a1e45a345ad4a","head":{"label":"jenkinsci:tagsaction-JENKINS-26522","ref":"tagsaction-JENKINS-26522","sha":"80a9140a50b47b0491a4ea58819a1e45a345ad4a","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":55527408,"name":"workflow-api-plugin","full_name":"jenkinsci/workflow-api-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/workflow-api-plugin","description":"","fork":false,"url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin","forks_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/deployments","created_at":"2016-04-05T17:18:43Z","updated_at":"2016-08-24T19:11:30Z","pushed_at":"2016-09-13T23:58:22Z","git_url":"git://github.com/jenkinsci/workflow-api-plugin.git","ssh_url":"git@github.com:jenkinsci/workflow-api-plugin.git","clone_url":"https://github.com/jenkinsci/workflow-api-plugin.git","svn_url":"https://github.com/jenkinsci/workflow-api-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+API+Plugin","size":463,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"8ca82ae8180dc0869f083f2684c291e2faa18222","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":55527408,"name":"workflow-api-plugin","full_name":"jenkinsci/workflow-api-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/workflow-api-plugin","description":"","fork":false,"url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin","forks_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/deployments","created_at":"2016-04-05T17:18:43Z","updated_at":"2016-08-24T19:11:30Z","pushed_at":"2016-09-13T23:58:22Z","git_url":"git://github.com/jenkinsci/workflow-api-plugin.git","ssh_url":"git@github.com:jenkinsci/workflow-api-plugin.git","clone_url":"https://github.com/jenkinsci/workflow-api-plugin.git","svn_url":"https://github.com/jenkinsci/workflow-api-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+API+Plugin","size":463,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12"},"html":{"href":"https://github.com/jenkinsci/workflow-api-plugin/pull/12"},"issue":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/12"},"comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/workflow-api-plugin/statuses/80a9140a50b47b0491a4ea58819a1e45a345ad4a"}}}}
{"actor":{"display_login":"abayer"}}