Commit Graph

75 Commits (f979569a3d45ba8e1a49c7c4e81774a8874cf8cf)

Author SHA1 Message Date
Tyrone Yeh 8e3da0e27f
Modify milestone search keywords to be case insensitive again ()
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
aceArt-GmbH ed6cd3cbb7
Display project in issue list ()
Co-authored-by: lukas <lukas.walter@aceart.de>
6543 c0f5111fea
Dismiss prior pull reviews if done via web in review dismiss ()
Tyrone Yeh 931c02d152
Add order by for assignee no sort issue ()
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Tyrone Yeh 715042c5bb
Fix org label open count, including close count issue ()
Fixed using organization tags to see open issues in the tag list including closed issues count
Ing. Jaroslav Šafka 8420c1bf4c
Fix checks in PR for empty commits ()
* Fixes issue  (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in 
luzpaz d29d6d1991
Fix various typos ()
* Fix various typos

Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon`

Co-authored-by: zeripath <art27@cantab.net>
Tyrone Yeh 970288f0b2
Modify milestone search keywords to be case insensitive ()
Milestone search keywords are now sensitive, this modification is changed to insensitive
Lunny Xiao 184a7d4195
Check if project has the same repository id with issue when assign project to issue ()
* Check if project has the same repository id with issue when assign project to issue

* Check if issue's repository id match project's repository id

* Add more permission checking

* Remove invalid argument

* Fix errors

* Add generic check

* Remove duplicated check

* Return error + add check for new issues

* Apply suggestions from code review

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: 6543 <6543@obermui.de>
Wim cb50375e2b
Add more linters to improve code readability ()
Add nakedret, unconvert, wastedassign, stylecheck and nolintlint linters to improve code readability

- nakedret - https://github.com/alexkohler/nakedret - nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
- unconvert - https://github.com/mdempsky/unconvert - Remove unnecessary type conversions
- wastedassign - https://github.com/sanposhiho/wastedassign -  wastedassign finds wasted assignment statements.
- notlintlint -  Reports ill-formed or insufficient nolint directives
- stylecheck - https://staticcheck.io/docs/checks/#ST - keep style consistent
  - excluded: [ST1003 - Poorly chosen identifier](https://staticcheck.io/docs/checks/#ST1003) and [ST1005 - Incorrectly formatted error string](https://staticcheck.io/docs/checks/#ST1005)
zeripath 5d80feb5a6
Fix CountOrphanedLabels in orphan check ()
gitea doctor --run check-db-consistency is currently broken due to an incorrect
and old use of Count() with a string.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Hugo Hoitink 6473bd333a
In code search, get code unit accessible repos in one (main) query ()
* When non-admin users use code search, get code unit accessible repos in one main query

* Modified some comments to match the changes

* Removed unnecessary check for Access Mode in Collaboration table

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Lunny Xiao d91d4db344
Move tests as seperate sub packages to reduce duplicated file names ()
Lunny Xiao 1a9821f57a
Move issues related files into models/issues ()
* Move access and repo permission to models/perm/access

* fix test

* fix git test

* Move functions sequence

* Some improvements per @KN4CK3R and @delvh

* Move issues related code to models/issues

* Move some issues related sub package

* Merge

* Fix test

* Fix test

* Fix test

* Fix test

* Rename some files
Lunny Xiao fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ()
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
Lunny Xiao b8911fb456
Use a struct as test options ()
* Use a struct as test options

* Fix name

* Fix test
Lunny Xiao 1dfa26e00e
Move milestone to models/issues/ ()
* Move milestone to models/issues/

* Fix lint

* Fix test

* Fix lint

* Fix lint
Lunny Xiao d4f84f1c93
Move reaction to models/issues/ ()
* Move reaction to models/issues/

* Fix test

* move the function

* improve code

* Update models/issues/reaction.go

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Wim a387636b9a
Show fullname on issue edits and gpg/ssh signing info ()
Show missing full names when configured to do so

Co-authored-by: zeripath <art27@cantab.net>
6543 54e9ee37a7
format with gofumpt ()
* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
Gusted ff2fd08228
Simplify parameter types ()
Remove repeated type declarations in function definitions.
Jimmy Praet a3efd048a7
Improvements to content history ()
* Improvements to content history

* initialize content history when making an edit to an old item created before the introduction of content history
* show edit history for code comments on pull request files tab

* Fix a flaw in keepLimitedContentHistory
Fix a flaw in keepLimitedContentHistory, the first and the last should never be deleted

* Remove obsolete eager initialization of content history
wxiaoguang df64fa4865
Decouple unit test code from business code ()
Lunny Xiao f3c7f10c9f
Fix history count failure ()
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang c5c88f2f18
Save and view issue/comment content history ()
* issue content history

* Use timeutil.TimeStampNow() for content history time instead of issue/comment.UpdatedUnix (which are not updated in time)

* i18n for frontend

* refactor

* clean up

* fix refactor

* re-format

* temp refactor

* follow db refactor

* rename IssueContentHistory to ContentHistory, remove empty model tags

* fix html

* use avatar refactor to generate avatar url

* add unit test, keep at most 20 history revisions.

* re-format

* syntax nit

* Add issue content history table

* Update models/migrations/v197.go

Co-authored-by: 6543 <6543@obermui.de>

* fix merge

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>