Skip to content

Commit

Permalink
revert response handling introduced in #424
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 authored and Jeremy Udit committed Sep 2, 2020
1 parent d545ff6 commit 454a7cc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions github/resource_github_repository_collaborator.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func resourceGithubRepositoryCollaboratorCreate(d *schema.ResourceData, meta int

log.Printf("[DEBUG] Creating repository collaborator: %s (%s/%s)",
username, owner, repoName)
_, resp, err := client.Repositories.AddCollaborator(ctx,
_, _, err := client.Repositories.AddCollaborator(ctx,
owner,
repoName,
username,
Expand All @@ -69,9 +69,6 @@ func resourceGithubRepositoryCollaboratorCreate(d *schema.ResourceData, meta int
if err != nil {
return err
}
if resp.StatusCode == http.StatusNoContent {
return fmt.Errorf("User %s is already a collaborator", username)
}

d.SetId(buildTwoPartID(repoName, username))

Expand Down

0 comments on commit 454a7cc

Please sign in to comment.