Add API for gitignore templates (#22783)

This implements the [Gitignores template API of GitHub](https://docs.github.com/en/rest/gitignore?apiVersion=2022-11-28) in Gitea
This commit is contained in:
JakobDev 2023-04-27 05:51:20 +02:00 committed by GitHub
parent 50133b02bd
commit 36a5d4c2f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 207 additions and 0 deletions

View file

@ -72,6 +72,12 @@ type ServerVersion struct {
Version string `json:"version"`
}
// GitignoreTemplateInfo name and text of a gitignore template
type GitignoreTemplateInfo struct {
Name string `json:"name"`
Source string `json:"source"`
}
// LicensesListEntry is used for the API
type LicensesTemplateListEntry struct {
Key string `json:"key"`