diff --git a/server/plugin/api.go b/server/plugin/api.go index bc40d8bb1..49ffd8296 100644 --- a/server/plugin/api.go +++ b/server/plugin/api.go @@ -62,7 +62,7 @@ type RepoResponse struct { // Only send down fields to client that are needed type RepositoryResponse struct { DefaultRepo RepoResponse `json:"defaultRepo,omitempty"` - Repos []RepoResponse `json:"repo,omitempty"` + Repos []RepoResponse `json:"repos,omitempty"` } type PRDetails struct { diff --git a/webapp/src/components/github_repo_selector/github_repo_selector.jsx b/webapp/src/components/github_repo_selector/github_repo_selector.jsx index 0d4c83ac6..f6b72a8b6 100644 --- a/webapp/src/components/github_repo_selector/github_repo_selector.jsx +++ b/webapp/src/components/github_repo_selector/github_repo_selector.jsx @@ -43,12 +43,12 @@ export default class GithubRepoSelector extends PureComponent { } onChange = (_, name) => { - const repo = this.props.yourRepos.repo.find((r) => r.full_name === name); + const repo = this.props.yourRepos.repos.find((r) => r.full_name === name); this.props.onChange({name, permissions: repo.permissions}); } render() { - const repoOptions = this.props.yourRepos.repo.map((item) => ({value: item.full_name, label: item.full_name})); + const repoOptions = this.props.yourRepos.repos.map((item) => ({value: item.full_name, label: item.full_name})); return (