pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.37k stars 127 forks source link

The order of `default_remote` doesn't work #431

Closed kezhenxu94 closed 11 months ago

kezhenxu94 commented 11 months ago

Issue Description

Type: but report

The config default_remote doesn't work as expected, it just works randomly, sometimes the remote is resolved with the upstream but sometimes it's origin.

Describe what happened (or what feature you want)

The doc claims that Octo respects the order of default_remote, but it doesn't actually respect the order of the config.

default_remote = {"upstream", "origin"}; -- order to try remotes

Describe what you expected to happen

When opening the pull request/issue list, the remote should be resolved according to the order specified in default_remote.

How to reproduce it (as minimally and precisely as possible)

  1. Add two remotes upstream and origin, and open some pull requests in upstream but no pull request in origin
  2. Run Octo pr list multiple times.
  3. The result is randomly something like "no pull request in remote kezhenxu94/skywalking".

Tell us your environment

Anything else we need to know?