diff options
| author | Mike McQuaid | 2018-02-19 19:27:05 +0000 | 
|---|---|---|
| committer | GitHub | 2018-02-19 19:27:05 +0000 | 
| commit | c216eff44f0de9a9ef58920464723bf556c622aa (patch) | |
| tree | b7f0f08250de05a66d2aa757a8f70b8e2220a1e1 | |
| parent | ef1924e1f3f2becefe68e4ee6c3967eeee998fcf (diff) | |
| parent | a9c64c319f8b8ef4aa3c0265bbe735002daa0d60 (diff) | |
| download | brew-c216eff44f0de9a9ef58920464723bf556c622aa.tar.bz2 | |
Merge pull request #3817 from MikeMcQuaid/gist-logs-require-credentials
gist-logs: require API credentials.
| -rw-r--r-- | Library/Homebrew/cmd/gist-logs.rb | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb index 630361ca2..ab81a017e 100644 --- a/Library/Homebrew/cmd/gist-logs.rb +++ b/Library/Homebrew/cmd/gist-logs.rb @@ -39,6 +39,16 @@ module Homebrew        files["00.tap.out"] = { content: tap }      end +    if GitHub.api_credentials_type == :none +      puts <<~EOS +        You can create a new personal access token: +         #{GitHub::ALL_SCOPES_URL} +        and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method. + +      EOS +      login! +    end +      # Description formatted to work well as page title when viewing gist      if f.core_formula?        descr = "#{f.name} on #{OS_VERSION} - Homebrew build logs" @@ -48,16 +58,6 @@ module Homebrew      url = create_gist(files, descr)      if ARGV.include?("--new-issue") || ARGV.switch?("n") -      if GitHub.api_credentials_type == :none -        puts <<~EOS -          You can create a new personal access token: -           #{GitHub::ALL_SCOPES_URL} -          and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method. - -        EOS -        login! -      end -        url = create_issue(f.tap, "#{f.name} failed to build on #{MacOS.full_version}", url)      end | 
