pwntester / octo.nvim

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

Add option to select base repo #335

Closed LoipesMas closed 1 year ago

LoipesMas commented 1 year ago

Describe what this PR does / why we need it

Adds config option always_select_remote that gives select prompt for base repo when creating a PR.

Does this pull request fix one issue?

Fixes #334

Describe how you did it

I added function to get all configured remotes in the current repo, then I parse it and display it in inputlist and use it as base repo. This only happens if always_select_remote is set to true. Otherwise the behaviour is same as before.

Describe how to verify it

Set always_select_remote to true :Octo pr create Prompt with remotes should be displayed Select a repo from the list Selected repo should be used as base repo for the PR

Special notes for reviews

My lua skills are pretty basic, so feel free to suggest/make any improvements

pwntester commented 1 year ago

Thanks for the PR (and sorry for the late response). The changes look good to me but can you please document the new config option in the README and docs?

LoipesMas commented 1 year ago

I updated the README, but I'm not sure what to update in the docs, since their config entry just points to the README.

pwntester commented 1 year ago

Thanks! You are right, in that case, adding that to the README is enough. Thanks for the PR!