Skip to content

Commit

Permalink
fix: remove unused json tags
Browse files Browse the repository at this point in the history
  • Loading branch information
aweris committed Sep 20, 2023
1 parent 939a752 commit b0cfc34
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions internal/core/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import (

// Repository represents a GitHub repository
type Repository struct {
ID string `json:"id" env:"GALE_REPO_ID" container_env:"true"`
Name string `json:"name" env:"GALE_REPO_NAME" container_env:"true"`
NameWithOwner string `json:"name_with_owner" env:"GALE_REPO_NAME_WITH_OWNER" container_env:"true"`
URL string `json:"url" env:"GALE_REPO_URL" container_env:"true"`
Owner RepositoryOwner `json:"owner"`
DefaultBranchRef RepositoryBranchRef `json:"default_branch_ref"`
ID string `env:"GALE_REPO_ID" container_env:"true"`
Name string `env:"GALE_REPO_NAME" container_env:"true"`
NameWithOwner string `env:"GALE_REPO_NAME_WITH_OWNER" container_env:"true"`
URL string `env:"GALE_REPO_URL" container_env:"true"`
Owner RepositoryOwner `container_env:"true"`
DefaultBranchRef RepositoryBranchRef `container_env:"true"`
}

// RepositoryOwner represents a GitHub repository owner
type RepositoryOwner struct {
ID string `json:"id" env:"GALE_REPO_OWNER_ID" container_env:"true"`
Login string `json:"login" env:"GALE_REPO_OWNER_LOGIN" container_env:"true"`
ID string `env:"GALE_REPO_OWNER_ID" container_env:"true"`
Login string `env:"GALE_REPO_OWNER_LOGIN" container_env:"true"`
}

// RepositoryBranchRef represents a GitHub repository branch ref
type RepositoryBranchRef struct {
Name string `json:"name" env:"GALE_REPO_BRANCH_NAME" container_env:"true"`
Name string `env:"GALE_REPO_BRANCH_NAME" container_env:"true"`
}

// GetRepository returns repository information. If name is empty, the current repository will be used.
Expand Down
12 changes: 6 additions & 6 deletions internal/core/repository_gitref.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ var errRefFound = errors.New("stop")

// RepositoryGitRef represents a Git ref (branch or tag) in a repository
type RepositoryGitRef struct {
Ref string `json:"ref" env:"GALE_REPO_REF" container_env:"true"`
RefName string `json:"ref_name" env:"GALE_REPO_REF_NAME" container_env:"true"`
RefType RefType `json:"ref_type" env:"GALE_REPO_REF_TYPE" container_env:"true"`
SHA string `json:"sha" env:"GALE_REPO_SHA" container_env:"true"`
ShortSHA string `json:"short_sha" env:"GALE_REPO_SHORT_SHA" container_env:"true"`
IsRemote bool `json:"is_remote" env:"GALE_REPO_IS_REMOTE" container_env:"true"`
Ref string `env:"GALE_REPO_REF" container_env:"true"`
RefName string `env:"GALE_REPO_REF_NAME" container_env:"true"`
RefType RefType `env:"GALE_REPO_REF_TYPE" container_env:"true"`
SHA string `env:"GALE_REPO_SHA" container_env:"true"`
ShortSHA string `env:"GALE_REPO_SHORT_SHA" container_env:"true"`
IsRemote bool `env:"GALE_REPO_IS_REMOTE" container_env:"true"`
}

// GetRepositoryRefFromDir returns a Git ref (branch or tag) from given directory. If dir is empty or not git repository, it will return an error.
Expand Down

0 comments on commit b0cfc34

Please sign in to comment.