Lunny Xiao
1d8543e7db
Move some files into models' sub packages ( #20262 )
...
* Move some files into models' sub packages
* Move functions
* merge main branch
* Fix check
* fix check
* Fix some tests
* Fix lint
* Fix lint
* Revert lint changes
* Fix error comments
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
2022-08-25 10:31:57 +08:00
a1012112796
e3e06d13af
fix permission check for delete tag ( #19985 )
...
fix #19970
by the way, fix some error response about protected tags.
Signed-off-by: a1012112796 <1012112796@qq.com>
2022-06-16 22:03:03 +02:00
KN4CK3R
80fd25524e
Renamed ctx.User to ctx.Doer. ( #19161 )
...
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-03-22 15:03:22 +08:00
zeripath
5cb0c9aa0d
Propagate context and ensure git commands run in request context ( #17868 )
...
This PR continues the work in #17125 by progressively ensuring that git
commands run within the request context.
This now means that the if there is a git repo already open in the context it will be used instead of reopening it.
Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-19 23:26:57 +00:00
6543
5f248d0df2
[API] Add delete release by tag & fix unreleased inconsistency ( #14563 )
...
* DeleteReleaseByTag delete release not git tags
* Add api to delete tag (without release)
* fix & extend tests
* fix swagger doc
2021-02-07 19:32:18 +01:00
Cameron Braid
3c965c3e30
[API] GetRelease by tag only return release ( #14397 )
...
get release by tag should filter out tag releases to be consistent with list releases and get by id
Co-authored-by: 6543 <6543@obermui.de>
2021-02-04 04:12:25 +01:00
John Olheiser
b5e974c8a5
Delete tag API ( #13358 )
...
* Delete tag API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Wording
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add conflict response and fix API tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix other test
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-10-30 20:56:34 -05:00
6543
d453533beb
[Refactor] Move APIFormat functions into convert package ( #12856 )
...
* USER APIFormat -> ToUser
* Migrate more and mark APIFormat deprecated
* models.Comment APIFormat() -> convert.ToComment
* models.Release APIFormat() -> convert.ToRelease
* models.Attachments APIFormat() -> convert.ToReleaseAttachments
* models.CommitStatus APIFormat() -> convert.ToCommitStatus
* finish migration to convert.ToUser
* Move Test
* Imprufe Test
* fix test
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-17 00:23:08 -04:00
Johan Van de Wauw
34d9cb335c
API: Get release by tags endpoint ( #12932 )
...
Get a release based on a tag name (for which a release exists).
Based on:
https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name
Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: 6543 <6543@obermui.de>
2020-09-25 20:11:43 +01:00