Git-related Modules
Module git-auth
The module provides the basics for working with a git repository.
Example import:
hci-effects.modularEffect {
imports = [
hci-effects.modules.git-auth
];
}
git.checkout.forgeType
The forge type according to Hercules CI.
Valid values include "github" and "gitlab", or you could forward this from herculesCI.repo.forgeType (flake-parts) or the metadata passed to the herculesCI function: primaryRepo.forgeType.
Type: string
Example: primaryRepo.forgeType
Declared by:
git.checkout.remote.url
The git remote URL. Currently only http/https URLs are supported.
The current repo URL is available in herculesCI.repo.remoteHttpUrl or the metadata passed to the herculesCI function: primaryRepo.remoteHttpUrl.
Type: string
Example: primaryRepo.remoteHttpUrl
Declared by:
git.checkout.tokenSecret
Name of the secret that contains the git token.
Type: string
Default: "token"
Declared by:
git.checkout.user
User name for authentication with the git remote.
Type: string
Default: "git"
Declared by:
Module git-update
A module that facilitates the updating of a git repository.
Example import:
hci-effects.modularEffect {
imports = [
hci-effects.modules.git-update
];
}
git.update.baseBranch
Branch name on the remote that the update branch will be
-
based on (via
git.update.baseMerge.branch), and -
merged back into (via
git.update.pullRequest.base) if enabled.
"HEAD" refers to the default branch, which is often main or master.
Type: string
Default: "HEAD"
Declared by:
git.update.baseMerge.enable
Whether to merge the base branch into the update branch before running git.update.script.
This is useful to ensure that the update branch is up to date with the base branch.
If this option is false, you may have to merge or rebase the update branch manually sometimes.
Type: boolean
Default: false
Declared by:
git.update.baseMerge.branch
Branch name on the remote to merge into the update branch before running git.update.script.
Used when git.update.baseMerge.enable is true.
Type: string
Default:
git.update.baseBranch
Declared by:
git.update.baseMerge.method
How to merge the base branch into the update branch before running git.update.script.
Used when git.update.baseMerge.enable is true.
Type: one of “merge”, “rebase”
Default: "merge"
Declared by:
git.update.branch
Branch name to push to.
If you use pull requests, this should be a “feature” branch.
Type: string
Declared by:
git.update.pullRequest.enable
Whether to create a pull request to merge the updated branch into the default branch.
Type: boolean
Default: true
Declared by:
git.update.pullRequest.autoMergeMethod
Whether to enable auto-merge on new pull requests, and how to merge it.
This requires GitHub branch protection to be configured for the repository.
Type: one of <null>, “merge”, “rebase”, “squash”
Default: null
Declared by:
git.update.pullRequest.base
Branch name on the remote to merge the update branch into.
Used when git.update.pullRequest.enable is true.
Type: string
Default:
git.update.baseBranch
Example: "develop"
Declared by:
git.update.pullRequest.body
The body, or description, of the pull request.
A more detailed body can be achieved by making git.update.script set the body contents in the HCI_GIT_UPDATE_PR_BODY environment variable.
If null, the body will be empty or automatic based on the commit message.
Type: null or string
Declared by:
git.update.pullRequest.title
The title to use for the pull request.
A more detailed title can be achieved by making git.update.script set the title in the HCI_GIT_UPDATE_PR_TITLE environment variable.
Type: string
Declared by:
git.update.script
Bash statements that create zero or more commits. All changes must be explicitly committed by the script.
The working directory is the root of the checkout.
Type: strings concatenated with “\n”
Declared by:
See also
-
gitWriteBranchto replace branch contents. -
flakeUpdateto update flake input revisions.