Skip to content

Commit

Permalink
Rename permission
Browse files Browse the repository at this point in the history
  • Loading branch information
yiannistri committed Sep 28, 2020
1 parent 1d05d25 commit ab43531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion github/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
Expand Down

0 comments on commit ab43531

Please sign in to comment.