{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47020549","id":47020549,"diff_hunk":"@@ -0,0 +1,103 @@\n+module Fastlane\n+  module Actions\n+    module SharedValues\n+      PARSE_DEPLOY_EXIT_STATUS = :PARSE_DEPLOY_EXIT_STATUS\n+    end\n+\n+    class ParseDeployAction < Action\n+      def self.run(params)\n+        parse_application = params[:application]\n+        parse_directory = params[:parse_directory]\n+        release_notes = params[:release_notes]\n+\n+        if !parse_application || parse_application.empty?\n+          deploy_info = \"the default application\"\n+        else\n+          deploy_info = \"#{parse_application}\"\n+        end\n+        Helper.log.info \"Deploying Parse cloud files to #{deploy_info} ⛅️\".green\n+\n+        parse_path = File.expand_path(parse_directory)\n+        exit_code = 1\n+        if File.exist?(parse_path)\n+          Dir.chdir(parse_path) do\n+            command = \"Parse deploy\"\n+            if parse_application && !parse_application.empty?\n+              command << \" #{parse_application}\"\n+            end\n+            if release_notes && !release_notes.empty?\n+              command << \" --description=\\\"#{release_notes}\\\"\"\n+            end\n+            Helper.log.info \"Deploy command: #{command}\".blue\n+            system(command)\n+            exit_code = $?.exitstatus\n+          end\n+        else\n+          raise \"Skipping Parse deploy: Parse directory not found at path `#{parse_path}`\".yellow\n+        end\n+\n+        Actions.lane_context[SharedValues::PARSE_DEPLOY_EXIT_STATUS] = exit_code\n+\n+        if exit_code != 0\n+          raise \"Parse deploy failed with exit code #{exit_code}.\".red\n+        end\n+\n+        Helper.log.info \"Finished deploying Parse to #{deploy_info} ☀️.\".green\n+\n+        return exit_code\n+      end\n+\n+      #####################################################\n+      # @!group Documentation\n+      #####################################################\n+\n+      def self.description\n+        \"Deploy Parse Cloud code\"\n+      end\n+\n+      def self.details\n+        \"Deploy Parse `cloud` and `public` code to Parse Cloud. \\nYou can specify the target application, release notes, and the path to your Parse directory.\"\n+      end\n+\n+      def self.available_options\n+        [\n+          FastlaneCore::ConfigItem.new(key: :application,\n+                                       env_name: \"FL_PARSE_DEPLOY_APPLICATION\", # The name of the environment variable\n+                                       description: \"Target Application for ParseDeployAction\", # a short description of this parameter\n+                                       is_string: false, # true: verifies the input is a string, false: every kind of value\n+                                       optional: true,\n+                                       default_value: \"\"), # the default value if the user didn't provide one","path":"lib/fastlane/actions/parse_deploy.rb","position":69,"original_position":69,"commit_id":"f31a7af7c37c4fc2cec774da22b6e6fe1645a5ba","original_commit_id":"f31a7af7c37c4fc2cec774da22b6e6fe1645a5ba","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":"You can just get rid of this line and the default_value will be `nil`","created_at":"2015-12-08T22:00:40Z","updated_at":"2015-12-08T22:00:40Z","html_url":"https://github.com/fastlane/fastlane/pull/967#discussion_r47020549","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/967","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/47020549"},"html":{"href":"https://github.com/fastlane/fastlane/pull/967#discussion_r47020549"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/967"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/967","id":52920144,"html_url":"https://github.com/fastlane/fastlane/pull/967","diff_url":"https://github.com/fastlane/fastlane/pull/967.diff","patch_url":"https://github.com/fastlane/fastlane/pull/967.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/967","number":967,"state":"open","locked":false,"title":"Add action to deploy Parse Cloud Code","user":{"login":"teddynewell","id":770729,"avatar_url":"https://avatars.githubusercontent.com/u/770729?v=3","gravatar_id":"","url":"https://api.github.com/users/teddynewell","html_url":"https://github.com/teddynewell","followers_url":"https://api.github.com/users/teddynewell/followers","following_url":"https://api.github.com/users/teddynewell/following{/other_user}","gists_url":"https://api.github.com/users/teddynewell/gists{/gist_id}","starred_url":"https://api.github.com/users/teddynewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teddynewell/subscriptions","organizations_url":"https://api.github.com/users/teddynewell/orgs","repos_url":"https://api.github.com/users/teddynewell/repos","events_url":"https://api.github.com/users/teddynewell/events{/privacy}","received_events_url":"https://api.github.com/users/teddynewell/received_events","type":"User","site_admin":false},"body":"Adds an action to deploy Parse cloud code with optional application, release notes, and path to /Parse directory.\n\nThis action can be used for projects that use [Parse](https://parse.com) for backend infrastructure.","created_at":"2015-12-08T00:02:49Z","updated_at":"2015-12-08T22:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7c3125a9c612ff173353906fde739a5123301ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/967/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/967/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/967/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/f31a7af7c37c4fc2cec774da22b6e6fe1645a5ba","head":{"label":"teddynewell:master","ref":"master","sha":"f31a7af7c37c4fc2cec774da22b6e6fe1645a5ba","user":{"login":"teddynewell","id":770729,"avatar_url":"https://avatars.githubusercontent.com/u/770729?v=3","gravatar_id":"","url":"https://api.github.com/users/teddynewell","html_url":"https://github.com/teddynewell","followers_url":"https://api.github.com/users/teddynewell/followers","following_url":"https://api.github.com/users/teddynewell/following{/other_user}","gists_url":"https://api.github.com/users/teddynewell/gists{/gist_id}","starred_url":"https://api.github.com/users/teddynewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teddynewell/subscriptions","organizations_url":"https://api.github.com/users/teddynewell/orgs","repos_url":"https://api.github.com/users/teddynewell/repos","events_url":"https://api.github.com/users/teddynewell/events{/privacy}","received_events_url":"https://api.github.com/users/teddynewell/received_events","type":"User","site_admin":false},"repo":{"id":47586479,"name":"fastlane","full_name":"teddynewell/fastlane","owner":{"login":"teddynewell","id":770729,"avatar_url":"https://avatars.githubusercontent.com/u/770729?v=3","gravatar_id":"","url":"https://api.github.com/users/teddynewell","html_url":"https://github.com/teddynewell","followers_url":"https://api.github.com/users/teddynewell/followers","following_url":"https://api.github.com/users/teddynewell/following{/other_user}","gists_url":"https://api.github.com/users/teddynewell/gists{/gist_id}","starred_url":"https://api.github.com/users/teddynewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teddynewell/subscriptions","organizations_url":"https://api.github.com/users/teddynewell/orgs","repos_url":"https://api.github.com/users/teddynewell/repos","events_url":"https://api.github.com/users/teddynewell/events{/privacy}","received_events_url":"https://api.github.com/users/teddynewell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/teddynewell/fastlane","description":"Connect all iOS deployment tools into one streamlined workflow","fork":true,"url":"https://api.github.com/repos/teddynewell/fastlane","forks_url":"https://api.github.com/repos/teddynewell/fastlane/forks","keys_url":"https://api.github.com/repos/teddynewell/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teddynewell/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teddynewell/fastlane/teams","hooks_url":"https://api.github.com/repos/teddynewell/fastlane/hooks","issue_events_url":"https://api.github.com/repos/teddynewell/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/teddynewell/fastlane/events","assignees_url":"https://api.github.com/repos/teddynewell/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/teddynewell/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/teddynewell/fastlane/tags","blobs_url":"https://api.github.com/repos/teddynewell/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teddynewell/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teddynewell/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/teddynewell/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teddynewell/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/teddynewell/fastlane/languages","stargazers_url":"https://api.github.com/repos/teddynewell/fastlane/stargazers","contributors_url":"https://api.github.com/repos/teddynewell/fastlane/contributors","subscribers_url":"https://api.github.com/repos/teddynewell/fastlane/subscribers","subscription_url":"https://api.github.com/repos/teddynewell/fastlane/subscription","commits_url":"https://api.github.com/repos/teddynewell/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/teddynewell/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/teddynewell/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/teddynewell/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/teddynewell/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/teddynewell/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teddynewell/fastlane/merges","archive_url":"https://api.github.com/repos/teddynewell/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teddynewell/fastlane/downloads","issues_url":"https://api.github.com/repos/teddynewell/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/teddynewell/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/teddynewell/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/teddynewell/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teddynewell/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/teddynewell/fastlane/releases{/id}","created_at":"2015-12-07T23:45:42Z","updated_at":"2015-12-07T23:45:44Z","pushed_at":"2015-12-08T00:26:33Z","git_url":"git://github.com/teddynewell/fastlane.git","ssh_url":"git@github.com:teddynewell/fastlane.git","clone_url":"https://github.com/teddynewell/fastlane.git","svn_url":"https://github.com/teddynewell/fastlane","homepage":"https://fastlane.tools","size":3377,"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":"a3471232d68521090dae51ea02cbf6beffb6fa5e","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-08T21:34:44Z","pushed_at":"2015-12-08T16:43:31Z","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":5563,"stargazers_count":4662,"watchers_count":4662,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":479,"mirror_url":null,"open_issues_count":198,"forks":479,"open_issues":198,"watchers":4662,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/967"},"html":{"href":"https://github.com/fastlane/fastlane/pull/967"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/967"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/967/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/967/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/967/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/f31a7af7c37c4fc2cec774da22b6e6fe1645a5ba"}}}}