Zettat123
79217ea63c
Fix error display when merging PRs ( #29288 )
...
Partially fix #29071 , regression of Modernize merge button #28140
Fix some missing `Redirect` -> `JSONRedirect`.
Thanks @yp05327 for the help in
https://github.com/go-gitea/gitea/issues/29071#issuecomment-1931261075
9 months ago
wxiaoguang
6130522aa8
Refactor markup rendering to accept general "protocol:" prefix ( #29276 )
...
Follow #29024
Major changes:
* refactor validLinksPattern to fullURLPattern and add comments, now it
accepts "protocol:" prefix
* rename `IsLink*` to `IsFullURL*`, and remove unnecessray "mailto:"
check
* fix some comments (by the way)
* rename EmojiShortCodeRegex -> emojiShortCodeRegex (by the way)
9 months ago
Yarden Shoham
4e536edaea
Remove jQuery from the installation page ( #29284 )
...
- Switched to plain JavaScript
- Tested the installation page functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/286475b3-1919-4d99-b790-def10fa36e66 )
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
wxiaoguang
7f45dfb030
Always write proc-receive hook for all git versions ( #29287 )
9 months ago
Jason Song
22b8de85dd
Do not use `ctx.Doer` when reset password ( #29289 )
...
Fix #29278 .
Caused by a small typo in #28733
9 months ago
DC
3d3c3d9ee5
Update Discord logo ( #29285 )
...
Fixes #27057 by changing the discord .svg file and running `make svg`.
Before:
<img width="637"
src="https://private-user-images.githubusercontent.com/85847352/267667100-1eaf5d20-b4e9-4736-bb55-7f1da04bbde7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg0NzAwNDUsIm5iZiI6MTcwODQ2OTc0NSwicGF0aCI6Ii84NTg0NzM1Mi8yNjc2NjcxMDAtMWVhZjVkMjAtYjRlOS00NzM2LWJiNTUtN2YxZGEwNGJiZGU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjIwVDIyNTU0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwN2Y2ODc5N2MzZDU5NzgzODRhNDIzZWY3MDk3ODhiYmIzZDU4NWVlYmFmZjc2OTIyZjE3MWM4ZDg0ODZjNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.C6jVQLFPfq4fhGV8wiY9D-P21PUNTDMkX2d2-kU17Ug ">
After:
<img width="637"
src="https://github.com/go-gitea/gitea/assets/106393991/45b197ae-e422-42f4-999e-25dc8f6b7a92 ">
9 months ago
GiteaBot
69dbfbe4e5
[skip ci] Updated translations via Crowdin
9 months ago
silverwind
a5c570c1e0
Remove jQuery .map() and enable eslint rules for it ( #29272 )
...
- Use case in `repo-commit` was tested until the point where the POST
request was sent with the same payload.
- Use case in `repo-legacy` was tested completely with comment editing.
- `jquery/no-fade` was disabled as well to stay in sync with
`no-jquery/no-fade`, had no violations.
9 months ago
6543
3f73eabb66
Explained where create issue/PR template ( #29035 ) ( #29266 )
...
For some user (as me), documentation lack of precision about where to
store issue/pr template.
I propose an enhancement about this point. With bold exergue and
precision about server itself.
I've found some user with same interrogation as :
https://forum.gitea.com/t/issue-template-directory/3328
---------
Co-authored-by: Km <cam.lafit@azerttyu.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
9 months ago
Yarden Shoham
ade1110e8b
Remove jQuery from repo wiki creation page ( #29271 )
...
- Switched to plain JavaScript
- Tested the wiki creation form functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/2dfc95fd-40cc-4ffb-9ae6-50f798fddd67 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
9 months ago
Zettat123
8c21bc0d51
Do not show delete button when time tracker is disabled ( #29257 )
...
Fix #29233
The delete button of time logs won't be shown when the time tracker is disabled.
![image](https://github.com/go-gitea/gitea/assets/15528715/5cc4e0c9-d2f9-4b8f-a2f5-fe202b94c191 )
9 months ago
Rafael Heard
e4e5d76932
Left align the input labels for the link account page ( #29255 )
...
In a previous [PR](https://github.com/go-gitea/gitea/pull/28753 ) we
moved the labels to be above the inputs. The PR ensures that the
alignment is also on both tabs of the link account page
(`/user/link_account`).
Before
<img width="1094" alt="before"
src="https://github.com/go-gitea/gitea/assets/6152817/ac1e86bd-c4d6-4e45-87d1-87bb8a736149 ">
After
<img width="1094" alt="after"
src="https://github.com/go-gitea/gitea/assets/6152817/1b5fc109-f4d2-43ee-b924-0a9e53a0e391 ">
---------
Co-authored-by: rafh <rafaelheard@gmail.com>
9 months ago
GiteaBot
d926836947
[skip ci] Updated translations via Crowdin
9 months ago
Yarden Shoham
100031f5f1
Remove jQuery from the repo migration form ( #29229 )
...
- Switched to plain JavaScript
- Tested the repo migration form functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/3496ec05-48a7-449e-8cdd-f8372ba0d589 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
9 months ago
vincent
35d5e4aea4
Fix content size does not match error when uploading lfs file ( #29259 )
...
![image](https://github.com/go-gitea/gitea/assets/38434877/cd726b4d-4771-4547-8aee-ae4e4b56b1d1 )
When we update an lfs file by API
`api/v1/repos/{owner}/{repo}/contents/{filepath}`, there will show an
error
```json
{
"message": "Put \"05904d6c7b
16bb9b29587100ab1414\": readfrom tcp [::1]:57300->[::1]:9000: content size does not match",
"url": "http://localhost:3000/api/swagger "
}
```
The reason of this error is
https://github.com/go-gitea/gitea/blob/main/services/repository/files/update.go ,
in this file, the `file.ContentReader` been used twice. So when use
`file.ContentReader` in the second time, the `i` of this Reader has been
updated to the length of the content. it will return 0 and an `io.EOF`
error when we try to read cotent from this Reader.
9 months ago
6543
217d71c48a
Workaround to clean up old reviews on creating a new one ( #28554 )
...
close #28542
blocks #28544
---
*Sponsored by Kithara Software GmbH*
9 months ago
Şahin Akkaya
39a77d92d9
Deduplicate translations for contributors graph ( #29256 )
...
I have implemented three graph pages
([contributors](https://github.com/go-gitea/gitea/pull/27882 ), [code
frequency](https://github.com/go-gitea/gitea/pull/29191 ) and [recent
commits](https://github.com/go-gitea/gitea/pull/29210 )) and they have
all same page title as the tab name so I decided to use same
translations for them. This PR is for contributors graph. Other PR's
have their own respective commits.
9 months ago
wxiaoguang
567a68a0bf
Remove DataRaceCheck ( #29258 )
...
Since #26254 , it started using `{{ctx.Locale.Tr ...}}`
Now the `ctx` seems stable enough, so the check could be removed.
9 months ago
Johan Van de Wauw
740c6a226c
Fix c/p error in inline documentation ( #29148 )
...
Fix small copy/paste error in inline documentation
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago
KN4CK3R
7e8ff70940
Show commit status for releases ( #29149 )
...
Fixes #29082
![grafik](https://github.com/go-gitea/gitea/assets/1666336/bb2ccde1-ee99-459d-9e74-0fb8ea79e8b3 )
9 months ago
Markus Amshove
a11ccc9fcd
Disallow merge when required checked are missing ( #29143 )
...
fixes #21892
This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.
Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.
Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else
Given the following branch protection:
![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec )
This was shown before the change:
![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612 )
With the change, it is now shown as this:
![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d )
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago
Jason Song
0ea8de2d07
Do not use lower tag names to find releases/tags ( #29261 )
...
Fix #26090 , see
https://github.com/go-gitea/gitea/issues/26090#issuecomment-1952013206
Since `TagName` stores the original tag name and `LowerTagName` stores
the lower tag name, it doesn't make sense to use lowercase tags as
`TagNames` in `FindReleasesOptions`.
5e72526da4/services/repository/push.go (L396-L397)
While the only other usage looks correct:
5e72526da4/routers/web/repo/repo.go (L416)
9 months ago
silverwind
5e72526da4
Downscale pasted PNG images based on metadata ( #29123 )
...
Some images like MacOS screenshots contain
[pHYs](http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.8 )
data which we can use to downscale uploaded images so they render in the
same dppx ratio in which they were taken.
Before:
<img width="584" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/50979e3a-5d5a-40dc-a0a4-36eb6e28f14a ">
After:
<img width="329" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/0690902a-f2fe-4c6b-97b3-6fdd67c21bad ">
9 months ago
GiteaBot
f04e71f9bc
[skip ci] Updated licenses and gitignores
9 months ago
Şahin Akkaya
20f6a7c484
De-duplicate contributor graph translations ( #29247 )
9 months ago
wxiaoguang
8be198cdef
Use general token signing secret ( #29205 )
...
Use a clearly defined "signing secret" for token signing.
9 months ago
Lunny Xiao
c2a8aacae5
Fix missed edit issues event for actions ( #29237 )
...
Fix #29213
9 months ago
silverwind
39f8ab591c
Clean up diff header css and reduce global textarea min-height ( #29232 )
...
1. Tweak diff header and remove a numbe of unneeded CSS for it:
Before:
<img width="433" alt="Screenshot 2024-02-18 at 01 08 09"
src="https://github.com/go-gitea/gitea/assets/115237/d8b377c0-57bc-44d5-bb57-a582c7d4b3b4 ">
After:
<img width="463" alt="Screenshot 2024-02-18 at 01 07 56"
src="https://github.com/go-gitea/gitea/assets/115237/d08c17e7-5b86-4d07-81da-6371f4754325 ">
3. Reduce height of review textarea and also reduce fomantic's CSS from
12em to 8em. Now fits better on my screen:
<img width="1352" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/5c658d13-295e-4929-94da-13ade888020d ">
---------
Co-authored-by: delvh <dev.lh@web.de>
9 months ago
FuXiaoHei
68e1d17a5f
Expire artifacts before deleting them physically ( #29241 )
...
https://github.com/go-gitea/gitea/pull/27172#discussion_r1493735466
When cleanup artifacts, it removes storage first. If storage is not
exist (maybe delete manually), it gets error and continue loop. It makes
a dead loop if there are a lot pending but non-existing artifacts.
Now it updates db record at first to avoid keep a lot of pending status
artifacts.
9 months ago
wxiaoguang
4345cac529
Improve TrHTML and add more tests ( #29228 )
...
Follow #29165 .
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
9 months ago
Tim-Nicas Oelschläger
6093f507fe
Convert visibility to number ( #29226 )
...
Don't throw error while creating user (Fixes #29218 )
9 months ago
yp05327
1a6e1cbada
Implement some action notifier functions ( #29173 )
...
Fix #29166
Add support for the following activity types of `pull_request`
- assigned
- unassigned
- review_requested
- review_request_removed
- milestoned
- demilestoned
9 months ago
FuXiaoHei
67adc5c1dc
Artifact deletion in actions ui ( #27172 )
...
Add deletion link in runs view page.
Fix #26315
![image](https://github.com/go-gitea/gitea/assets/2142787/aa65a4ab-f434-4deb-b953-21e63c212033 )
When click deletion button. It marks this artifact `need-delete`.
This artifact would be deleted when actions cleanup cron task.
9 months ago
zhangnew
7430eb9e7f
Update docs for actions variables ( #29239 )
...
the variables is supported, see
a784ed3d6c/docs/content/usage/actions/act-runner.zh-cn.md
?plain=1#L262-L289
9 months ago
wxiaoguang
31bb9f3247
Refactor more code in templates ( #29236 )
...
Follow #29165 .
* Introduce JSONTemplate to help to render JSON templates
* Introduce JSEscapeSafe for templates. Now only use `{{ ... |
JSEscape}}` instead of `{{ ... | JSEscape | Safe}}`
* Simplify "UserLocationMapURL" useage
9 months ago
wxiaoguang
a784ed3d6c
Use "Safe" modifier for manually constructed safe HTML strings in templates ( #29227 )
...
Follow #29165 . These HTML strings are safe to be rendered directly, to
avoid double-escaping.
9 months ago
Yarden Shoham
d73223bfc6
Remove jQuery from the repo release form ( #29225 )
...
- Switched to plain JavaScript
- Tested the repo release form functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/ede2072a-823d-418f-9890-a5a7445a1cc6 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago
wxiaoguang
658cbddbfb
Make submit event code work with both jQuery event and native event ( #29223 )
...
Partially related to #29200 and fix other potential bugs.
Co-authored-by: Giteabot <teabot@gitea.io>
9 months ago
Yarden Shoham
5e1bf3efe2
Remove jQuery from repo migrate page ( #29219 )
...
- Switched to plain JavaScript
- Tested the repo migrate functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/44ad134b-832e-44b8-8e77-7cc8603d95fe )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
9 months ago
Yarden Shoham
3da2c63354
Remove unneccesary `initUserAuthLinkAccountView` from "link account" page ( #29217 )
...
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago
Yarden Shoham
1d275c1748
Fix labels referencing the wrong ID in the user profile settings ( #29199 )
...
2 instances of `for` with a wrong value and 1 `for` that had a reference
to a `name` instead of `id`.
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
Yarden Shoham
0157db84b1
Fix label `for` pointing to a `name` instead of `id` in webhook settings ( #29209 )
...
Here's the spec for the `for` attribute:
https://html.spec.whatwg.org/multipage/forms.html#attr-label-for
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
Jimmy Praet
22b9c2c95c
Load outdated comments when (un)resolving conversation on PR timeline ( #29203 )
...
Relates to #28654 , #29039 and #29050 .
The "show outdated comments" flag should only apply to the file diff
view.
On the PR timeline, outdated comments are always shown.
So they should also be loaded when (un)resolving a conversation on the
timeline page.
9 months ago
Yarden Shoham
aa6f88638f
Fix missing template for follow button in organization ( #29215 )
...
Leftover from https://github.com/go-gitea/gitea/pull/29005
# Before
![before](https://github.com/go-gitea/gitea/assets/20454870/24c74278-ccac-4dc6-bf26-713e90c07239 )
# After
![after](https://github.com/go-gitea/gitea/assets/20454870/f91d503b-87d4-4c17-a56c-9c0a81fd9082 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
silverwind
b96fbb567c
Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` ( #29214 )
...
Enable these two and fix issues.
9 months ago
Yarden Shoham
27192bc321
Remove jQuery from the webhook editor ( #29211 )
...
- Switched to plain JavaScript
- Tested the webhook editing functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/b24c264d-d5e5-4954-8789-e72564a99027 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months ago
Yarden Shoham
c282d378bd
Remove jQuery from issue reference context popup attach ( #29216 )
...
- Switched to plain JavaScript
- Tested the context popup functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/1d2f173e-e626-4f7d-82c8-d1539d38d247 )
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
xkcdstickfigure
cb85ebc3ef
fix typo ( #29212 )
9 months ago
Robin Schoonover
33400a02d4
Fix debian InRelease Acquire-By-Hash newline ( #29204 )
...
There is a missing newline when generating the debian apt repo InRelease
file, which results in output like:
```
[...]
Date: Wed, 14 Feb 2024 05:03:01 UTC
Acquire-By-Hash: yesMD5Sum:
51a518dbddcd569ac3e0cebf330c800a 3018 main-dev/binary-amd64/Packages
[...]
```
It appears this would probably result in apt ignoring the
Acquire-By-Hash setting and not using the by-hash functionality,
although I'm not sure how to confirm it.
9 months ago
yp05327
68227996a7
Fix broken following organization ( #29005 )
...
- following organization is broken from #28908
- add login check for the follow button in organization profile page
9 months ago