{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47453648","id":47453648,"diff_hunk":"@@ -0,0 +1,91 @@\n+module Fastlane\n+  module Actions\n+    module SharedValues\n+      CORDOVA_GET_CONFIG_VALUE_CUSTOM_VALUE = :CORDOVA_GET_CONFIG_VALUE_CUSTOM_VALUE\n+    end\n+\n+    class CordovaGetConfigValueAction < Action\n+      def self.run(params)\n+        Actions.verify_gem!('xml-simple')\n+        require 'xmlsimple'\n+        begin\n+          config_file = File.open(File.expand_path(params[:path]))\n+          config = XmlSimple.xml_in(config_file)\n+\n+          value = config[params[:key]]\n+          Actions.lane_context[SharedValues::CORDOVA_GET_CONFIG_VALUE_CUSTOM_VALUE] = value\n+\n+          return value\n+        rescue => ex\n+          Helper.log.error ex\n+          Helper.log.error \"Unable to find config file at '#{path}'\".red\n+        end\n+      end\n+\n+      #####################################################\n+      # @!group Documentation\n+      #####################################################\n+\n+      def self.description\n+        \"Returns value from config.xml of your cordova project\"\n+      end\n+\n+      def self.details\n+        # Optional:\n+        # this is your change to provide a more detailed description of this action\n+        \"You can use this action to do cool things...\"\n+      end\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: :key,\n+                                       env_name: \"CORDOVA_GET_CONFIG_PARAM_NAME\",\n+                                       description: \"Name of parameter\",\n+                                       optional: false),\n+          FastlaneCore::ConfigItem.new(key: :path,\n+                                       env_name: \"CORDOVA_GET_CONFIG_PATH\",\n+                                       description: \"Path to config file you want to read\",\n+                                       optional: true,\n+                                       default_value: './config.xml',\n+                                       verify_block: proc do |value|\n+                                         path = File.expand_path(value)\n+                                         raise \"Couldn't find config file at path '#{value}'\".red unless File.exist?(path)\n+                                       end)\n+        ]\n+      end\n+\n+      def self.output\n+        # Define the shared values you are going to provide","path":"lib/fastlane/actions/cordova_get_config_value.rb","position":61,"original_position":61,"commit_id":"6fbe459239618cc2d207faae053cbb5b53b0137c","original_commit_id":"6fbe459239618cc2d207faae053cbb5b53b0137c","user":{"login":"KrauseFx","id":869950,"avatar_url":"https://avatars.githubusercontent.com/u/869950?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseFx","html_url":"https://github.com/KrauseFx","followers_url":"https://api.github.com/users/KrauseFx/followers","following_url":"https://api.github.com/users/KrauseFx/following{/other_user}","gists_url":"https://api.github.com/users/KrauseFx/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseFx/subscriptions","organizations_url":"https://api.github.com/users/KrauseFx/orgs","repos_url":"https://api.github.com/users/KrauseFx/repos","events_url":"https://api.github.com/users/KrauseFx/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseFx/received_events","type":"User","site_admin":false},"body":"Please remove the comments here and also on the rest of this class","created_at":"2015-12-14T00:22:13Z","updated_at":"2015-12-14T00:22:13Z","html_url":"https://github.com/fastlane/fastlane/pull/984#discussion_r47453648","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/984","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47453648"},"html":{"href":"https://github.com/fastlane/fastlane/pull/984#discussion_r47453648"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/984"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/984","id":53485073,"html_url":"https://github.com/fastlane/fastlane/pull/984","diff_url":"https://github.com/fastlane/fastlane/pull/984.diff","patch_url":"https://github.com/fastlane/fastlane/pull/984.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/984","number":984,"state":"open","locked":false,"title":"add action to get values from config.xml file on cordova projects","user":{"login":"blackjid","id":228037,"avatar_url":"https://avatars.githubusercontent.com/u/228037?v=3","gravatar_id":"","url":"https://api.github.com/users/blackjid","html_url":"https://github.com/blackjid","followers_url":"https://api.github.com/users/blackjid/followers","following_url":"https://api.github.com/users/blackjid/following{/other_user}","gists_url":"https://api.github.com/users/blackjid/gists{/gist_id}","starred_url":"https://api.github.com/users/blackjid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackjid/subscriptions","organizations_url":"https://api.github.com/users/blackjid/orgs","repos_url":"https://api.github.com/users/blackjid/repos","events_url":"https://api.github.com/users/blackjid/events{/privacy}","received_events_url":"https://api.github.com/users/blackjid/received_events","type":"User","site_admin":false},"body":"We've being using fastlane with our cordova projects and it works very good. \nWe are missing some actions that could make our `Fastlane` files cleaner.\n\nThis is one of those actions.\n\nWith cordova you usually not edit the xcode project directly, instead use the `config.xml`\nfile.","created_at":"2015-12-12T20:45:15Z","updated_at":"2015-12-14T00:22:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8506fde7fe6977e54b6bf57f01209f0246f122c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/984/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/984/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/984/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/6fbe459239618cc2d207faae053cbb5b53b0137c","head":{"label":"platanus:action_cordova_get_config_value","ref":"action_cordova_get_config_value","sha":"6fbe459239618cc2d207faae053cbb5b53b0137c","user":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"repo":{"id":47893795,"name":"fastlane","full_name":"platanus/fastlane","owner":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/platanus/fastlane","description":"Connect all iOS deployment tools into one streamlined workflow","fork":true,"url":"https://api.github.com/repos/platanus/fastlane","forks_url":"https://api.github.com/repos/platanus/fastlane/forks","keys_url":"https://api.github.com/repos/platanus/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platanus/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platanus/fastlane/teams","hooks_url":"https://api.github.com/repos/platanus/fastlane/hooks","issue_events_url":"https://api.github.com/repos/platanus/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/platanus/fastlane/events","assignees_url":"https://api.github.com/repos/platanus/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/platanus/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/platanus/fastlane/tags","blobs_url":"https://api.github.com/repos/platanus/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platanus/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platanus/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/platanus/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platanus/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/platanus/fastlane/languages","stargazers_url":"https://api.github.com/repos/platanus/fastlane/stargazers","contributors_url":"https://api.github.com/repos/platanus/fastlane/contributors","subscribers_url":"https://api.github.com/repos/platanus/fastlane/subscribers","subscription_url":"https://api.github.com/repos/platanus/fastlane/subscription","commits_url":"https://api.github.com/repos/platanus/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/platanus/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/platanus/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/platanus/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/platanus/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/platanus/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platanus/fastlane/merges","archive_url":"https://api.github.com/repos/platanus/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platanus/fastlane/downloads","issues_url":"https://api.github.com/repos/platanus/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/platanus/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/platanus/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/platanus/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platanus/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/platanus/fastlane/releases{/id}","created_at":"2015-12-12T20:39:37Z","updated_at":"2015-12-12T20:39:39Z","pushed_at":"2015-12-12T20:52:59Z","git_url":"git://github.com/platanus/fastlane.git","ssh_url":"git@github.com:platanus/fastlane.git","clone_url":"https://github.com/platanus/fastlane.git","svn_url":"https://github.com/platanus/fastlane","homepage":"https://fastlane.tools","size":3355,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"8adf93d87bed1691edd9d4de68c8b40737575b5e","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-13T22:58:40Z","pushed_at":"2015-12-14T00:14:21Z","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":5577,"stargazers_count":4748,"watchers_count":4748,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":494,"mirror_url":null,"open_issues_count":177,"forks":494,"open_issues":177,"watchers":4748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/984"},"html":{"href":"https://github.com/fastlane/fastlane/pull/984"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/984"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/984/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/984/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/984/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/6fbe459239618cc2d207faae053cbb5b53b0137c"}}}}