diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index c211e34d0a..885a166c01 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1433,7 +1433,7 @@ func Routes() *web.Router { }, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo()) m.Group("/statuses", func() { m.Combo("/{sha}").Get(repo.GetCommitStatuses). - Post(reqToken(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryCommitStatus), bind(api.CreateStatusOption{}), repo.NewCommitStatus) + Post(reqToken(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryCommitStatus, auth_model.AccessTokenScopeCategoryRepository), bind(api.CreateStatusOption{}), repo.NewCommitStatus) }) m.Group("/commits", func() { m.Get("", context.ReferencesGitRepo(), repo.GetAllCommits)