a1012112796
0ea27f0894
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 >
2021-07-28 17:42:56 +08:00
6543
382d761c6b
[Refactor] CombinedStatus and CommitStatus related functions & structs ( #14026 )
...
* RM unused struct
* rename (*CommitStatus) loadRepo() -> loadAttributes()
* move ToCommitStatus into its own file
* use CommitStatusState instead of StatusState
* move CombinedStatus convertion into convert package
* let models.GetLatestCommitStatus use repoID direct and accept ListOptions
* update swagger docs
* fix tests
* Fix swagger docs
* rm page
* fix swagger docs!!!
* return json null
* always return json
* rename api.Status to api.CommitStatus
* fix swagger docs
* sec swagger fix
2020-12-18 11:33:32 +08:00
Lunny Xiao
dac4a63402
Fix bug on pull view when required status check no ci result ( #10648 )
2020-03-07 07:33:20 +00:00
zeripath
f3af767bdc
Prevent nil pointer in GetPullRequestCommitStatusState ( #10342 )
...
Ensure that pr.HeadRepo is loaded before using it in GetPullRequestCommitStatusState.
Fixes error on merging with successful commit merge statuses.
2020-02-18 19:34:08 +00:00
zeripath
b28a334b78
Set the initial commit status to Success otherwise it will always be Pending ( #10317 )
...
The commit status code has a bug whereby setting the initial status to Pending means you can never have the status of Success - it should be set to Success.
2020-02-17 20:22:36 +00:00
Lunny Xiao
d309096507
Fix wrong hint when status checking is running on pull request view ( #9886 )
...
* Fix wrong hint when status checking is running on pull request view
* fix lint
* fix test
* fix test
* fix wrong tmpl
* fix import
* rename function name
2020-01-22 11:46:04 +08:00
zeripath
fcdf91b497
Add Close() method to gogitRepository ( #8901 )
...
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes #7947
2019-11-13 07:01:19 +00:00
Elias Norberg
e785a2d20f
If no specific context is required for status check, require an overall success ( #8318 )
...
Signed-off-by: Elias Norberg <elias@aisle.se >
2019-09-30 10:33:40 +08:00
Lunny Xiao
e67d56c8a9
Extract actions on new pull request from models to pulls service and move code.gitea.io/gitea/modules/pull to code.gitea.io/gitea/services/pull ( #8218 )
...
* extract actions on new pull request from models to pulls service
* improve code
* move code.gitea.io/gitea/modules/pull to code.gitea.io/gitea/services/pull
* fix fmt
* Rename pulls.go to pull.go
2019-09-27 08:22:36 +08:00