aweris / gale

GitHub Action Local Executor
Apache License 2.0
143 stars 4 forks source link

Err: No commit found for the ref when running gale on a branch not exist in git repo #64

Closed aweris closed 1 year ago

aweris commented 1 year ago

At present, gale employs github-cli to locate the commit sha for workflows. However, this approach produces an error when executing gale on a repository where a branch only exists locally. To resolve this issue, we need to either overlook this error or modify the verification process.

█     │   │ │ [5.16s] ERROR ./bin/gale run --workflows-dir ci/workflows ci/workflows/secret-printer.yaml test --secret FOO=foo --secret BAR=bar
┃     │   │ │ Error: input:1: container.pipeline.from.withUnixSocket.withFile.withEnvVariable.withMountedCache.withServiceBinding.withEnvVariable.withEnvVariable.withExec.sync process "sh -c echo failed to get current repository: gh execution
┃     │   │ │ failed: exit status 1 stderr: gh: No commit found for the ref refs/heads/aweris/demo-gale (HTTP 404)\n && exit 1" did not complete successfully: exit code: 2
┃     │   │ │