mscherer
34b5436ae1
Refactor various strings ( #17784 )
...
Fixes #16478
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
Lunny Xiao
1fee11d69a
Move accessmode into models/perm ( #17828 )
3 years ago
Lunny Xiao
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
3 years ago
Lunny Xiao
c97d66d23c
Move repofiles from modules/repofiles to services/repository/files ( #17774 )
...
* Move repofiles from modules to services
* rename services/repository/repofiles -> services/repository/files
* Fix test
Co-authored-by: 6543 <6543@obermui.de>
3 years ago
pricly-yellow
4afdb1eb78
API pull's head/base have correct permission ( #17214 )
...
close #17181
* for all pull requests API return permissions of caller
* for all webhook return empty permissions
Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago
a1012112796
3705168837
Add agit flow support in gitea ( #14295 )
...
* feature: add agit flow support
ref: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/
example:
```Bash
git checkout -b test
echo "test" >> README.md
git commit -m "test"
git push origin HEAD:refs/for/master -o topic=test
```
Signed-off-by: a1012112796 <1012112796@qq.com>
* fix lint
* simplify code add fix some nits
* update merge help message
* Apply suggestions from code review. Thanks @jiangxin
* add forced-update message
* fix lint
* splite writePktLine
* add refs/for/<target-branch>/<topic-branch> support also
* Add test code add fix api
* fix lint
* fix test
* skip test if git version < 2.29
* try test with git 2.30.1
* fix permission check bug
* fix some nit
* logic implify and test code update
* fix bug
* apply suggestions from code review
* prepare for merge
Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix permission check bug
- test code update
- apply suggestions from code review @zeripath
Signed-off-by: a1012112796 <1012112796@qq.com>
* fix bug when target branch isn't exist
* prevent some special push and fix some nits
* fix lint
* try splite
* Apply suggestions from code review
- fix permission check
- handle user rename
* fix version negotiation
* remane
* fix template
* handle empty repo
* ui: fix branch link under the title
* fix nits
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
6543
290cf75f93
[refactor] Unify the export of user data via API ( #15144 )
...
* [refactor] unify how user data is exported via API
* test time via unix timestamp
4 years ago
6543
177da717a7
[API] get pull, return head branch sha, even if deleted ( #14931 )
...
* API: return head branch sha, even if deleted
* relax if ref not resolvable
4 years ago
6543
7ac8a770e1
Move Repo APIFormat to convert package ( #13787 )
...
* Move Repo APIFormat to convert package
* tweek
4 years ago
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>
4 years ago
6543
dc812f8ba5
Issue/Pull expose IsLocked Property on API ( #11708 )
...
Expose IsLocked Property
5 years ago
zeripath
3fc4f3670c
Fix panic in API pulls when headbranch does not exist ( #10676 )
...
* Fix panic in API pulls when headbranch does not exist
* refix other reference to plumbing.ErrReferenceNotFound
Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
Lunny Xiao
5abe1c52de
Display pull request head branch even the branch deleted or repository deleted ( #10413 )
...
* Display pull request head branch even the branch deleted or repository deleted
* Merge getHeadRepo/loadHeadRepo and getBaseRepo/loadBaseRepo on pull and fill repo when pr.Issue.Repo is available
* retrieve sha from pull head when pull request branch deleted and fix tests
* Fix test
* Ensure MustHeadRepoName returns empty string if no head repo
Co-authored-by: zeripath <art27@cantab.net>
5 years ago
6543
7e8cdba181
[Refactor] move APIFormat() of Issue and Label to convert package ( #10423 )
...
* Label: delete .APIFormat() and use convert.ToLabel()
* move issue APIFormat too
* add missing one
* move TEST too
* handle error -> return empty APIIssue
* Apply suggestions from code review
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
5 years ago
6543
8d43563a32
[BugFix] [API] Pull.API.Convert: Only try to get HeadBranch if HeadRepo exist ( #10029 )
...
* only try to get HeadBranch if HeadRepo exist
* impruve
* no nil error
* add TEST
* correct error msg
5 years ago
Lunny Xiao
2677d071f9
Move newbranch to standalone package ( #9627 )
...
* Move newbranch to standalone package
* move branch functions to modules to avoid dependencies cycles
* fix tests
* fix lint
* fix lint
5 years ago
Lunny Xiao
384c2b342e
Move pull request api convert to convert package ( #9664 )
...
* Move pull request api convert to convert package
* Rename ToPullRequest to ToAPIPullRequest
5 years ago