Source configuration uses owner instead of user

"Owner" is the name GitHub uses in its API to reference the owner of a
repository. "User" is not correct when the owner is an organization.

This removes some confusion I've encountered over how to configure the
resource while maintaining backwards compatibility.
This commit is contained in:
Kris Hicks
2017-04-10 08:52:27 -07:00
parent 7c5e8c7b3c
commit 3b050c148c
4 changed files with 50 additions and 21 deletions

View File

@@ -1,9 +1,12 @@
package resource
type Source struct {
User string `json:"user"`
Owner string `json:"owner"`
Repository string `json:"repository"`
// Deprecated; use Owner instead
User string `json:"user"`
GitHubAPIURL string `json:"github_api_url"`
GitHubUploadsURL string `json:"github_uploads_url"`
AccessToken string `json:"access_token"`