diff --git a/github/client.go b/github/client.go index affa2274..8c0c56fd 100644 --- a/github/client.go +++ b/github/client.go @@ -100,7 +100,7 @@ func (c *Client) UserRepositories() gitprovider.UserRepositoriesClient { //nolint:gochecknoglobals var permissionScopes = map[gitprovider.TokenPermission]string{ - gitprovider.TokenPermissionFullRepo: "repo", + gitprovider.TokenPermissionRWRepository: "repo", } func (c *Client) HasTokenPermission(ctx context.Context, permission gitprovider.TokenPermission) (bool, error) { diff --git a/github/integration_test.go b/github/integration_test.go index 3e559a46..fd6b8b7a 100644 --- a/github/integration_test.go +++ b/github/integration_test.go @@ -370,7 +370,7 @@ var _ = Describe("GitHub Provider", func() { Expect(err).To(Equal(gitprovider.ErrNoProviderSupport)) Expect(hasPermission).To(Equal(false)) - hasPermission, err = c.HasTokenPermission(ctx, gitprovider.TokenPermissionFullRepo) + hasPermission, err = c.HasTokenPermission(ctx, gitprovider.TokenPermissionRWRepository) Expect(err).ToNot(HaveOccurred()) Expect(hasPermission).To(Equal(true)) })