07c6087878
Fix team permission ( #34128 )
...
The `team.access_mode` should be either `none` or `admin/owner`.
For non-admin team, the real permissions are provided by `team_unit`.
2025-04-08 04:15:15 +00:00
ee3c82f874
Enable addtional linters ( #34085 )
...
enable mirror, usestdlibbars and perfsprint
part of: https://github.com/go-gitea/gitea/issues/34083
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-04-01 10:14:01 +00:00
67aeb1f896
Add missed transaction on setmerged ( #33079 )
...
Follow #33045 . There are two updates on `Set Merged`, which should be in
one transaction.
This also introduced some refactors for changeissuestatus to make it
more clear.
2025-01-08 03:16:56 +00:00
fe32ffe181
Merge updatecommentattachment functions ( #33044 )
...
Extract from #32178
2024-12-30 18:21:57 +00:00
d45456b1b5
Move SetMerged to service layer ( #33045 )
...
No code change.
Extract from #32178
2024-12-30 07:04:03 +00:00
9bfa9f450d
Refactor "string truncate" ( #32984 )
2024-12-26 11:56:03 +08:00
5feb1a6bff
Use CloseIssue
and ReopenIssue
instead of ChangeStatus
( #32467 )
...
The behaviors of closing issues and reopening issues are very different.
So splitting it into two different functions makes it easier to
maintain.
- [x] Split ChangeIssueStatus into CloseIssue and ReopenIssue both at
the service layer and model layer
- [x] Rename `isClosed` to `CloseOrReopen` to make it more readable.
- [x] Add transactions for ReopenIssue and CloseIssue
---------
Co-authored-by: Zettat123 <zettat123@gmail.com >
2024-12-25 07:38:30 +00:00
98d9a71ffe
Trim title before insert/update to database to match the size requirements of database ( #32498 )
...
Fix #32489
2024-11-14 07:19:14 +00:00
aa92b13164
Prevent simultaneous editing of comments and issues ( #31053 )
...
fixes #22907
Tested:
- [x] issue content edit
- [x] issue content change tasklist
- [x] pull request content edit
- [x] pull request change tasklist

2024-05-27 15:34:18 +00:00
a50026e2f3
Fix no edit history after editing issue's title and content ( #30814 )
...
Fix #30807
reuse functions in services
2024-05-03 14:11:51 +08:00
c337ff0ec7
Add user blocking ( #29028 )
...
Fixes #17453
This PR adds the abbility to block a user from a personal account or
organization to restrict how the blocked user can interact with the
blocker. The docs explain what's the consequence of blocking a user.
Screenshots:



---------
Co-authored-by: Lauris BH <lauris@nix.lv >
2024-03-04 08:16:03 +00:00
08507e2760
Don't use subselect in DeleteIssuesByRepoID
( #27332 )
...
Part of https://codeberg.org/forgejo/discussions/issues/61
This is workaround for a bug in MariaDB
2023-10-03 08:17:28 +00:00
cb68e01e22
simplify issue deletion query ( #27312 )
...
- There's no need for `In` to be used, as it's a single parameter that's
being passed.
Refs: https://codeberg.org/forgejo/forgejo/pulls/1521
(cherry picked from commit 4a4955f43ae7fc50cfe3b48409a0a10c82625a19)
Co-authored-by: Gusted <postmaster@gusted.xyz >
2023-10-02 02:30:10 +00:00
cf0df023be
More db.DefaultContext
refactor ( #27265 )
...
Part of #27065
This PR touches functions used in templates. As templates are not static
typed, errors are harder to find, but I hope I catch it all. I think
some tests from other persons do not hurt.
2023-09-29 12:12:54 +00:00
887a683af9
Update tool dependencies, lock govulncheck and actionlint ( #25655 )
...
- Update all tool dependencies
- Lock `govulncheck` and `actionlint` to their latest tags
---------
Co-authored-by: 6543 <m.huber@kithara.com >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-07-09 11:58:06 +00:00
88f835192d
Replace interface{}
with any
( #25686 )
...
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.
Basically the same [as golang did](2580d0e08d
).
2023-07-04 18:36:08 +00:00
38cf43d060
Some refactors for issues stats ( #24793 )
...
This PR
- [x] Move some functions from `issues.go` to `issue_stats.go` and
`issue_label.go`
- [x] Remove duplicated issue options `UserIssueStatsOption` to keep
only one `IssuesOptions`
2023-05-19 22:17:48 +08:00
09ab64dfad
Remove duplicated issues options and some more refactors ( #24787 )
...
This PR
- [x] Move some code from `issue.go` to `issue_search.go` and
`issue_update.go`
- [x] Use `IssuesOptions` instead of `IssueStatsOptions` becuase they
are too similiar.
- [x] Rename some functions
2023-05-18 10:45:25 +00:00