Daniel YC Lin
607ed27b4f
Fix document error about 'make trans-copy' ( #29710 )
...
Change document to 'make docs'
---------
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
11 months ago
Yarden Shoham
70e077036f
Remove jQuery AJAX from the diff functions ( #29743 )
...
- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the review conversation comment, resolve, unresolve, show more
files, and load diff functionality and it works as before
# Demo using `fetch` instead of jQuery AJAX

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
silverwind
35def319fd
Fix Safari spinner rendering ( #29801 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29041
Fixes: https://github.com/go-gitea/gitea/pull/29713
Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.
11 months ago
Yarden Shoham
0679e60c77
Remove jQuery AJAX from the `repo-issue.js` file ( #29776 )
...
Removed all jQuery AJAX calls and replaced with our fetch wrapper.
Tested the following functionalities and they work as before:
- due-date update
- comment deletion
- branch update by merge or rebase
- allow edits from maintainers button
- reviewer addition or deletion
- WIP toggle button
- new diff code comment button
- issue title edit button
# Demo using `fetch` instead of jQuery AJAX
## Updating the due-date of an issue

## Deleting a comment

## Updating a branch in a pull request

## Checking and unchecking the "Allow edits from maintainers" checkbox

## Requesting review and removing review request

## Toggling the WIP status of a pull request

## Clicking the new code comment button on the diff page

## Editing the issue title and target branch

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
yp05327
ce085b26fc
Improve commit record's ui in comment list ( #26619 )
...
Before:


After:


---------
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
Rafael Heard
03753cbc0f
enable tailwind nesting ( #29746 )
...
Currently, if you implement native CSS nesting within a Vue component a
warning will appear in the terminal. It states
`Nested CSS was detected, but CSS nesting has not been configured
correctly.
Please enable a CSS nesting plugin *before* Tailwind in your
configuration.` To fix this error we need to enable the built-in
[tailwinds nesting
config](https://tailwindcss.com/docs/using-with-preprocessors#nesting ).
Example code to trigger the warning within a vue component:
```CSS
<style>
.example {
&:hover,
&:focus-visible {
color: var(--color-text);
}
& svg {
margin-right: 0.78rem;
}
}
</style>
```
---------
Co-authored-by: rafh <rafaelheard@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
Jason Song
487ac9bf6c
Support GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT env ( #29788 )
...
It is convenient to skip by setting environment, since it's OK
to use root user in job containers.
It's not a bug, but I want to backport it to v1.21 since it doesn't
break anything.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months ago
Lunny Xiao
8d979f1692
Fix missing translation on milestons ( #29785 )
...
Caused by #26569
Fix #29778
11 months ago
sillyguodong
2033eb7c11
Fix lint-swagger warning ( #29787 )
...
Caused by: #23106
Fix:
https://github.com/go-gitea/gitea/actions/runs/8274650046/job/22640335697
1. Delete `UserBadgeList` in `options.go`, because it wasn't used. (The
struct defined in `options.go` is the struct used to parse the request
body)
2. Move `BadgeList` struct under `routers/api/v1/swagger` folder which
response should be defined in.
11 months ago
silverwind
eb8c34fc36
Tweak actions view sticky ( #29781 )
...
Add some space when the left side items are sticky due to scrolling the
right side.
<img width="419" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/292e1b03-a071-4744-bb79-e50d109056c8 ">
11 months ago
Denys Konovalov
7a90e5954f
add skip ci support for pull request title ( #29774 )
...
Extends #28075 to support [skip ci] inside PR titles.
Close #29265
11 months ago
coldWater
e79a807a84
Refactor markup/csv: don't read all to memory ( #29760 )
11 months ago
silverwind
bbef5fc5c3
Fix `make generate-swagger` in go 1.22 ( #29780 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29664 . No release
available for https://github.com/go-swagger/go-swagger/issues/3070 so
let's depend on latest commit hash. Output is the same as before for me.
11 months ago
yp05327
2da13675c0
Fix incorrect menu/link on webhook edit page ( #29709 )
...
Fix #29699
---------
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
wxiaoguang
43de021ac1
Add test for webhook ( #29755 )
...
Follow #29690
11 months ago
Lunny Xiao
83ba882bab
Fix possible NPE in ToPullReviewList ( #29759 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months ago
6543
712e19fa6f
fix missed RenderLabel change in card template ( #29772 )
...
regression of #29680
close #29770
PS: it would be nice to have a linter that is able to check template
helpers ...
11 months ago
wxiaoguang
df60dbfb99
Fix incorrect locale Tr for gpg command ( #29754 )
11 months ago
wxiaoguang
e01b0014de
Improve a11y document and dropdown item ( #29753 )
...
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
wxiaoguang
3e94ac5c7c
Improve QueryEscape helper function ( #29768 )
...
Make it return "template.URL" to follow Golang template's context
auto-escaping.
11 months ago
KN4CK3R
85c59d6c21
Use relative links for commits, mentions, and issues in markdown ( #29427 )
...
Fixes #29404
Use relative links for
- commits
- mentions
- issues
---------
Co-authored-by: silverwind <me@silverwind.io>
11 months ago
Lunny Xiao
66edc888ee
Move fork router functions to a standalone file ( #29756 )
...
To reduce the pull.go file's size.
11 months ago
silverwind
9b1a8888fa
Configure pinned JS dependencies via updates.config.js ( #29696 )
...
Split out from https://github.com/go-gitea/gitea/pull/29684 . This
configures the [`updates`](https://github.com/silverwind/updates ) module
to exclude these modules for reasons stated in the comments.
11 months ago
6543
7fd0a5b276
Refactor to use optional.Option for issue index search option ( #29739 )
...
Signed-off-by: 6543 <6543@obermui.de>
11 months ago
Lunny Xiao
67e9f0d498
Fix user router possbile panic ( #29751 )
...
regression from #28023
11 months ago
6543
9a93b1816e
Refactor label.IsArchived() ( #29750 )
...
just some missed nits
11 months ago
silverwind
857243bed7
Fix date rendering by adding `<gitea-absolute-date>` ( #29725 )
...
Alternative to: https://github.com/go-gitea/gitea/pull/29698
Fixes: https://github.com/go-gitea/gitea/issues/29034
<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba ">
It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:
<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66 ">
11 months ago
Denys Konovalov
225fc40528
Update to labeler v5 ( #29721 )
...
Updated to actions/labeler@v5
Updated labeler config accordingly, also improved the config and added
more labels.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
JakobDev
3e7ae79f99
Update Chroma to v2.13.0 ( #29732 )
...
This adds new lexers and includes some fixes. See
https://github.com/alecthomas/chroma/releases/tag/v2.13.0 for the full
changelog.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
6543
36de5b299b
Highlight archived labels ( #29680 )
...
the issue is, that you can not distinguish between normal and archived
labels.
So this will make archived labels 80% **grayscale**. And prepend
"Archived: " to the tooltip info




---
*Sponsored by Kithara Software GmbH*
---------
Co-authored-by: delvh <dev.lh@web.de>
11 months ago
Lunny Xiao
e5e2b2fcd7
Add more stats tables ( #29730 )
...
Add `Tags`, `Branches` and `CommitStatus` to monitor/stats
11 months ago
Lunny Xiao
171d3d9a3c
Use Get but not Post to get actions artifacts ( #29734 )
11 months ago
Lunny Xiao
d8bd6f34f0
Do some performance optimize for issues list and view issue/pull ( #29515 )
...
This PR do some performance optimzations.
- [x] Add `index` for the column `comment_id` of `Attachment` table to
accelerate query from the database.
- [x] Remove unnecessary database queries when viewing issues. Before
some conditions which id = 0 will be sent to the database
- [x] Remove duplicated load posters
- [x] Batch loading attachements, isread of comments on viewing issue
---------
Co-authored-by: Zettat123 <zettat123@gmail.com>
11 months ago
Lunny Xiao
aed3b53abd
Some performance optimization on dashboard and issues page ( #29010 )
...
This PR do some loading speed optimization for feeds user interface
pages.
- Load action users batchly but not one by one.
- Load action repositories batchly but not one by one.
- Load action's Repo Owners batchly but not one by one.
- Load action's possible issues batchly but not one by one.
- Load action's possible comments batchly but not one by one.
11 months ago
Yarden Shoham
75a9f61f89
Remove jQuery AJAX from the issue branch reference selection ( #29722 )
...
- Replaced a single jQuery AJAX instance with our fetch wrapper
- Tested the issue branch reference selection and it works as before
# Demo using `fetch` instead of jQuery AJAX

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
11 months ago
Lunny Xiao
e84e5db6de
Lazy load object format with command line and don't do it in OpenRepository ( #29712 )
...
Most time, when invoking `git.OpenRepository`, `objectFormat` will not
be used, so it's a waste to invoke commandline to get the object format.
This PR make it a lazy operation, only invoke that when necessary.
11 months ago
pengqiseven
7f856d5d74
remove repetitive words ( #29695 )
...
Signed-off-by: pengqiseven <912170095@qq.com>
11 months ago
Jason Song
e6d141182f
Sync branches first ( #29714 )
...
Follow #29493 .
Sync branches to DB first, then trigger push events.
11 months ago
Zettat123
4129e0e79b
Add a warning for disallowed email domains ( #29658 )
...
Resolve #29660
Follow #29522 and #29609
Add a warning for disallowed email domains when admins manually add/edit
users.
Thanks @yp05327 for the
[comment](https://github.com/go-gitea/gitea/pull/29605#issuecomment-1980105119 )

11 months ago
yp05327
8fc1a8f0eb
Fix inconsistent rendering of block mathematical expressions ( #29677 )
...
Fix #28735
GitHub render `\```math\``` ` as a block now.
Add `display` class will render it as a block.
After:


---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months ago
Lunny Xiao
3c6fc25a77
Use repo object format name instead of detecting from git repository ( #29702 )
...
It's unnecessary to detect the repository object format from git
repository. Just use the repository's object format name.
12 months ago
silverwind
851bd18234
Improve CSV rendering ( #29638 )
...
Before:
<img width="1332" alt="Screenshot 2024-03-06 at 21 42 17"
src="https://github.com/go-gitea/gitea/assets/115237/0ea07eee-31f8-4783-bd56-37bd8396f00d ">
After:
<img width="1336" alt="Screenshot 2024-03-06 at 21 41 58"
src="https://github.com/go-gitea/gitea/assets/115237/eb7f9cc9-587f-4e3b-92bd-cc67ca639963 ">
12 months ago
Yarden Shoham
b5ed42864e
Remove jQuery AJAX from the comment edit history ( #29703 )
...
- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the comment edit history list, diff, and delete functionality
and it works as before
# Demo using `fetch` instead of jQuery AJAX

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
12 months ago
Ankit R Gadiya
5665a0212b
fix: rendering internal file links in org ( #29669 )
...
The internal links to other files in the repository were not rendering
with the Src Prefix (/src/branch-name/file-path). This commit fixes that
by using the `SrcLink` as base if available.
Resolves #29668
12 months ago
Lunny Xiao
6e8762f962
Fix broken webhooks ( #29690 )
...
Fix #29689
12 months ago
silverwind
9bf693d98d
Suppress error from monaco-editor ( #29684 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29414
I see no way for us to catch this error, so downgrade it until
https://github.com/microsoft/monaco-editor/issues/4325 is fixed, which
will likely take a few weeks to propagate up from vscode.
The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates ) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.
12 months ago
Chongyi Zheng
a192a5ed99
Fix action runner offline label padding ( #29691 )
...
Before:
The `offline` padding is `calc(.833em - 1px)` from `basic` CSS class,
but `idle` padding is `6px`.
<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/ccb42615-20d7-4032-a805-40cd9643012d ">
After:
<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/d6af99c8-76cb-4850-96d6-5289b06e1ca8 ">
12 months ago
silverwind
6ea1c67ead
Update allowed attachment types ( #29688 )
...
Update to match GitHub's latest.
Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago
silverwind
9b69f76e5a
Completely style the webkit autofill ( #29683 )
...
Previously it was only partially styled, e.g. there was black text on
white background even in dark theme caused by fomantic styles.
<img width="195" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/bc5cf516-2aef-45c3-854a-c9f5497aacca ">
<img width="195" alt="Screenshot 2024-03-09 at 02 09 29"
src="https://github.com/go-gitea/gitea/assets/115237/ef0af17d-6e0b-402e-b24d-bfa34dc2f4e0 ">
Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago
silverwind
1695a5ac74
Include go files in tailwind processing ( #29686 )
...
We need to scan `.go` files for tailwind classes. Does not seem to
affect build time much luckily.
Fixes:
https://github.com/go-gitea/gitea/pull/29678#discussion_r1518448600
Verified via `rg tw-object-contain public/assets/css/index.css`.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago