wndhydrnt / saturn-bot

Automatically create pull requests. Create, modify or delete files across repositories.
https://saturn-bot.readthedocs.io
GNU Affero General Public License v3.0
0 stars 0 forks source link

Panic when auto-merging a pull request on GitHub #57

Open wndhydrnt opened 3 weeks ago

wndhydrnt commented 3 weeks ago

Steps to reproduce:

  1. Create a task with autoMerge: true.
  2. Run the task and create the pull request.
  3. Run the task again to auto-merge it.

Result

GitHub API responds with

405 Merge commits are not allowed on this repository

Panic:

github.com/wndhydrnt/saturn-bot/pkg/command.(*Run).Run
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/pkg/command/run.go:108
github.com/wndhydrnt/saturn-bot/pkg/command.ExecuteRun
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/pkg/command/run.go:170
github.com/wndhydrnt/saturn-bot/cmd.createRunCommand.func1
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/cmd/run.go:63
github.com/spf13/cobra.(*Command).execute
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987
github.com/spf13/cobra.(*Command).ExecuteC
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/wndhydrnt/saturn-bot/cmd.Execute
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/cmd/root.go:30
main.main
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/main.go:10
runtime.main
    /Users/markus/.asdf/installs/golang/1.22.2/go/src/runtime/proc.go:271
2024-08-21T19:45:20.360+0200    ERROR   command failederrorerrors occurred, check previous log messages
github.com/wndhydrnt/saturn-bot/cmd.handleError
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/cmd/root.go:47
github.com/wndhydrnt/saturn-bot/cmd.createRunCommand.func1
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/cmd/run.go:64
github.com/spf13/cobra.(*Command).execute
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987
github.com/spf13/cobra.(*Command).ExecuteC
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
    /Users/markus/.asdf/installs/golang/1.22.2/packages/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/wndhydrnt/saturn-bot/cmd.Execute
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/cmd/root.go:30
main.main
    /Users/markus/dev/workspace/github.com/wndhydrnt/saturn-bot/main.go:10
runtime.main
    /Users/markus/.asdf/installs/golang/1.22.2/go/src/runtime/proc.go:271