feat: show workflow name in deafult commit message

Ref: #64
This commit is contained in:
Federico Grandi
2020-10-07 19:50:38 +02:00
parent 3f6e296fa8
commit 3088d83852
3 changed files with 6 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ Add a step like this to your workflow:
cwd: './path/to/the/repo'
# The message for the commit
# Default: 'Commit from GitHub Actions'
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'Your commit message'
# The arguments for the `git rm` command (see the paragraph below for more info)

View File

@@ -22,7 +22,6 @@ inputs:
message:
description: The message for the commit
required: false
default: Commit from GitHub Actions
remove:
description: Arguments for the git rm command
required: false

View File

@@ -162,6 +162,11 @@ async function checkInputs() {
info(`> Using '${getInput('author_name')} <${getInput('author_email')}>' as author.`)
// #endregion
// #region message
setDefault('message', `Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`)
info(`> Using "${getInput('message')}" as commit message.`)
// #endregion
// #region branch
const branch = setDefault('branch', defaultBranch || '')
if (isPR) info(`> Running for a PR, the action will use '${branch}' as ref.`)