Documentation
¶
Overview ¶
Package git provides helpers for interacting with local git repositories and configurations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrFetchBaseBranch ¶
func GetOrFetchBaseBranch(ctx context.Context, f forges.Forge, dir, owner, repo, branch string, forceRefresh bool) (string, error)
GetOrFetchBaseBranch returns the base branch of the given branch. It first checks the local git configuration for a cached value. If not found, it queries the forge API for an open pull request for the branch, caches the base branch name in the local git configuration, and returns it. If branch is empty, it uses the current branch.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.