8000 append commit SHA to commit msg, only if not a part of it already. (#… · FFY00/github-pages-deploy-action@145d802 · GitHub
[go: up one dir, main page]

Skip to content

Commit 145d802

Browse files
lycuidJamesIves
andauthored
append commit SHA to commit msg, only if not a part of it already. (JamesIves#236)
* append commit SHA to commit msg, only if not a part of it already. * user provided commit message will remain unmodified. * Update src/git.ts check, if SHA exists, before appending to commit message. Co-Authored-By: James Ives <iam@jamesiv.es> * linting bug fix (from failed workflow). Co-authored-by: James Ives <iam@jamesiv.es>
1 parent 97674fc commit 145d802

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/git.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export async function deploy(action: ActionInterface): Promise<void> {
100100
try {
101101
hasRequiredParameters(action)
102102

103-
const commitMessage = `${
104-
!isNullOrUndefined(action.commitMessage)
105-
? action.commitMessage
106-
: `Deploying to ${action.branch} from ${action.baseBranch}`
107-
} ${process.env.GITHUB_SHA ? `@ ${process.env.GITHUB_SHA}` : ''} 🚀`
103+
const commitMessage = !isNullOrUndefined(action.commitMessage)
104+
? (action.commitMessage as string)
105+
: `Deploying to ${action.branch} from ${action.baseBranch} ${
106+
process.env.GITHUB_SHA ? `@ ${process.env.GITHUB_SHA}` : ''
107+
} 🚀`
108108

109109
/*
110110
Checks to see if the remote exists prior to deploying.

0 commit comments

Comments
 (0)
0