Skip to content

Commit f649466

Browse files
authored
github/config: Fix detection of individual, non-org accounts (#685)
- Previously, whenever an individual user tried to interact with their repos, the provider would return an error, rendering v4.3.1 unusable _for individuals_: ``` ➜ terraform plan Error: GET https://api.github.com/orgs/issyl0: 404 Not Found [] on /Users/issyl0/repos/terraform/github.tf line 1, in provider "github": ``` - `ConfigureOwner` works such that if the `owner.name` is not blank (ie, the user had specified `owner = <username>` in their Terraform file), the code progresses to check if the `owner.name` is an org. Importantly, that check (prior to this change) returned an error if `owner.name` was not an org. That final error meant it was impossible to run if not using an organisation account. - Reproduction steps: https://gist.github.com/issyl0/cd61e4cb59de2c2e1e8f45e3cf7c12f5
1 parent ced560d commit f649466

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

github/config.go

-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ func (c *Config) ConfigureOwner(owner *Owner) (*Owner, error) {
115115
owner.id = remoteOrg.GetID()
116116
owner.IsOrganization = true
117117
}
118-
} else {
119-
return nil, err
120118
}
121119
}
122120

0 commit comments

Comments
 (0)