/Foo.rb Secret
Created
January 23, 2018 22:45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def branch_name_for_build | |
Fastlane::Actions::GithubApiAction.run( | |
server_url: "https://api.github.com", | |
api_token: @GITHUB_API_TOKEN, | |
http_method: "GET", | |
path: "/repos/beachbodydigital/devices-bod-ios/pulls/23", | |
error_handlers: { | |
'*' => proc do |result| | |
raise "This build is from a PR but the request to GitHub's PR API for PR metadata failed." | |
end | |
} | |
) do |result| | |
title = result[:json]['title'] | |
puts(title) # some-title | |
title | |
end | |
branch_name = branch_name_for_build | |
puts("Building with branch name: '#{branch_name}'") # Building with branch name: '{:status=>200, :body=>"{\"url\":\"https://a... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment