#683 pre-push-check prevents pushing to an arbitrarily named branch
Closed: Fixed a year ago by onosek. Opened a year ago by nforro.

Let's say in my dist-git repo I have a branch called private-branch:

$ fedpkg switch-branch private-branch
Switched to branch 'private-branch'

$ git status 
On branch private-branch
Your branch is up to date with 'origin/private-branch'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   test

$ fedpkg commit -m test
[private-branch 6ed1c20] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test

$ fedpkg push
Could not execute pre_push_check: Could not find the release/dist from branch name private-branch
Please specify with --release
error: failed to push some refs to 'ssh://pkgs.fedoraproject.org/rpms/XXX'
Could not execute push: Failed to execute command.

$ fedpkg --release rawhide push
Could not execute pre_push_check: Could not find the release/dist from branch name private-branch
Please specify with --release
error: failed to push some refs to 'ssh://pkgs.fedoraproject.org/rpms/XXX'
Could not execute push: Failed to execute command.

This issue breaks the traditional pull request workflow where people name their branches based on features, push them to forks and propose to upstream [dist-git] branches that have strict naming. Workaround exists with the --no-verify option, it would still be amazing to have this fixed asap to have that pull request workflow working by default in Fedora, so all contributors have solid experience.

Just came here to report the same. Trying to push https://src.fedoraproject.org/rpms/python-click/pull-request/20 resulted in:

[python-click (pytest7.3.0 %)]$ git push -u churchyard pytest7.3.0 
Could not execute pre_push_check: Could not find the release/dist from branch name pytest7.3.0
Please specify with --release
error: failed to push some refs to 'ssh://pkgs.fedoraproject.org/forks/churchyard/rpms/python-click.git'

I was wondering why this started to happen today for me and why it worked previously. I realized that it only worked for repositories I have cloned with the previous fedpkg version. The failure started happening when I cloned new repos.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #689 Merged a year ago