Github
kind: github
Description
Depending on the situation a specific SCM block can be provided to manipulate information from a Github SCM repository by either fetching files from a repository or pushing files to them
condition
When the SCM block is used in a condition, it usually means fetching a file from that repository.
target
When the SCM block is used in a target, it usually means pushing a file to that repository.
It’s important to notice that the Github SCM implements the Github workflow and therefore will push changes to a temporary branch then open a pull request targeting the branch defined in the configuration.
Parameters
Name | Type | Description | Required |
---|---|---|---|
branch | string | Branch specifies which github branch to work on | |
commitmessage | object | CommitMessage represents conventional commit metadata as type or scope, used to generate the final commit message. | |
body | string | Define commit body | |
footers | string | Define commit footer | |
hidecredit | boolean | Display updatecli credits inside commit message body | |
scope | string | Define commit type scope | |
title | string | Define commit title | |
type | string | Define commit type, like chore, fix, etc | |
directory | string | Directory specifies where the github repository is cloned on the local disk | |
string | Email specifies which emails to use when creating commits | ||
force | boolean | Force is used during the git push phase to run git push --force . | |
gpg | object | GPG key and passphrased used for commit signing | |
passphrase | string | Define the gpg passphrase | |
signingkey | string | Defines the gpg key | |
owner | string | Owner specifies repository owner | |
repository | string | Repository specifies the name of a repository for a specific owner | |
token | string | Token specifies the credential used to authenticate with | |
url | string | URL specifies the default github url in case of GitHub enterprise | |
user | string | User specifies the user of the git commit messages | |
username | string | Username specifies the username used to authenticate with GitHub API |
CommitMessage
Updatecli uses conventional commits as describe on www.conventionnalcommits.org.
The goal is to add human and machine readable meaning to commit messages
By default, Updatecli generates a commit message using the default type "chore" and split long title message into the body like:
Author: olblak <updatecli@updatecli.io>
Date: Tue May 4 15:41:44 2021 +0200
chore: Update key "dependencies[0].version" from file "charts/jenkins/r...
... equirements.yaml"
Made with ❤️️ by updatecli
Example
Default
# updatecli.yaml
name: Example of a GitHub SCM configuration
scms:
default:
kind: github
spec:
user: "git user to push from changes"
email: "git user email to push from change"
directory: "directory where to clone the git repository"
owner: "github owner"
repository: "github repository"
token: "github token with enough permission on repository"
username: "github username used for push git changes"
branch: "git branch where to push changes"
targets:
id:
kind: yaml
scmid: default
spec:
file: "Yaml file path from the root repository"
key: "yaml key to update"
CommitMessage
# updatecli.yaml
name: Example with a GitHub commit message
scms:
default:
kind: github
spec:
user: "git user to push from changes"
email: "git user email to push from change"
directory: "directory where to clone the git repository"
owner: "github owner"
repository: "github repository"
token: "github token with enough permission on repository"
username: "github username used for push git changes"
branch: "git branch where to push changes"
commitmessage:
type: "feat"
title: "Override default commit title"
targets:
id:
kind: yaml
scmid: default
spec:
file: "Yaml file path from the root repository"
key: "yaml key to update"