TheFox0x7
4de909747b
Add testifylint to lint checks ( #4535 )
...
go-require lint is ignored for now
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-07-30 19:41:10 +00:00
Gusted
1bae2430c0
[GITEA] Fix NPE in `ToPullReviewList`
...
- Add condition to ensure doer isn't nil when using it.
- Added unit test.
- Resolves #2055
(cherry picked from commit 8f1a74fb29
)
(cherry picked from commit 60ac881776
)
(cherry picked from commit 5fdc461ac5
)
(cherry picked from commit 70623e8da1
)
(cherry picked from commit 1d5153aaf6
)
(cherry picked from commit 3927f0c8b2
)
2024-02-05 16:09:42 +01:00
Jason Song
174213530d
Fix `Permission` in API returned repository struct ( #25388 )
...
The old code generates `structs.Repository.Permissions` with only
`access.Permission.AccessMode`, however, it should check the units too,
or the value could be incorrect. For example,
`structs.Repository.Permissions.Push` could be false even the doer has
write access to code unit.
Should fix
https://github.com/renovatebot/renovate/issues/14059#issuecomment-1047961128
(Not reported by it, I just found it when I was looking into this bug)
---
Review tips:
The major changes are
- `modules/structs/repo.go`
https://github.com/go-gitea/gitea/pull/25388/files#diff-870406f6857117f8b03611c43fca0ab9ed6d6e76a2d0069a7c1f17e8fa9092f7
- `services/convert/repository.go`
https://github.com/go-gitea/gitea/pull/25388/files#diff-7736f6d2ae894c9edb7729a80ab89aa183b888a26a811a0c1fdebd18726a7101
And other changes are passive.
2023-06-22 13:08:08 +00:00
KN4CK3R
a35749893b
Move `convert` package to services ( #22264 )
...
Addition to #22256
The `convert` package relies heavily on different models which is
[disallowed by our definition of
modules](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#design-guideline ).
This helps to prevent possible import cycles.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-12-29 10:57:15 +08:00