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

feature: add glab support #370

Closed brendalf closed 2 months ago

brendalf commented 1 year ago

Describe what this PR does / why we need it

This MR adds support to Gitlab CLI.

Does this pull request fix one issue?

Fixes #282

Describe how you did it

This MR implements the support to Gitlab CI by moving the current calls to gh.run to a backend interface.

The idea is that in the future we can add support to which cli we want by just adding a new backend that implements the same functions that gh currently does.

By default, if the backend doesn't implement some action, a notification is triggered to warn the user.

Describe how to verify it

Still WiP

Special notes for reviews

This MR is still WiP.

I'm opening it so we can start discussing the implementation plan.

Do you agree with the decision of adding the backend interface?

Currently action plan:

brendalf commented 1 year ago

Hi @pwntester. WDYT about this plan?

pwntester commented 1 year ago

Hi @brendalf Thanks a lot for the PR. The plan sounds just right, but my guess is that glab GraphQL endpoints are going to return object trees that are completely different from the gh ones. That means that we are going to need a conversion function to make glab responses processable by Octo. Not sure how difficult that is going to be or if its going to be even possible.

brendalf commented 1 year ago

Great. So I will try implementing the glab respective methods before migrating gh calls to the new format. This way I can address your concern first.

brendalf commented 2 months ago

At lot of things changed in my life and I was unable to proceed with the work, like becoming a father and moving to the Netherlands. Now that we have #530, I will close this one, but I happy to contribute to other features after one is merged (if that happens).