Skip to content

gh pr create --fill fails with confusing error: could not compute title or body defaults: fatal: ambiguous argument  #5896

@ssbarnea

Description

@ssbarnea

Describe the bug

I got an error below when running gh pr create --label skip-changelog --fill from inside a github action.

It is quite weird because I got the impression that the same action worked fine previously so it might be a recent regression.

The effective error comes from git which is called by gh. I checked and the previous command was able to correctly push the code to the new branch, one that has the same nable as the local branch (release/v0.9.0).

Still, gh pr create failed ugly.

Steps to reproduce the behavior

gh version 2.13.0

git push origin "release/${RELEASE_NAME}"
gh pr create --label skip-changelog --fill
# ^ that one fails

Expected vs actual behavior

[release/v0.9.0 d4bff6f] Release v0.9.0
 3 files changed, 8 insertions(+), 1 deletion(-)
remote: 
remote: Create a pull request for 'release/v0.9.0' on GitHub by visiting:        
remote:      https://github.com/ansible/ansible-language-server/pull/new/release/v0.9.0
remote: 
To https://github.com/ansible/ansible-language-server
 * [new branch]      release/v0.9.0 -> release/v0.9.0
could not compute title or body defaults: fatal: ambiguous argument 'origin/main...release/v0.9.0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
/usr/bin/git: exit status 128

Logs

Code: https://github.com/ansible/ansible-language-server/blob/main/tools/release.sh#L60
Effect: https://github.com/ansible/ansible-language-server/runs/7234603626?check_suite_focus=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandp2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions