Skip to main content

!git.owner

The !git.owner Atmos YAML function returns the owner (organization or user) of the current Git repository — for example, cloudposse. The value is derived from the origin remote URL and works for GitHub, GitLab, Bitbucket, and Azure DevOps.

Usage

# Get the repository owner / organization.
# If the repository cannot be resolved, it returns a default value if specified; otherwise, it returns an error.
!git.owner <default-value>

Examples

vars:
git_owner: !git.owner

# With a fallback value when there is no remote.
git_owner_safe: !git.owner my-org