Update-project-version fails when a commit hash is used
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the update-project-action implementation and the calling workflow in .github/workflows/publish.yml, then reproduce the failure using the linked Actions run and its Git commands. Trace how a commit hash is resolved to a pull-request base or branch, including the suggested git branch -a --contains <commit> approach. Done means a version-update PR can be created when the input refers to a commit hash.
Written by the indexing model from the issue text.
Description
Bug Report
I ran update-project-version and it failed. We suspect it is because of using a commit hash and not a branch name.
Repro or Code Sample
I don't know why this failed for the couple of releases I did. I'm calling the update-project-action here.
Expected Behavior
Create a PR in the repo for bumping the project version.
Current Behavior
Failure. Here's some log info. See this run.
[0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035 5b906c0] [319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0] chore: Update project ni.measurements.metadata.v1.proto to v0.1.0.dev4
Author: dixonjoel <38357562+dixonjoel@users.noreply.github.com>
1 file changed, 1 insertion(+), 1 deletion(-)
/usr/bin/git stash push --include-untracked
No local changes to save
/usr/bin/git rev-list --right-only --count 319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0...0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035
1
/usr/bin/git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --force --depth=11 origin users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0:refs/remotes/origin/users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0
fatal: couldn't find remote ref users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0
Pull request branch 'users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0' does not exist yet.
/usr/bin/git checkout --progress -B users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0 0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035 --
Possible Solution
@bkeryan suggests this:
I think it could use
git branch -a --contains
to find potential branches
it probably ought to try main first
Context
Your Environment
ni/python-actionsversion- Python version
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ni/python-actions
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 15/100
ni/python-actions#57 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ni/python-actions#39 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ni/python-actions#38 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ni/python-actions#19 ·
-
bug
ni/python-actions#7 · 4 comments · 1 assignee ·
All issues in ni/python-actions
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100