Skip to content

Failing because the branch already exists #245

@bnb

Description

@bnb

Perhaps I'm just misunderstanding how the branch property in the config is supposed to work, but in using it after the initial run where it was created the Action is failing on every subsequent run with the assertion that git checkout -b <branch> already exists.

Here's an example run:

https://github.com/bnb/node/runs/1327432876

Here's the error:

Remote branch "actions/authors-update" checked out locally.
Branch "actions/authors-update" does not yet exist on remote.
Error: Command failed with exit code 128 (Unknown system error -128): git checkout -b actions/authors-update
    at makeError (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/v1.x/dist/index.js:5673:11)
    at handlePromise (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/v1.x/dist/index.js:7624:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runShellCommand (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/v1.x/dist/index.js:707:32)
    at async checkOutRemoteBranch (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/v1.x/dist/index.js:699:5)
    at async main (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/v1.x/dist/index.js:567:32) {
  command: 'git checkout -b actions/authors-update',
  exitCode: 128,
  exitCodeName: 'Unknown system error -128',
  stdout: '',
  stderr: "fatal: A branch named 'actions/authors-update' already exists.",
  all: "fatal: A branch named 'actions/authors-update' already exists.",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  signal: undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions