Zettat123
7ad5031328
Fix duplicate status check contexts ( #30660 )
...
Caused by #30076 .
There may be some duplicate status check contexts when setting status
checks for a branch protection rule. The duplicate contexts should be
removed.
Before:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3 "
width="600px" />
After:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3 "
width="600px" />
7 months ago
Lunny Xiao
eba9c0ce48
Add testing for CalcCommitStatus ( #28823 )
10 months ago
KN4CK3R
3793ec4d14
Fix `GetCommitStatuses` ( #28787 )
...
Fixes #28764 .
10 months ago
silverwind
5bf367f904
Restore warning commit status ( #27504 )
...
Partial revert of https://github.com/go-gitea/gitea/pull/25839 . This
commit status is used by a number of external integrations, so I think
we should not remove it (See
https://github.com/go-gitea/gitea/pull/25839#issuecomment-1729002077 ).
This is a rare case where an existing migration needed to be alterted to
avoid data loss.
---------
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
1 year ago
caicandong
840830b655
Remove commit status running and warning to align GitHub ( #25839 )
...
Fix #25776 . Close #25826 .
In the discussion of #25776 , @wolfogre's suggestion was to remove the
commit status of `running` and `warning` to keep it consistent with
github.
references:
-
https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#about-commit-statuses
## ⚠️ BREAKING ⚠️
So the commit status of Gitea will be consistent with GitHub, only
`pending`, `success`, `error` and `failure`, while `warning` and
`running` are not supported anymore.
---------
Co-authored-by: Jason Song <i@wolfogre.com>
1 year ago
Jason Song
7adc2de464
Use context parameter in models/git ( #22367 )
...
After #22362 , we can feel free to use transactions without
`db.DefaultContext`.
And there are still lots of models using `db.DefaultContext`, I think we
should refactor them carefully and one by one.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
flynnnnnnnnnn
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2 years ago
Lunny Xiao
86c85c19b6
Refactor AssertExistsAndLoadBean to use generics ( #20797 )
...
* Refactor AssertExistsAndLoadBean to use generics
* Fix tests
Co-authored-by: zeripath <art27@cantab.net>
2 years ago
Lunny Xiao
110fc57cbc
Move some code into models/git ( #19879 )
...
* Move access and repo permission to models/perm/access
* fix test
* Move some git related files into sub package models/git
* Fix build
* fix git test
* move lfs to sub package
* move more git related functions to models/git
* Move functions sequence
* Some improvements per @KN4CK3R and @delvh
2 years ago
Lunny Xiao
719bddcd76
Move repository model into models/repo ( #17933 )
...
* Some refactors related repository model
* Move more methods out of repository
* Move repository into models/repo
* Fix test
* Fix test
* some improvements
* Remove unnecessary function
3 years ago
wxiaoguang
750a8465f5
A better go code formatter, and now `make fmt` can run in Windows ( #17684 )
...
* go build / format tools
* re-format imports
3 years ago
wxiaoguang
81926d61db
Decouple unit test, remove intermediate `unittestbridge` package ( #17662 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
wxiaoguang
df64fa4865
Decouple unit test code from business code ( #17623 )
3 years ago
Lunny Xiao
5842a55b31
Move login related structs and functions to models/login ( #17093 )
...
* Move login related structs and functions to models/login
* Fix test
* Fix lint
* Fix lint
* Fix lint of windows
* Fix lint
* Fix test
* Fix test
* Only load necessary fixtures when preparing unit tests envs
* Fix lint
* Fix test
* Fix test
* Fix error log
* Fix error log
* Fix error log
* remove unnecessary change
* fix error log
* merge main branch
3 years ago
Lunny Xiao
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Lunny Xiao
3537d80088
Fix bug about ListOptions and stars/watchers pagnation ( #14556 )
...
* Fix bug about ListOptions and stars/watchers pagnation
* fix unit test
Co-authored-by: 6543 <6543@obermui.de>
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
Antoine GIRARD
2b6f45299d
api: fix multiple bugs with statuses endpoints ( #7785 )
...
* fix commit statuses api url
* search refs before passing sha
* adjust tests
* directly search tags and branches names + remove un-needed check in NewCommitStatus
* fix comment
* de-duplicate code
* test: use relative setting.AppURL
* Update routers/api/v1/repo/status.go
Co-Authored-By: Lauris BH <lauris@nix.lv>
* remove return
* Update routers/api/v1/repo/status.go
Co-Authored-By: Lauris BH <lauris@nix.lv>
5 years ago
zeripath
734aa96508
Fix #7136 : Add paging and extend API GetCommitStatuses ( #7141 )
...
* Fix #7136 : Add paging and extend API GetCommitStatuses
* update swagger
* Update routers/api/v1/repo/status.go
Co-Authored-By: techknowlogick <matti@mdranta.net>
* Update routers/api/v1/repo/status.go
Co-Authored-By: techknowlogick <matti@mdranta.net>
* Update routers/api/v1/repo/status.go
Co-Authored-By: techknowlogick <matti@mdranta.net>
* Apply suggestions from code review
5 years ago
Lunny Xiao
ff85dd3e12
Add commit statuses reports on pull request view ( #6845 )
...
* Add commit statuses reports on pull view
* Add some translations
* improve the UI
* fix fmt
* fix tests
* add a new test git repo to fix tests
* fix bug when headRepo or headBranch missing
* fix tests
* fix tests
* fix consistency
* fix tests
* fix tests
* change the test repo
* fix tests
* fix tests
* fix migration
* keep db size consistency
* fix translation
* change commit hash status table unique index
* remove unused table
* use char instead varchar
* make hashCommitStatusContext private
* split merge section with status check on pull view ui
* fix tests; fix arc-green theme on pull ui
5 years ago
Morlinest
8e61823ec4
Fix tests code to prevent some runtime errors ( #2381 )
...
* Fix tests code to prevent some runtime errors
* Reduce nesting
7 years ago
Kim "BKC" Carlbäcker
4bea219128
Status-API ( #1332 )
8 years ago