Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netlify/git-gateway
A Gateway to Git APIs
https://github.com/netlify/git-gateway
managed-services platform
Last synced: 29 days ago
JSON representation
A Gateway to Git APIs
- Host: GitHub
- URL: https://github.com/netlify/git-gateway
- Owner: netlify
- License: mit
- Created: 2017-08-31T03:54:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T09:31:00.000Z (7 months ago)
- Last Synced: 2024-08-04T01:24:11.938Z (4 months ago)
- Topics: managed-services, platform
- Language: Go
- Size: 5.61 MB
- Stars: 398
- Watchers: 44
- Forks: 89
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-list - git-gateway
- awesome-starred - netlify/git-gateway - A Gateway to Git APIs (others)
README
# git-gateway - Gateway to hosted git APIs
**Secure role based access to the APIs of common Git Hosting providers.**
When building sites with a JAMstack approach, a common pattern is to store all content as structured data in a Git repository instead of relying on an external database.
Netlify CMS is an open-source content management UI that allows content editors to work with your content in Git through a familiar content editing interface. This allows people to write and edit content without having to write code or know anything about Git, markdown, YAML, JSON, etc.
However, for most use cases you won’t want to require all content editors to have an account with full access to the source code repository for your website.
Netlify’s Git Gateway lets you set up a gateway to your choice of Git provider's API (currently available with both GitHub and GitLab 🎉 ) that lets tools like Netlify CMS work with content, branches and pull requests on your users’ behalf.
The Git Gateway works with any identity service that can issue JWTs and only allows access when a JSON Web Token with sufficient permissions is present.
To configure the gateway, see our `example.env` file
The Gateway limits access to the following sub endpoints of the repository:
for GitHub:
```
/repos/:owner/:name/git/
/repos/:owner/:name/contents/
/repos/:owner/:name/pulls/
/repos/:owner/:name/branches/
/repos/:owner/:name/merges/
/repos/:owner/:name/statuses/
/repos/:owner/:name/compare/
/repos/:owner/:name/commits/
/repos/:owner/:name/issues//labels
```
for GitLab:
```
/projects/:owner/:name/merge_requests/
/projects/:owner/:name/repository/files/
/projects/:owner/:name/repository/commits/
/projects/:owner/:name/repository/tree/
/projects/:owner/:name/repository/compare/
/projects/:owner/:name/repository/branches/
```