feat: More git configurations are possible
You can now set the git user.name and git user.email and also change the pull method used by gitreleases/v3
parent
7023ea0a81
commit
9ee9c27448
15
action.yml
15
action.yml
|
@ -19,6 +19,21 @@ inputs:
|
|||
default: 'chore(release): {version}'
|
||||
required: false
|
||||
|
||||
git-user-name:
|
||||
description: 'The git user.name to use for the commit'
|
||||
default: 'Conventional Changelog Action'
|
||||
required: false
|
||||
|
||||
git-user-email:
|
||||
description: 'The git user.email to use for the commit'
|
||||
default: 'conventional.changelog.action@github.com'
|
||||
required: false
|
||||
|
||||
git-pull-method:
|
||||
description: 'The git pull method used when pulling all changes from remote'
|
||||
default: '--ff-only'
|
||||
required: false
|
||||
|
||||
preset:
|
||||
description: 'The preset from Conventional Changelog to use'
|
||||
default: 'angular'
|
||||
|
|
|
@ -13,9 +13,12 @@ module.exports = new (class Git {
|
|||
// Make the Github token secret
|
||||
core.setSecret(githubToken)
|
||||
|
||||
const gitUserName = core.getInput('git-user-name')
|
||||
const gitUserEmail = core.getInput('git-user-email')
|
||||
|
||||
// Set config
|
||||
this.config('user.name', 'Conventional Changelog Action')
|
||||
this.config('user.email', 'conventional.changelog.action@github.com')
|
||||
this.config('user.name', gitUserName)
|
||||
this.config('user.email', gitUserEmail)
|
||||
|
||||
// Update the origin
|
||||
this.updateOrigin(`https://x-access-token:${githubToken}@github.com/${GITHUB_REPOSITORY}.git`)
|
||||
|
@ -90,7 +93,7 @@ module.exports = new (class Git {
|
|||
* @return {Promise<>}
|
||||
*/
|
||||
pull = () => (
|
||||
this.exec(`pull --unshallow`)
|
||||
this.exec(`pull --unshallow ${core.getInput('git-pull-method')}`)
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue