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

feat: add github cli issue and pullrequest #305

Closed
wants to merge 1 commit into from
Closed

feat: add github cli issue and pullrequest #305

wants to merge 1 commit into from

Conversation

windwp
Copy link
Contributor

@windwp windwp commented Dec 1, 2020

Use gh cli view issue pullrequest and checkout pull request

https://cli.github.com/manual/
demo

Press <c-t> : open issue or pull request in web
Press <cr> : checkout pull request

@kkharji
Copy link
Member

kkharji commented Dec 1, 2020

😲 😲 😍 😍 😍

This was on my mind for the longest time, wise choice @windwp .

@kkharji
Copy link
Member

kkharji commented Dec 1, 2020

Use gh cli view issue pullrequest and checkout pull request

Is there a workaround for this picker to work without gh cli? if not I think this better as an extension telescope-gh.nvim.

cc @Conni2461

@tjdevries
Copy link
Member

Wow!! really cool.

Would you be OK if I made a separate repo for this to go as an extension? I think this qualifies as an external plugin. I can make a repo (nvim-telescope/telescope-github.nvim) for you and add you as a maintainer there if you are interested. That way you can make changes / updatees whenever you want :)

@windwp
Copy link
Contributor Author

windwp commented Dec 1, 2020

@tjdevries
Ok it will better to do that.
i will add more feature to this

@windwp
Copy link
Contributor Author

windwp commented Dec 2, 2020

I just found this repo https://github.com/pwntester/octo.nvim has github issue function and it can add comment too 👍
I think we can ask him to add feature about pullrequest.

@kkharji
Copy link
Member

kkharji commented Dec 2, 2020

@windwp You are added to https://github.com/nvim-telescope/telescope-github.nvim, you choose to open a pr there from a dev branch or push directly to master. When you are ready for testing just ping us on telescope/go-test on gitter.

@kkharji kkharji closed this Dec 2, 2020
@kkharji
Copy link
Member

kkharji commented Dec 2, 2020

I just found this repo https://github.com/pwntester/octo.nvim has github issue function and it can add comment too
I think we can ask him to add feature about pullrequest.

Oh thats nice, I think we simply add octo.nvim in inspiration section to give some credit to his work in creating telescope-github.nvim

@pwntester
Copy link
Contributor

octo.nvim is already using Telescope for fuzzy-picking Issues so this would be a great addition! I would prefer to integrate it into octo rather than bringing it in as a dependency. @windwp Would you mind if I use these pickers in octo (with the right credits of course) regardless of them being moved into a telescope extension?

@windwp
Copy link
Contributor Author

windwp commented Dec 2, 2020

@tami5
I push my code to new repo https://github.com/nvim-telescope/telescope-github.nvim
I add feature to filter issue and pull request.
@pwntester
Yes you can use my code or reuse any picker on new repo. It will nice if you can merge your code to new repo 😍

@kkharji
Copy link
Member

kkharji commented Dec 2, 2020

@tami5
I push my code to new repo https://github.com/nvim-telescope/telescope-github.nvim
I add feature to filter issue and pull request.
@pwntester
Yes you can use my code or reuse any picker on new repo. It will nice if you can merge your code to new repo

Great work, very clean and informative readme, I like it. I've open few issues after doing some testing

@weilbith
Copy link
Contributor

weilbith commented Dec 3, 2020

So what is now the difference between octo.nvim and telescope-github.nvim? (assuming that octo.nvim implements to use the GitHub CLI soon as well [issue]).
octo.nvim also allows to edit/comment on issues and PRs right? So what would be the reason to have two of such plugins? Isn't it wasted development time to work on both in parallel? 🤔

@pwntester
Copy link
Contributor

Yep, the main difference is that with <CR> you will be able to edit the issue/PR. I understand that there may be people that prefer to do the editing on the browser though, those can use the extension instead.

I already implemented these commands in octo.nvim and will soon migrate all custom curl based calls to use GH CLI instead

@weilbith
Copy link
Contributor

weilbith commented Dec 3, 2020

Alright, so why not merge both together and let the user decide what should be the default action (browser or internal) and eventually allow him to map actions, so he can decide himself when he needs to. 🤷
This is one smallish feature (I mean not your great feature of editing issues within NeoVim, that is great!!), so no need to have redundant likely code for all the rest both plugins share in common. Or do I miss something here? 🤔 Is maybe the vision for future development of both plugins different?

@pwntester
Copy link
Contributor

Im ok to have them in the extension and adjust mappings/actions based on the existance of octo.nvim. That would bring another dependency to octo, but I think its ok since it would remove the Telescope one (there may be people wanting to use octo without fuzzy pickers).

@windwp what do you think? You can see my mods here mostly: A) specify repo and B) open issue in octo action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants