rename git-token to branch-token

This commit is contained in:
Peter Evans 2024-08-16 14:57:23 +00:00
parent 5294a5ed9d
commit 1985abb7f4
5 changed files with 14 additions and 14 deletions

View file

@ -7,7 +7,7 @@ async function run(): Promise<void> {
try {
const inputs: Inputs = {
token: core.getInput('token'),
gitToken: core.getInput('git-token'),
branchToken: core.getInput('git-token'),
path: core.getInput('path'),
addPaths: utils.getInputAsArray('add-paths'),
commitMessage: core.getInput('commit-message'),
@ -36,8 +36,8 @@ async function run(): Promise<void> {
if (!inputs.token) {
throw new Error(`Input 'token' not supplied. Unable to continue.`)
}
if (!inputs.gitToken) {
inputs.gitToken = inputs.token
if (!inputs.branchToken) {
inputs.branchToken = inputs.token
}
if (inputs.bodyPath) {
if (!utils.fileExistsSync(inputs.bodyPath)) {