Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spr tries to push when merging #424

Open
yang opened this issue Aug 26, 2024 · 0 comments
Open

spr tries to push when merging #424

yang opened this issue Aug 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yang
Copy link

yang commented Aug 26, 2024

Fails due to "Protected branch update failed". Generally doesn't make sense to me that it would try to update branches when we're trying to merge PRs. There's also no way to get it to avoid doing a rebase onto origin/master.

❯ git spr version
> git rev-parse --show-toplevel
0.14.9 : 2024-03-15T19:34:25Z : e2eb7866

❯ git spr merge
> git rev-parse --show-toplevel
> github fetch pull requests
> git log --format=medium --no-color origin/master..HEAD
> git branch --no-color
> github update 49640 : Enable fff
> github merge 49640 : Enable fff
> github add comment 49631 : Enable ggg
> github close 49631 : Enable ggg
MERGED https://github.com/acmes/acme/pull/49631 : Enable foo profiling
MERGED https://github.com/acmes/acme/pull/49640 : Enable fooscope across more processes
> git fetch
> git rebase origin/master --autostash
> github fetch pull requests
> git log --format=medium --no-color origin/master..HEAD
> git branch --no-color
> git log --format=medium --no-color origin/master..HEAD
> git status --porcelain --untracked-files=no
> git push --force --atomic origin 8ac6c939ca78bb18a4c5002ee44f69391b44e1d0:refs/heads/spr/master/ce112434
remote: error: GH006: Protected branch update failed for refs/heads/spr/master/ce112434.
remote: error: A pull request for this branch has been added to a merge queue. Branches that
remote: are queued for merging cannot be updated. To modify this branch, dequeue the
remote: associated pull request.
remote:
To github.com:acmes/acme.git
 ! [remote rejected]         8ac6c939ca78bb18a4c5002ee44f69391b44e1d0 -> spr/master/ce112434 (protected branch hook declined)
error: failed to push some refs to 'github.com:acmes/acme.git'
panic: exit status 1

goroutine 1 [running]:
github.com/ejoffe/spr/git/realgit.(*gitcmd).MustGit(0x1400010a010?, {0x140000c6000?, 0x14000507258?}, 0x140000c0000?)
	/Users/runner/work/spr/spr/git/realgit/realcmd.go:44 +0x4c
github.com/ejoffe/spr/spr.(*stackediff).syncCommitStackToGitHub(0x140000ceb40, {0x14000507610?, 0x140000b76eb?}, {0x14000162550, 0x1, 0x1049aa280?}, 0x140001623c0)
	/Users/runner/work/spr/spr/spr/spr.go:556 +0x5b4
github.com/ejoffe/spr/spr.(*stackediff).UpdatePullRequests(0x140000ceb40, {0x104eb44f0?, 0x1051d1500}, {0x0, 0x0, 0x0}, 0x0)
	/Users/runner/work/spr/spr/spr/spr.go:180 +0x790
main.main.func5(0x1400021e6c0?)
	/Users/runner/work/spr/spr/cmd/spr/main.go:193 +0xac
github.com/urfave/cli/v2.(*Command).Run(0x1400021e6c0, 0x140000b0900)
	/Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/command.go:169 +0x4f8
github.com/urfave/cli/v2.(*App).RunContext(0x1400008a9c0, {0x104eb44f0?, 0x1051d1500}, {0x14000138000, 0x2, 0x2})
	/Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/app.go:341 +0x85c
github.com/urfave/cli/v2.(*App).Run(...)
	/Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/app.go:247
main.main()
	/Users/runner/work/spr/spr/cmd/spr/main.go:230 +0x1208
@chriscz chriscz added the bug Something isn't working label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@yang @chriscz and others