Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: common/api/gitiles/gitiles.go

Issue 2983153002: Make gitiles calls as Self instead of Anon (Closed)
Patch Set: WithScope Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/gitiles/gitiles.go
diff --git a/common/api/gitiles/gitiles.go b/common/api/gitiles/gitiles.go
index f9381706b0a65ff6c749a4539dd8a9dd2453cff4..39f71f52a378b8e0b9dc024384d8381147d7f9d8 100644
--- a/common/api/gitiles/gitiles.go
+++ b/common/api/gitiles/gitiles.go
@@ -84,7 +84,9 @@ func Log(c context.Context, repoURL, treeish string, limit int) ([]Commit, error
if err != nil {
return nil, err
}
- t, err := auth.GetRPCTransport(c, auth.NoAuth)
+ t, err := auth.GetRPCTransport(c, auth.AsSelf, auth.WithScopes(
+ "https://www.googleapis.com/auth/gerritcodereview",
+ ))
if err != nil {
return nil, err
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698