mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Release API endpoints
This commit is contained in:
parent
b7e1bccc50
commit
0c301f7b5c
6 changed files with 357 additions and 4 deletions
|
@ -331,6 +331,13 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Put("", user.Watch)
|
||||
m.Delete("", user.Unwatch)
|
||||
})
|
||||
m.Group("/releases", func() {
|
||||
m.Combo("").Get(repo.ListReleases).
|
||||
Post(bind(api.CreateReleaseOption{}), repo.CreateRelease)
|
||||
m.Combo("/:id").Get(repo.GetRelease).
|
||||
Patch(bind(api.EditReleaseOption{}), repo.EditRelease).
|
||||
Delete(repo.DeleteRelease)
|
||||
})
|
||||
m.Get("/editorconfig/:filename", context.RepoRef(), repo.GetEditorconfig)
|
||||
m.Group("/pulls", func() {
|
||||
m.Combo("").Get(bind(api.ListPullRequestsOptions{}), repo.ListPullRequests).Post(reqRepoWriter(), bind(api.CreatePullRequestOption{}), repo.CreatePullRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue