Reused the variable as per the review suggestion
This commit is contained in:
parent
57b7999843
commit
ca85c5355f
@ -197,6 +197,8 @@ module GitHub
|
|||||||
|
|
||||||
scopes = response_headers["x-accepted-oauth-scopes"].to_s.split(", ")
|
scopes = response_headers["x-accepted-oauth-scopes"].to_s.split(", ")
|
||||||
needed_scopes = Set.new(scopes || needed_scopes)
|
needed_scopes = Set.new(scopes || needed_scopes)
|
||||||
|
github_permission_link = GitHub.pat_blurb(needed_scopes)
|
||||||
|
|
||||||
credentials_scopes = response_headers["x-oauth-scopes"]
|
credentials_scopes = response_headers["x-oauth-scopes"]
|
||||||
return if needed_scopes.subset?(Set.new(credentials_scopes.to_s.split(", ")))
|
return if needed_scopes.subset?(Set.new(credentials_scopes.to_s.split(", ")))
|
||||||
|
|
||||||
@ -208,7 +210,7 @@ module GitHub
|
|||||||
Your #{what} credentials do not have sufficient scope!
|
Your #{what} credentials do not have sufficient scope!
|
||||||
Scopes required: #{needed_scopes}
|
Scopes required: #{needed_scopes}
|
||||||
Scopes present: #{credentials_scopes}
|
Scopes present: #{credentials_scopes}
|
||||||
#{GitHub.pat_blurb(needed_scopes.split(", "))}
|
#{github_permission_link}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user