{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47643704","id":47643704,"diff_hunk":"@@ -0,0 +1,82 @@\n+module Fastlane\n+  module Actions\n+    # To share this integration with the other fastlane users:\n+    # - Fork https://github.com/KrauseFx/fastlane\n+    # - Clone the forked repository\n+    # - Move this integration into lib/fastlane/actions\n+    # - Commit, push and submit the pull request\n+\n+    class PubuAction < Action\n+      def self.run(params)\n+        url = ENV['PUBU_URL']\n+        message = params[:message].to_s\n+        pubuayload = buildPayload(message,params)\n+        sendPubu(url,pubuayload)\n+        raise \"`PUBU_URL` lost  please set ENV first`\".red unless url\n+      end\n+\n+\n+\n+      def self.available_options\n+        # Define all options your action supports.\n+\n+        # Below a few examples\n+        [\n+          FastlaneCore::ConfigItem.new(key: :message,\n+                                       description: \"The message will displayed on PubuIM\",\n+                                       optional: true),\n+\n+          FastlaneCore::ConfigItem.new(key: :pubuUrl,\n+                                       env_name: \"PUBU_URL\",\n+                                       description: \"PubuIM services url\", #todo add doc url here\n+                                       optional: true,\n+                                       verify_block: proc do |value|\n+                                          raise \"Invalid PUBU_URL\" unless value.start_with? \"https://hooks.pubu.im/services/\"\n+                                       end),\n+          FastlaneCore::ConfigItem.new(key: :payload,\n+                                      description: \"Add additional information to this post. payload must be a hash containg any key with any value\",\n+                                      default_value: {},\n+                                      is_string: false),\n+          FastlaneCore::ConfigItem.new(key: :color,\n+                                      description: \"Was this color we support [warning|info|primary|error|muted|success]\",\n+                                      optional: true,\n+                                      default_value: \"info\") ]\n+      end\n+\n+\n+      def self.buildPayload(message,params)","path":"lib/fastlane/actions/pubu.rb","position":47,"original_position":47,"commit_id":"dc7a6a72474403164acf61b322cc0c56844c4522","original_commit_id":"dc7a6a72474403164acf61b322cc0c56844c4522","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","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":"Use snake_case for method names.<br>Space missing after comma.","created_at":"2015-12-15T14:44:43Z","updated_at":"2015-12-15T14:44:43Z","html_url":"https://github.com/fastlane/fastlane/pull/994#discussion_r47643704","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/994","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47643704"},"html":{"href":"https://github.com/fastlane/fastlane/pull/994#discussion_r47643704"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/994"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/994","id":53711628,"html_url":"https://github.com/fastlane/fastlane/pull/994","diff_url":"https://github.com/fastlane/fastlane/pull/994.diff","patch_url":"https://github.com/fastlane/fastlane/pull/994.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/994","number":994,"state":"open","locked":false,"title":"Add pubu Action","user":{"login":"trigged","id":3059605,"avatar_url":"https://avatars.githubusercontent.com/u/3059605?v=3","gravatar_id":"","url":"https://api.github.com/users/trigged","html_url":"https://github.com/trigged","followers_url":"https://api.github.com/users/trigged/followers","following_url":"https://api.github.com/users/trigged/following{/other_user}","gists_url":"https://api.github.com/users/trigged/gists{/gist_id}","starred_url":"https://api.github.com/users/trigged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trigged/subscriptions","organizations_url":"https://api.github.com/users/trigged/orgs","repos_url":"https://api.github.com/users/trigged/repos","events_url":"https://api.github.com/users/trigged/events{/privacy}","received_events_url":"https://api.github.com/users/trigged/received_events","type":"User","site_admin":false},"body":"It can send message to PubuIM \r\nseems like \r\n\r\n![image](https://cloud.githubusercontent.com/assets/3059605/11813594/4f774712-a37d-11e5-9330-933014fc860b.png)\r\n","created_at":"2015-12-15T14:44:36Z","updated_at":"2015-12-15T14:44:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"656808a302c1c9cae9f24ad1e6a45187056c17e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/994/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/994/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/994/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/dc7a6a72474403164acf61b322cc0c56844c4522","head":{"label":"pubuim:master","ref":"master","sha":"dc7a6a72474403164acf61b322cc0c56844c4522","user":{"login":"pubuim","id":10103692,"avatar_url":"https://avatars.githubusercontent.com/u/10103692?v=3","gravatar_id":"","url":"https://api.github.com/users/pubuim","html_url":"https://github.com/pubuim","followers_url":"https://api.github.com/users/pubuim/followers","following_url":"https://api.github.com/users/pubuim/following{/other_user}","gists_url":"https://api.github.com/users/pubuim/gists{/gist_id}","starred_url":"https://api.github.com/users/pubuim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pubuim/subscriptions","organizations_url":"https://api.github.com/users/pubuim/orgs","repos_url":"https://api.github.com/users/pubuim/repos","events_url":"https://api.github.com/users/pubuim/events{/privacy}","received_events_url":"https://api.github.com/users/pubuim/received_events","type":"Organization","site_admin":false},"repo":{"id":47681204,"name":"fastlane","full_name":"pubuim/fastlane","owner":{"login":"pubuim","id":10103692,"avatar_url":"https://avatars.githubusercontent.com/u/10103692?v=3","gravatar_id":"","url":"https://api.github.com/users/pubuim","html_url":"https://github.com/pubuim","followers_url":"https://api.github.com/users/pubuim/followers","following_url":"https://api.github.com/users/pubuim/following{/other_user}","gists_url":"https://api.github.com/users/pubuim/gists{/gist_id}","starred_url":"https://api.github.com/users/pubuim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pubuim/subscriptions","organizations_url":"https://api.github.com/users/pubuim/orgs","repos_url":"https://api.github.com/users/pubuim/repos","events_url":"https://api.github.com/users/pubuim/events{/privacy}","received_events_url":"https://api.github.com/users/pubuim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pubuim/fastlane","description":"Connect all iOS deployment tools into one streamlined workflow","fork":true,"url":"https://api.github.com/repos/pubuim/fastlane","forks_url":"https://api.github.com/repos/pubuim/fastlane/forks","keys_url":"https://api.github.com/repos/pubuim/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pubuim/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pubuim/fastlane/teams","hooks_url":"https://api.github.com/repos/pubuim/fastlane/hooks","issue_events_url":"https://api.github.com/repos/pubuim/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/pubuim/fastlane/events","assignees_url":"https://api.github.com/repos/pubuim/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/pubuim/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/pubuim/fastlane/tags","blobs_url":"https://api.github.com/repos/pubuim/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pubuim/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pubuim/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/pubuim/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pubuim/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/pubuim/fastlane/languages","stargazers_url":"https://api.github.com/repos/pubuim/fastlane/stargazers","contributors_url":"https://api.github.com/repos/pubuim/fastlane/contributors","subscribers_url":"https://api.github.com/repos/pubuim/fastlane/subscribers","subscription_url":"https://api.github.com/repos/pubuim/fastlane/subscription","commits_url":"https://api.github.com/repos/pubuim/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/pubuim/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/pubuim/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/pubuim/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/pubuim/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/pubuim/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pubuim/fastlane/merges","archive_url":"https://api.github.com/repos/pubuim/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pubuim/fastlane/downloads","issues_url":"https://api.github.com/repos/pubuim/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/pubuim/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/pubuim/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/pubuim/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pubuim/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/pubuim/fastlane/releases{/id}","created_at":"2015-12-09T09:22:37Z","updated_at":"2015-12-09T09:33:23Z","pushed_at":"2015-12-14T08:44:24Z","git_url":"git://github.com/pubuim/fastlane.git","ssh_url":"git@github.com:pubuim/fastlane.git","clone_url":"https://github.com/pubuim/fastlane.git","svn_url":"https://github.com/pubuim/fastlane","homepage":"https://fastlane.tools","size":3337,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"b28350bc4aef5ee8c4af25de42e089ebf5cb05f5","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"Connect all iOS deployment tools into one streamlined workflow","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","created_at":"2014-12-02T17:00:38Z","updated_at":"2015-12-15T12:37:22Z","pushed_at":"2015-12-15T14:44:36Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":5529,"stargazers_count":4774,"watchers_count":4774,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":496,"mirror_url":null,"open_issues_count":163,"forks":496,"open_issues":163,"watchers":4774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/994"},"html":{"href":"https://github.com/fastlane/fastlane/pull/994"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/994"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/994/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/994/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/994/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/dc7a6a72474403164acf61b322cc0c56844c4522"}}}}