Merge pull request #7866 from jonchang/github-email-scopes

github: need read-only email scope to see emails
This commit is contained in:
Jonathan Chang 2020-07-01 23:17:49 +10:00 committed by GitHub
commit 7360d14f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,7 +413,7 @@ module GitHub
}
EOS
}
result = open_api(url, data: data, request_method: "POST")
result = open_api(url, scopes: ["user:email"], data: data, request_method: "POST")
raise Error, result["errors"] if result["errors"].present?
reviews = result["data"]["repository"]["pullRequest"]["reviews"]["nodes"]