Module git

Source
Expand description

§Git

This module provides a set of functions to interact with git.

Structs§

Commit
A struct that represents a commit information
PublishTagInfo
A struct that represents a publish tag information
RemoteTags
A struct that represents a remote tag information

Functions§

get_all_files_changed_since_branch
Given an input of the “main” branch name, returns all the files that have changed since the current branch was created
get_commits_since
Returns commits since a particular git SHA or tag. If the “since” parameter isn’t provided, all commits from the dawn of man are returned
get_diverged_commit
Get the diverged commit from a particular git SHA or tag.
get_last_known_publish_tag_info_for_all_packages
Grabs the last known publish tag info for all packages in the monorepo
get_last_known_publish_tag_info_for_package
Grabs the last known publish tag info for a package
get_remote_or_local_tags
Grabs the full list of all tags available on upstream or local
git_add
Add a file to the git stage
git_add_all
Stage all uncommitted changes
git_all_files_changed_since_sha
Given a specific git sha, finds all files that have been modified since the sha and returns the absolute filepaths.
git_branch_from_commit
Get the branch (last) name for a commit
git_commit
git_config
Configure git user name and email
git_current_branch
Get the current branch name
git_current_sha
Get the current commit id
git_fetch_all
Fetch everything from origin including tags
git_first_sha
Get the first commit in a branch
git_previous_sha
Get the previous commit id
git_push
Pushes all changes in the monorepo without verification and follow tags
git_tag
Tags the current commit with a message
git_workdir_unclean
Verify if as uncommited changes in the current working directory