pwntester / octo.nvim

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

Feature Request - GitHub actions #149

Open yingzhu146 opened 3 years ago

yingzhu146 commented 3 years ago

Issue Description

Type: Feature request

Describe what happened (or what feature you want)

The gh cli now offers a nice viewer for actions. As far as I know octo doesn't surface that yet? One of the few workflows I still have to do outside of octo

pwntester commented 3 years ago

Thanks for the suggestion, looks like a good addition

GustavEikaas commented 6 months ago

Is this on the roadmap? I use octo quite heavily for work and would like this feature. If you are open for it I can make a pull request for it @pwntester? It's quite a big scope but something basic would be a good start

wd60622 commented 4 weeks ago

Hi @GustavEikaas, if you can break it down into smaller PRs then that'd be great start and easiest to review. Seems like awesome feature

GustavEikaas commented 4 weeks ago

I tried making something basic just to suit my needs. Could some variant of gh-actions.nvim possibly be upstreamed in some shape or form?

wd60622 commented 3 weeks ago

That's awesome. Seems really useful. Do you think that it would fit into this repo easily? Maybe starting with :Octo actions list command?

What are your thoughts?

GustavEikaas commented 3 weeks ago

Yeah I could take a crack at it, should be pretty straightforward to add I think. By Octo actions list do you mean listing out workflow runs or workflow definitions? I think we should try to use the same terminology as github uses.

From the cli it is

gh run list:          List recent workflow runs
gh workflow list:     List workflow files in your repository

Meaning we could do something like this

:Octo actions run list
:Octo actions workflow list

or as separate subcommands

:Octo run list
:Octo workflow list
wd60622 commented 3 weeks ago

Based on my understanding, the separate commands would be easiest to add. Thatd be in the commands.lua file via two new items in table. The alternative would need logic for another level of nesting which I dont think is implemented. Otherwise, youd have to treat the "list" as command to function. But I do think having all under actions makes the most sense, right?

GustavEikaas commented 3 weeks ago

Ill have a look at it hopefully today. I agree that having it all under actions would make most sense. Ill look into how much work it is to support this.

GustavEikaas commented 3 weeks ago

So at this point, I have moved the list code from my plugin into octo and created the :Octo run list command. This is in the draft PR #638

There are multiple things im planning to do and the code is a mess at this point but please feel free to test out the pr to look for changes/improvements to the UI/DX. I have only ever used this for personal/work projects so there are probably plenty of ux/ui/dx issues.

To test it

image

Again the code is a hot mess which I will fix so dont code review it yet 😉