4de5cd9f36
Return empty url for submodule tree entries ( #23043 )
...
Close #22614 .
Refer to [Github's
API](https://docs.github.com/en/rest/git/trees?apiVersion=2022-11-28#get-a-tree ),
if a tree entry is a submodule, its url will be an empty string.
---------
Co-authored-by: delvh <leon@kske.dev >
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2023-02-21 12:31:17 -05:00
Zettat123 and GitHub
7f790c70b9
Remove delete button for review comment ( #23036 )
...
Fix #23031 .
Currently, only comments with type `CommentTypeComment` or
`CommentTypeCode` can be deleted. If user create a review comment, the
type of the comment will be `CommentTypeReview` so the comment cannot be
deleted.
https://github.com/go-gitea/gitea/blob/e7be610d5773e69abbfb98d19e23112dfad6dfcc/routers/web/repo/issue.go#L2860-L2868
And in Github, user also cannot delete a review comment. There isn't a
delete button in the menu.
<img
src="https://user-images.githubusercontent.com/15528715/220275166-5ae2dc10-4003-4857-b14e-d7b02644345f.png "
width="640px" />
So we should remove the delete button from the menu when the comment's
type is `CommentTypeReview`.
2023-02-21 16:25:47 +08:00
9a83aa28a3
Get rules by id when editing branch protection rule ( #22932 )
...
When users rename an existing branch protection rule, a new rule with
the new name will be created and the old rule will still exist.

---

The reason is that the `SettingsProtectedBranchPost` function only get
branch protection rule by name before updating or creating a rule. When
the rule name changes, the function cannot find the existing rule so it
will create a new rule rather than update the existing rule. To fix the
bug, the function should get rule by id first.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-20 19:30:41 +08:00
1d64eafe8f
Add me to maintainers ( #22998 )
...
Add me to maintainers.
[List of merged
PRs](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3AZettat123+is%3Amerged )
Co-authored-by: Jason Song <i@wolfogre.com >
2023-02-20 16:42:02 +08:00
65fc2d1b83
Fix avatar misalignment ( #22955 )
...
Fix #22818 .
| Before | After |
| ---- | ---- |
| <img
src="https://user-images.githubusercontent.com/15528715/219617504-d86e7a90-d4ac-4a92-bd8a-100dddc693d5.png "
width="200px" /> | <img
src="https://user-images.githubusercontent.com/15528715/219618645-a4045f65-bda6-49ce-a676-f03a9817bb70.png "
width="200px" />|
| <img
src="https://user-images.githubusercontent.com/15528715/219618013-844ef208-853b-44bd-a67c-36e360f0ffa7.png "
width="200px" /> | <img
src="https://user-images.githubusercontent.com/15528715/219618361-cb13c369-852e-47bf-ae30-e429d348823d.png "
width="200px" /> |
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-20 07:07:46 +08:00
5a12e95d2a
Fix 404 error viewing the LFS file ( #22945 )
...
Fix #22734 .
According to
[`view_file.tmpl`](https://github.com/go-gitea/gitea/blob/main/templates/repo/view_file.tmpl#L82 ),
`lfs_file.tmpl` should use `AssetUrlPrefix` instead of `AppSubUrl`.
Co-authored-by: Jason Song <i@wolfogre.com >
2023-02-17 11:55:33 +08:00
0ab22a1a02
fix incorrect role labels for migrated issues and comments ( #22914 )
...
Fix #22797 .
## Reason
If a comment was migrated from other platforms, this comment may have an
original author and its poster is always not the original author. When
the `roleDescriptor` func get the poster's role descriptor for a
comment, it does not check if the comment has an original author. So the
migrated comments' original authors might be marked as incorrect roles.
---------
Co-authored-by: zeripath <art27@cantab.net >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-15 12:29:13 -05:00
Zettat123 and GitHub
71ee488098
Fix dark-colored description text in arc-green theme ( #22908 )
...
Fix #22873 .
2023-02-14 13:05:19 -06:00