Skip to content

Git Flow: coder/coder/v2/cli: query coderd for git repo branches #406

@johnstcn

Description

@johnstcn

Relates to #404 and #405

Using the endpoint added in #405, query the git remote via coderd when a user creates a workspace build using the coder_git_repo data source.

This ticket tracks the required work for this functionality in the CLI/API.

Implementation notes:

  • If the user does not specify a URL for the coder_git_repo data source, we need to prompt the user to specify one so that we can check the remote.
  • If the user specifies a URL but not a branch, we should prompt the user to select a remote branch.
  • If the user specifies both URL and branch, no prompt is required but the check should still be performed.
  • We will likely need to use a similar approach to what the provider currently does when a parameter value is missing (MISSING_TEMPLATE_PARAMETER) if a user attempts to read the data source without having set a value for data.coder_git_repo.foo.url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mestimated at less than 1 week of work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions