Git Gateway Support
See original GitHub issueI’ve noticed a few issues related to publishing (#75) and connecting to GitHub (#414). My website is built with Jekyll, stored on GitLab and hosted on Netlify. I currently use NetlifyCMS for managing blog posts, but it is too limited for managing the entire site. NetlifyCMS connects to GitLab (and other Git sites) through Netlify’s Git Gateway. Integrating Git Gateway could be a solution for the mentioned issues about publishing.
It appears to be possible to use Git Gateway without Netlify, but using Netlify makes it easy for the user. It uses Netlify’s Identify feature or can use a GoTrue instance (which is the heart of Netlify’s Identity feature) for authentication.
From what I can tell, Git Gateway allows tools to use the endpoints /.netlify/git/github/
for GitHub and /.netlify/git/gitlab/repository/
for Gitlab. These are equivalent to GitHub’s https://api.github.com/repos/your-user/your-repository/
and Gitlab’s https://gitlab.com/api/v4/projects/your-user%2Fyour-repository/
endpoints.
These are the sub endpoints that they give us access to:
for GitHub:
/repos/:owner/:name/git/
/repos/:owner/:name/contents/
/repos/:owner/:name/pulls/
/repos/:owner/:name/branches/
for GitLab:
/repos/:owner/:name/files/
/repos/:owner/:name/commits/
/repos/:owner/:name/tree/
So, for GitHub, we can use git
, contents
, pulls
and branches
, which would be appended to Git Gateway’s GitHub endpoint that they provide. Likewise, for Gitlab, we can use files
, commits
, and tree
, which would be appended to Git Gateway’s Gitlab endpoint that they provide. GitHub and Gitlab’s APIs should still apply but with these endpoints, within the limitations of Git Gateway.
I think this would be worth looking into and integrating into Jekyll Admin. As I explore Jekyll Admin and its source code, I may be able to provide some help where I can.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@mertkahyaoglu To clarify, NetlifyCMS is the admin panel, much like I understand Jekyll Admin to be. It uses Git Gateway as a backend to communicate with GitHub and Gitlab. Git Gateway can be used without NetlifyCMS, but with other projects.
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the
master
branch, please reply with all of the information you have about it in order to keep the issue open.If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.