Skip to content

Commit

Permalink
Merge pull request #4 from marinacabrera/patch-1
Browse files Browse the repository at this point in the history
feat: replace all option to replace all occurrences
  • Loading branch information
kishyr committed Nov 9, 2022
2 parents c766635 + 14f2f36 commit 1a1efe2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ try {
const source = core.getInput('source')
const find = core.getInput('find')
const replace = core.getInput('replace')
const branchName = source.replace(find, replace)
const replaceAllInput = core.getInput('replaceAll')
const replaceAll = replaceAllInput ? replaceAllInput == 'true' : false
const branchName = replaceAll ? source.replaceAll(find, replace) : source.replace(find, replace)
core.setOutput('value', branchName)
} catch (error) {
core.setFailed(error.message)
Expand Down

0 comments on commit 1a1efe2

Please sign in to comment.