8 Commits (b18042bb8ca72acf1ccb26e342abb4d4d53e6113)

Author SHA1 Message Date
6543 e483220ea3
[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
4 years ago
Lunny Xiao a5281895c7
Fix bug on pull view when required status check no ci result (#10648) 4 years ago
zeripath 13c6681a07
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.
4 years ago
zeripath e96f3542d0
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.
4 years ago
Lunny Xiao 81daf26878
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
5 years ago
zeripath 722a7c902d
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
5 years ago
Elias Norberg 668d3d02aa If no specific context is required for status check, require an overall success (#8318)
Signed-off-by: Elias Norberg <elias@aisle.se>
5 years ago
Lunny Xiao eb11ca6847
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
5 years ago