diff --git a/action.yml b/action.yml index 5594d9d..883989f 100644 --- a/action.yml +++ b/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' diff --git a/src/helpers/git.js b/src/helpers/git.js index bbdc944..ecfeb31 100644 --- a/src/helpers/git.js +++ b/src/helpers/git.js @@ -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')}`) ) /**