INNER CODE UNIT · TypeScript

pushCommit

EndBug/add-and-commit · src/main.ts:410

async function pushCommit(pushOption: true | string) {
  if (pushOption === true) {
    const branch = getInput('new_branch');
    if (branch) {
      core.debug(`Running: git push --set-upstream origin -- ${branch}`);
      await git.raw(
        ['push', '--set-upstream', 'origin', '--', branch],
        (err, data?) => {
          if (data) setOutput('pushed', 'true');
          return log(err, data);
        },
      );
    } else {
      core.debug('Running: git push origin --set-upstream');
      await git.push(
        'origin',
        undefined,
        {'--set-upstream': null},

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…