Skip to content

Commit

Permalink
update to use new query param
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Sep 2, 2020
1 parent e0d33b3 commit 802e265
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scm/driver/stash/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (s *repositoryService) List(ctx context.Context, opts scm.ListOptions) ([]*
// listWrite returns the user repository list.
func (s *repositoryService) listWrite(ctx context.Context, repo string) ([]*scm.Repository, *scm.Response, error) {
namespace, name := scm.Split(repo)
path := fmt.Sprintf("rest/api/1.0/repos?size=1000&permission=REPO_WRITE&project=%s&name=%s", namespace, name)
path := fmt.Sprintf("rest/api/1.0/repos?size=1000&permission=REPO_WRITE&projectname=%s&name=%s", namespace, name)
out := new(repositories)
res, err := s.client.do(ctx, "GET", path, nil, out)
return convertRepositoryList(out), res, err
Expand Down
2 changes: 1 addition & 1 deletion scm/driver/stash/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestRepositoryPerms_Write(t *testing.T) {
Get("/rest/api/1.0/repos").
MatchParam("size", "1000").
MatchParam("permission", "REPO_WRITE").
MatchParam("project", "PRJ").
MatchParam("projectname", "PRJ").
MatchParam("name", "my-repo").
Reply(200).
Type("application/json").
Expand Down

1 comment on commit 802e265

@RichardTheHouse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks to have broken our bitbucket integration, it no longer detects write permission for anyone to allow restarting of drone jobs.

Please sign in to comment.