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
GitLab Integration #1
Comments
Hi Adam, Agreed, Gitlab inrtegration should be a priority. I will have a look at the API and try to implement the integration asap. I'll be sure to link RepoSplit in that Gitlab discussion once integration is finished! |
@adamgoose I just had a try at the Gitlab API, I raised a question in their CE issues section. I'll paste it here for you as well, since you've been tinkering with it already. I'm faced with two issues:
On one hand the main API docs page states:
And on the other hand the API Repositories page reads:
Which one is it?
When accessing a public repo such as buble. How would the API base URL be? I can see in the docs that the endpoint would be I tried |
Regarding authentication: I'd recommend you ask users to provide a Personal Access Token, and then use it to access the API. Your extension should support multiple PATs, one per GitLab domain (we don't use gitlab.com, rather a self-hosted instance). The API url is not on a subdomain, rather a path prefix. Thus, the following CURLs demonstrate how to make an API Call using a PAT.
OR
Lastly, GitLab's API uses Project IDs instead of user/repo. I hope you can find a better way to obtain the Project ID off the page, but if not, see the following headers available on the home page of the aforementioned repository: <meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="object" property="og:type">
<meta content="GitLab" property="og:site_name">
<meta content="Rich Harris / buble" property="og:title">
<meta content="The blazing fast, batteries-included ES2015 compiler" property="og:description">
<meta content="https://gitlab.com/uploads/project/avatar/1031540/favicon.png" property="og:image">
<meta content="https://gitlab.com/Rich-Harris/buble" property="og:url">
<meta content="summary" property="twitter:card">
<meta content="Rich Harris / buble" property="twitter:title">
<meta content="The blazing fast, batteries-included ES2015 compiler" property="twitter:description">
<meta content="https://gitlab.com/uploads/project/avatar/1031540/favicon.png" property="twitter:image"> I guess you could pull it out of the avatar URL? |
Thanks for the reply! I'll give it a try soone :) |
Hi @adamgoose, |
I see that you have GitLab on your ToDo list, however I have been tracking GitLab integration on a similar Chrome Plugin. Take a peek:
ovity/octotree#265
https://gitlab.com/gitlab-org/gitlab-ce/issues/13723
RepoSplit is a bit different than OctoTree, and would probably be easier to implement since you're not really integrating into the GitLab UI. Your plugin looks great, and I would love to be able to use it with GitLab! Hope it pans out.
The text was updated successfully, but these errors were encountered: