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

feature: add glab support #370

Closed
wants to merge 6 commits into from
Closed

feature: add glab support #370

wants to merge 6 commits into from

Conversation

brendalf
Copy link

@brendalf brendalf commented Feb 5, 2023

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:

  • Add backend interface.
  • Migrate remaining gh and graphql usage to backend functions inside backend.gh.
  • Write similar backend.gh functions to backend.glab.
  • Write a function to determine which backend to use.

@brendalf brendalf changed the title feature: add glab support [WiP] feature: add glab support Feb 5, 2023
@brendalf brendalf marked this pull request as draft February 5, 2023 06:04
@brendalf brendalf changed the title [WiP] feature: add glab support feature: add glab support Feb 5, 2023
@brendalf
Copy link
Author

brendalf commented Feb 6, 2023

Hi @pwntester. WDYT about this plan?

@pwntester
Copy link
Owner

pwntester commented Feb 6, 2023

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
Copy link
Author

brendalf commented Feb 6, 2023

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
Copy link
Author

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).

@brendalf brendalf closed this May 14, 2024
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.

Migration to Teal with GitLab Support
2 participants