aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Set "type=button" for editor's toolbar buttons (#26510) (#26518)Giteabot2023-08-151-0/+2
| | | | | | | | Backport #26510 by @wxiaoguang The editor usually is in a form, so the buttons should have "type=button", avoid conflicting with the form's submit. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Detect ogg mime-type as audio or video (#26494) (#26505)Giteabot2023-08-152-1/+25
| | | | | | | | | | | | | Backport #26494 by @wxiaoguang "ogg" is just a "container" format for audio and video. Golang's `DetectContentType` only reports "application/ogg" for potential ogg files. Actually it could do more "guess" to see whether it is a audio file or a video file. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use `object-fit: contain` for oauth2 custom icons (#26493) (#26498)Giteabot2023-08-141-1/+1
| | | | | | | Backport #26493 by @wxiaoguang It works for various sizes. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move dropzone progress bar to bottom to show filename when uploading ↵Giteabot2023-08-141-0/+6
| | | | | | | | | | (#26492) (#26497) Backport #26492 by @wxiaoguang 1. Make the "filename" visible 2. Avoiding UI flicker when the uploading is completing Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix storage path logic especially for relative paths (#26441) (#26481)Giteabot2023-08-132-93/+294
| | | | | | | | | | Backport #26441 by @lunny This PR rewrites the function `getStorage` and make it more clear. Include tests from #26435, thanks @earl-warren Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Earl Warren <contact@earl-warren.org>
* Add ThreadID parameter for Telegram webhooks (#25996) (#26480)Giteabot2023-08-145-1/+9
| | | | | | | | Backport #25996 Telegram has recently implemented threads (channels) for group chats. Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: neveraskedtoexist <matikot415@gmail.com>
* Close stdout correctly for "git blame" (#26470) (#26473)Giteabot2023-08-131-5/+12
| | | | | | | | | | | Backport #26470 by @wxiaoguang Close stdout correctly for "git blame", otherwise the failed "git blame" would cause the request hanging forever. And "os.Stderr" should never (seldom) be used as git command's stderr (there seems some similar problems in code, they could be fixed later). Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove last newline from config file (#26468) (#26471)Giteabot2023-08-132-0/+21
| | | | | | | | | | | Backport #26468 by @wxiaoguang When users put the secrets into a file (GITEA__sec__KEY__FILE), the newline sometimes is different to avoid (eg: echo/vim/...) So the last newline could be removed when reading, it makes the users easier to maintain the secret files. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Check first if minio bucket exists before trying to create it (#26420) (#26465)Giteabot2023-08-121-6/+10
| | | | | | | | | | | | Backport #26420 by @lunny For some reason, the permission of the client_id and secret may cannot create bucket, so now we will check whether bucket does exist first and then try to create a bucket if it doesn't exist. Try to fix #25984 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Avoiding accessing undefined tributeValues #26461 (#26462)wxiaoguang2023-08-122-2/+2
| | | Backport #26461
* Fix incorrect color of selected assignees when create issue (#26324) (#26372)Giteabot2023-08-111-0/+2
| | | | | | | | | | | | | Backport #26324 by @yp05327 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/75d610b2-3823-4366-be85-c77c9106feff) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/15afc6ac-f5ad-4e24-8983-fea8ace5921f) Co-authored-by: yp05327 <576951401@qq.com>
* Improve profile readme rendering (#25988) (#26453)crystal2023-08-112-1/+2
| | | | | | | | | | | manual backport of #25988 to v1.20 - Tell the renderer to use the `document` mode, so it's consistent with other renderers. - Use the same padding as `.file-view.markup`, so it's consistent with other containers that contain markup rendering. - Resolves https://codeberg.org/forgejo/forgejo/issues/833 Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
* Update upgrade documentation to add a check for deprecated configurations ↵Giteabot2023-08-112-8/+25
| | | | | | | | | | | (#26451) (#26452) Backport #26451 by @lunny fix https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add transaction when creating pull request created dirty data (#26259) (#26437)Lunny Xiao2023-08-118-87/+120
| | | | | | | | | Backport #26259 This PR will introduce a transaction on creating pull request so that if some step failed, it will rollback totally. And there will be no dirty pull request exist. Co-authored-by: Giteabot <teabot@gitea.io>
* Call git.InitSimple for runRepoSyncReleases (#26396) (#26450)Giteabot2023-08-101-0/+4
| | | | | | | | | | Backport #26396 by @wxiaoguang Fix #26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add changelog for 1.20.3 (#26373) (#26375)Giteabot2023-08-101-3/+32
| | | | | Backport #26373 by @delvh Co-authored-by: delvh <dev.lh@web.de>
* minio: add missing region on client initialization (#26412) (#26438)Giteabot2023-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #26412 by @nekrondev The MinIO client isn't redirecting to the correct AWS endpoint if a non-default data center is used. In my use case I created an AWS bucket at `eu-central-1` region. Because of the missing region initialization of the client the default `us-east-1` API endpoint is used returning a `301 Moved Permanently` response that's not handled properly by MinIO client. This in return aborts using S3 storage on AWS as the `BucketExists()` call will fail with the http moved error. MinIO client trace shows the issue: ```text ---------START-HTTP--------- HEAD / HTTP/1.1 Host: xxxxxxxxxxx-prod-gitea-data.s3.dualstack.us-east-1.amazonaws.com User-Agent: MinIO (windows; amd64) minio-go/v7.0.61 Authorization: AWS4-HMAC-SHA256 Credential=**REDACTED**/20230809/accesspoint.eu-central-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED** X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20230809T141143Z HTTP/1.1 301 Moved Permanently Connection: close Content-Type: application/xml Date: Wed, 09 Aug 2023 14:11:43 GMT Server: AmazonS3 X-Amz-Bucket-Region: eu-central-1 X-Amz-Id-2: UK7wfeYi0HcTcytNvQ3wTAZ5ZP1mOSMnvRZ9Fz4xXzeNsS47NB/KfFx2unFxo3L7XckHpMNPPVo= X-Amz-Request-Id: S1V2MJV8SZ11GEVN ---------END-HTTP--------- ``` Co-authored-by: nekrondev <heiko@noordsee.de> Co-authored-by: Heiko Besemann <heiko.besemann@qbeyond.de>
* Fix wrong middleware sequence (#26428) (#26436)Giteabot2023-08-101-1/+1
| | | | | Backport #26428 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix admin queue page title and fix CI failures (#26409) (#26421)wxiaoguang2023-08-102-3/+8
| | | | | | Backport #26409 * Fix #26408 * Bypass the data race issue in "ssh" package
* Add pull request review request webhook event (#26401) (#26407)Giteabot2023-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | Backport #26401 by @yardenshoham Add webhook events for pull request review requests - Fixes #26371 - Added support for the "Pull request review requested" and "Pull request review request removed" webhook events. - Updated the `getPullRequestPayloadInfo` function in `general.go` to handle these new webhook events. # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/bd942971-fb1d-40f3-8961-46638e3588fa) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/216e9c7d-0a4d-49f9-8492-2d14c88bbf4e) Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392) (#26405)Giteabot2023-08-095-17/+27
| | | | | | | | | | Backport #26392 by @wxiaoguang Fix #26389 And complete an old TODO: `ctx.Params does un-escaping,..., which is incorrect.` Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix incorrect sort link with `.profile` repository (#26374) (#26379)Giteabot2023-08-091-10/+10
| | | | | | | | | | | | | | Backport #26374 by @CaiCandong fix #26360 Before: ![before](https://github.com/go-gitea/gitea/assets/50507092/5606afe1-9aa2-455e-8d6f-123ff1ac7011) After: ![After](https://github.com/go-gitea/gitea/assets/50507092/14ff544a-e614-4d41-8615-5244b4ba56eb) Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix text truncate (#26354) (#26384)Giteabot2023-08-081-1/+1
| | | | | | | | | | | | | | | | | Backport #26354 by @Maks1mS Fixes: https://github.com/go-gitea/gitea/issues/25597 Before: ![image](https://github.com/go-gitea/gitea/assets/36362599/c8c27bcb-469f-4def-8521-d9e054c16ecb) After: ![image](https://github.com/go-gitea/gitea/assets/36362599/2405b6e8-fc5c-4b13-b66b-007bc11edbc4) Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
* Bypass MariaDB performance bug of the "IN" sub-query, fix incorrect ↵Giteabot2023-08-073-9/+59
| | | | | | | | | | IssueIndex (#26279) (#26368) Backport #26279 by @wxiaoguang Close #26277 Fix #26285 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Display human-readable text instead of cryptic filemodes (#26352) (#26358)delvh2023-08-063-2/+30
| | | | | | | | | | | | | | | | | Backport #26352 Now, you don't need to be a git expert anymore to know what these numbers mean. ## Before ![grafik](https://github.com/go-gitea/gitea/assets/51889757/9a964bf6-10fd-40a6-aeb2-ac8f437f8c32) ## After ![grafik](https://github.com/go-gitea/gitea/assets/51889757/84573cb9-55b6-4dde-9866-95f71b657554) or when the mode actually changed: ![grafik](https://github.com/go-gitea/gitea/assets/51889757/0f327538-ebdc-40e7-8c99-f9e21b67f638)
* [docs] Add missing backtick in quickstart.zh-cn.md (#26349) (#26357)Giteabot2023-08-061-1/+1
|
* [docs] Fix Gmail configuration (#26356)Brian Lachniet2023-08-061-2/+3
|
* Fix API leaking Usermail if not logged in (#25097) (#26350)wxiaoguang2023-08-064-9/+24
| | | | | | | | | | Backport #25097 The API should only return the real Mail of a User, if the caller is logged in. The check do to this don't work. This PR fixes this. This not really a security issue, but can lead to Spam. Co-authored-by: JakobDev <jakobdev@gmx.de> Co-authored-by: silverwind <me@silverwind.io>
* Hide `last indexed SHA` when a repo could not be indexed yet (#26340) (#26345)Giteabot2023-08-051-2/+4
| | | | | | | | | | | | | | | | | Backport #26340 by @CaiCandong Now, for a new repo without any commit, the Last indexed SHA field looks like this: Before: ![image](https://github.com/go-gitea/gitea/assets/50507092/cecc6e24-3366-4093-ae07-c361ea34b373) After: ![image](https://github.com/go-gitea/gitea/assets/50507092/9b6ba703-b0d5-4648-ad6b-9a2341dd60f9) fix #26336 Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Remove backslashed newlines on markdown (#26344) (#26348)Giteabot2023-08-051-2/+2
| | | | | | | Backport #26344 by @lunny Fix https://gitea.com/gitea/gitea-docusaurus/issues/56 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix incorrect CLI exit code and duplicate error message (#26346) (#26347)wxiaoguang2023-08-054-4/+104
| | | | | Backport #26346 Follow the CLI refactoring, and add tests.
* Fix log typo in task.go (#26337) (#26343)Giteabot2023-08-051-1/+1
| | | | | Backport #26337 by @cassiozareck Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
* Prevent newline errors with Debian packages (#26332) (#26342)Giteabot2023-08-052-11/+12
| | | | | | | Backport #26332 by @KN4CK3R Fixes #26313 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix bug with sqlite load read (#26305) (#26339)Giteabot2023-08-054-10/+25
| | | | | | | Backport #26305 by @lunny Possible fix #26280 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make git batch operations use parent context timeout instead of default ↵Giteabot2023-08-041-0/+4
| | | | | | | | | | | | | timeout (#26325) (#26330) Backport #26325 by @wxiaoguang Fix #26064 Some git commands should use parent context, otherwise it would exit too early (by the default timeout, 10m), and the "cmd.Wait" waits till the pipes are closed. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the wrong derive path (#26271) (#26318)Giteabot2023-08-042-17/+215
| | | | | | | | | | | | | | Backport #26271 by @lunny This PR will fix #26264, caused by #23911. The package configuration derive is totally wrong when storage type is local in that PR. This PR fixed the inherit logic when storage type is local with some unit tests. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the topic validation rule and suport dots (#26286) (#26303)Giteabot2023-08-044-3/+5
| | | | | | | | | Backport #26286 by @wxiaoguang 1. Allow leading and trailing spaces by user input, these spaces have already been trimmed at backend 2. Allow using dots in the topic Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support getting changed files when commit ID is `EmptySHA` (#26290) (#26316)Giteabot2023-08-043-3/+50
| | | | | | | | | | | | | | | | | | | | | Backport #26290 by @Zettat123 Fixes #26270. Co-Author: @wxiaoguang Thanks @lunny for providing this solution As https://github.com/go-gitea/gitea/issues/26270#issuecomment-1661695151 said, at present we cannot get the names of changed files correctly when the `OldCommitID` is `EmptySHA`. In this PR, the `GetCommitFilesChanged` method is added and will be used to get the changed files by commit ID. References: - https://stackoverflow.com/a/424142 Co-authored-by: Zettat123 <zettat123@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Upgrade x/net to 0.13.0 (#26301)Lunny Xiao2023-08-032-3/+3
| | | backport #26297
* Clarify the logger's MODE config option (#26267) (#26281)Giteabot2023-08-022-1/+4
| | | | | | | | | Backport #26267 by @wxiaoguang 1. Fix the wrong document (add the missing `MODE=`) 2. Add a more friendly log message to tell users to add `MODE=` in their config Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix due date rendering the wrong date in issue (#26268) (#26274)Giteabot2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | Backport #26268 by @yardenshoham Closes #26263 We have to pass the date without the time. # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/6b6cb43d-2b1c-4679-951d-20f48c94bfdd) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/50441baf-2c52-452b-bb0d-6034a407abde) Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Update Arch linux URL from community to extra (#26273) (#26276)Giteabot2023-08-011-1/+1
| | | | Co-authored-by: minijaws <minijaws@gmail.com>
* Use shared template for webhook icons (#26242) (#26246)Giteabot2023-07-316-103/+53
| | | | | | | Backport #26242 by @silverwind Fixes: https://github.com/go-gitea/gitea/issues/26241 Co-authored-by: silverwind <me@silverwind.io>
* Fix pull request check list is limited (#26179) (#26245)Giteabot2023-07-317-11/+11
| | | | | | | | | | | | | | | | Backport #26179 by @CaiCandong In the original implementation, we can only get the first 30 records of the commit status (the default paging size), if the commit status is more than 30, it will lead to the bug #25990. I made the following two changes. - On the page, use the ` db.ListOptions{ListAll: true}` parameter instead of `db.ListOptions{}` - The `GetLatestCommitStatus` function makes a determination as to whether or not a pager is being used. fixed #25990 Co-authored-by: caicandong <50507092+CaiCandong@users.noreply.github.com>
* Don't autosize textarea in diff view (#26233) (#26244)Giteabot2023-07-313-3/+8
| | | | | | | | | | | | | | | | Backport #26233 by @silverwind Resizing the comment editor can be a very expensive operation because it triggers page reflows, which on large PRs can take upwards of seconds to complete. Disable this mechanism on the diff page only where we know that the page can get large. Fixes https://github.com/go-gitea/gitea/issues/26201 for the textarea editor. I don't think this can be fixed for EasyMDE because as far as I can tell, it exposes no option to disable this resizing. Co-authored-by: silverwind <me@silverwind.io>
* Fix attachment clipboard copy on insecure origin (#26224) (#26231)silverwind2023-07-311-3/+6
| | | Backport https://github.com/go-gitea/gitea/pull/26224.
* Fixed incorrect locale references (#26218) (#26222)Giteabot2023-07-292-2/+2
| | | | | | | | | Backport #26218 by @kerwin612 Fixed two incorrect headers for setting the page navigation bar: * User settings page, should not use the title "`org.settings`" * Repo settings page, should not use the title "`org.settings`" Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
* Fix access check for org-level project (#26182) (#26223)Giteabot2023-07-293-6/+74
| | | | | | | | | | | | Backport #26182 by @Zettat123 Fix #25934 Add `ignoreGlobal` parameter to `reqUnitAccess` and only check global disabled units when `ignoreGlobal` is true. So the org-level projects and user-level projects won't be affected by global disabled `repo.projects` unit. Co-authored-by: Zettat123 <zettat123@gmail.com>
* Fix commit compare style (#26209) (#26226)Giteabot2023-07-291-1/+1
| | | | | | | | | | | | | | | | Backport #26209 by @puni9869 as title Fixes : #25825 Before <img width="1334" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/c54a41b0-39bd-4094-a956-081a8f4128f2"> After change <img width="1340" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/c112d235-6bbe-4bcb-9529-78da3ab0fa14"> Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
* Warn instead of reporting an error when a webhook cannot be found (#26039) ↵Giteabot2023-07-291-1/+6
| | | | | | | | | | | (#26211) Backport #26039 by @puni9869 Attemp fix: #25744 Fixing the log level when we delete any repo then we get error hook not found by id. That should be warn level to reduce the noise in the logs. Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>