summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Tweak actions menu (#26278)silverwind2023-08-121-20/+10
| | | | | | | | | | | | | | | | Ressurect lost changes from https://github.com/go-gitea/gitea/pull/24451. - Always show icons for each entry in the menu - Make all checkboxes toggle only their feature, e.g. "seconds" and "timestamps" can now be toggled on together. - Reorder the items <img width="845" alt="Screenshot 2023-08-01 at 19 19 27" src="https://github.com/go-gitea/gitea/assets/115237/8a76e9bf-7966-42a6-87c9-e88cdddaec82"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Adjust minio new sequence, now it will check whether bucket exist first and ↵Lunny Xiao2023-08-121-6/+10
| | | | | | | | | | | then create one if it doesn't exist (#26420) 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: silverwind <me@silverwind.io>
* Set commit id when ref used explicitly (#26447)Jack Hay2023-08-121-0/+1
| | | | | | | | | | In the `RepoRefForAPI()` context function `CommitID` is not set if `ref` is used. It is set correctly for other if/else branches where `Commit` is set. It doesn't appear that any routes that use `RepoRefForAPI()` also use `CommitID` but that may be the case in the future. ## Changes - Sets `ctx.Repo.CommitID` when `ref` is explicitly used for api routes that use `RepoRefForAPI()`
* Fix 404 error when remove self from an organization (#26362)yp053272023-08-121-16/+16
| | | | | | Same to #24322 Not only `leave` action but also `remove` action should check whether user still belongs to the org.
* Update index doc (#26455)CaiCandong2023-08-122-464/+40
| | | | | | In the previous feature description, numerous functionalities of Gitea were listed, which appeared redundant and failed to highlight the unique characteristics of Gitea. Therefore, I have rewritten this section based on the description provided on the official Gitea website
* [skip ci] Updated translations via CrowdinGiteaBot2023-08-121-16/+35
|
* remove unnecessary explore org template (#26459)Denys Konovalov2023-08-112-8/+1
|
* Fix URL of padlock icon in profile (#26446)Panagiotis "Ivory" Vasilopoulos2023-08-111-1/+1
|
* Count only visible repos on profile (#25928)JakobDev2023-08-119-106/+211
| | | Fixes #25914
* Update upgrade documentation to add a check for deprecated configurations ↵Lunny Xiao2023-08-112-8/+25
| | | | | | | | | | (#26451) fix https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fall back to esbuild for css minify (#26445)silverwind2023-08-111-3/+8
| | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/26439. The minification result is not ideal with esbuild, but it's better than failing competely. Co-authored-by: Giteabot <teabot@gitea.io>
* Update JS dependencies (#26449)silverwind2023-08-112-497/+544
| | | | - Update all JS dependencies - Tested Monaco and Swagger
* Call git.InitSimple for runRepoSyncReleases (#26396)wxiaoguang2023-08-101-0/+4
| | | | | | Fix #26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini
* Target specific OS for devcontainer base image (#26422)techknowlogick2023-08-101-1/+1
| | | | | fixes #25842 credit to philippbeckmann for discovering this
* Lock go to 1.21 on CI (#26433)silverwind2023-08-105-14/+14
| | | | | | | To prevent unwanted surprises with new minor versions of go, lock the version to minor version using [semver tilde syntax](https://github.com/npm/node-semver#tilde-ranges-123-12-1). We were already getting 1.21.0 since yesterday, so use that version now as minimum.
* Always show usernames in reaction tooltips (#26444)Panagiotis "Ivory" Vasilopoulos2023-08-102-2/+2
| | | | | | | | | | | | Even if GetDisplayName() is normally preferred elsewhere, this change provides more consistency, as usernames are also always being shown when participating in a conversation taking place in an issue or a pull request. This change makes conversations easier to follow, as you would not have to have a mental association between someone's username and someone's real name in order to follow what is happening. This behavior matches GitHub's. Optimally, both the username and the full name (if applicable) could be shown, but such an effort is a much bigger task that needs to be thought out well.
* Fix incorrect redirection in new issue using references (#26440)CaiCandong2023-08-101-1/+1
| | | | | | | | | | | | | | | | fix #26427 related https://github.com/go-gitea/gitea/pull/25258 --- Before: ![gitea](https://github.com/go-gitea/gitea/assets/50507092/ed8d3a17-1f63-42f2-a698-3b684e70dc91) --- After: ![After](https://github.com/go-gitea/gitea/assets/50507092/b8e1338f-c520-4abc-b0df-b812c021ac7e)
* Fix the display of orgs listed in user profile (#26424)yp053272023-08-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/55759aad-cbf7-4d91-8559-b7781d184911) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/9de5136b-d0a0-4756-9426-125fd4b603d3) In #26214, we changed each row's display into `flex` which caused this problem. ![image](https://github.com/go-gitea/gitea/assets/18380374/66546e7e-a224-45e7-9008-224f0f2952c6) ![image](https://github.com/go-gitea/gitea/assets/18380374/e5190f88-e561-4361-894a-86c5fe88837e) In old version: ![image](https://github.com/go-gitea/gitea/assets/18380374/36e58e98-7d75-4a63-844a-2beee460997a) Maybe we can add paddings here? ![image](https://github.com/go-gitea/gitea/assets/18380374/dc61acd2-8995-46d4-b606-eb10c77dd877) In old version; ![image](https://github.com/go-gitea/gitea/assets/18380374/478acba7-0bbc-4852-b208-3ae43fcea976)
* minio: add missing region on client initialization (#26412)nekrondev2023-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Heiko Besemann <heiko.besemann@qbeyond.de>
* Fix wrong middleware sequence (#26428)Lunny Xiao2023-08-101-1/+1
|
* Use template context function for avatar rendering (#26385)wxiaoguang2023-08-1054-155/+162
| | | | Introduce `AvatarUtils`, no need to pass `$.Context` to every sub-template, and simplify the template helper functions.
* Add transaction when creating pull request created dirty data (#26259)Lunny Xiao2023-08-108-90/+121
| | | | | | | | | | | | Fix #26129 Replace #26258 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>
* Fix admin queue page title (#26409)wxiaoguang2023-08-103-6/+10
| | | | | | | | | | | | | Fix #26408 ``` # locale_en-US.ini [admin] monitor.queues = Queues ``` --------- Co-authored-by: silverwind <me@silverwind.io>
* Pre-register OAuth2 applications for git credential helpers (#26291)Denys Konovalov2023-08-0910-12/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | This PR is an extended implementation of #25189 and builds upon the proposal by @hickford in #25653, utilizing some ideas proposed internally by @wxiaoguang. Mainly, this PR consists of a mechanism to pre-register OAuth2 applications on startup, which can be enabled or disabled by modifying the `[oauth2].DEFAULT_APPLICATIONS` parameter in app.ini. The OAuth2 applications registered this way are being marked as "locked" and neither be deleted nor edited over UI to prevent confusing/unexpected behavior. Instead, they're being removed if no longer enabled in config. ![grafik](https://github.com/go-gitea/gitea/assets/47871822/81a78b1c-4b68-40a7-9e99-c272ebb8f62e) The implemented mechanism can also be used to pre-register other OAuth2 applications in the future, if wanted. Co-authored-by: hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> --------- Co-authored-by: M Hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make `user-content-* ` consistent with github (#26388)CaiCandong2023-08-092-9/+64
| | | | | | Fix #26367 Related #19745 Thanks @lazyky for providing test cases
* Add pull request review request webhook event (#26401)Yarden Shoham2023-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | 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: Giteabot <teabot@gitea.io>
* Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392)wxiaoguang2023-08-095-17/+27
| | | | | | Fix #26389 And complete an old TODO: `ctx.Params does un-escaping,..., which is incorrect.`
* [skip ci] Updated translations via CrowdinGiteaBot2023-08-091-101/+101
|
* fix artifact merging chunks path with correct slash on Windows (#26400)FuXiaoHei2023-08-081-1/+2
| | | | | | | | | | | | | From Discord https://discord.com/channels/322538954119184384/1069795723178160168/1136719889684500480 Artifact chunks merging is break on Windows. ``` Gitea Log: 2023/08/03 20:51:15 ...actions/artifacts.go:271:comfirmUploadArtifact() [E] Error merge chunks: parse content range error: input does not match format ``` Artifact uses wrong slash to parse saved chunks path.
* Use flex classes in package settings (#26314)KN4CK3R2023-08-082-31/+39
| | | | | | | | Regression of #25790 Fixes #26310 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Improve multiple strings in en-US locale (#26213)Panagiotis "Ivory" Vasilopoulos2023-08-083-80/+84
| | | | | | | | | | | | | | | | | | | | | | | | | I kept sending pull requests that consisted of one-line changes. It's time to settle this once and for all. (Maybe.) - Explain Gitea behavior and the consequences of each setting better, so that the user does not have to consult the docs. - Do not use different spellings of identical terms interchangeably, e.g. `e-mail` and `email`. - Use more conventional terms to describe the same things, e.g. `Confirm Password` instead of `Re-Type Password`. - Introduces additional clarification for Mirror Settings - Small adjustments in test - This is a cry for help. - Grammar and spelling consistencies for en-US locale (e.g. cancelled -> canceled) - Introduce tooltip improvements. --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor "editorconfig" (#26391)wxiaoguang2023-08-083-20/+9
| | | | | | | | | | There are 2 kinds of ".Editorconfig" in code, one is `JSON string` for the web edtior, another is `*editorconfig.Editorconfig` for the file rendering (used by `TabSizeClass`) This PR distinguish them with different names. And by the way, change the default tab size from 8 to 4, I think few people would like to use 8-size tabs nowadays.
* fix generated source URL on rendered files (#26364)Earl Warren2023-08-083-2/+50
| | | | | | | | | | | | | | | - The permalink and 'Reference in New issue' URL of an renderable file (those where you can see the source and a rendered version of it, such as markdown) doesn't contain `?display=source`. This leads the issue that the URL doesn't have any effect, as by default the rendered version is shown and thus not the source. - Add `?display=source` to the permalink URL and to 'Reference in New Issue' if it's renderable file. - Add integration testing. Refs: https://codeberg.org/forgejo/forgejo/pulls/1088 Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary template helper DisableGravatar (#26386)wxiaoguang2023-08-085-7/+9
| | | | | And one "AllowedUserVisibilityModes" was missing, add it. Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary template helper repoAvatar (#26387)wxiaoguang2023-08-086-42/+16
| | | And simplify the "repo/icon" code
* Start using template context function (#26254)wxiaoguang2023-08-0812-22/+91
| | | | | | | | | | | | | | | | | | | | | | Before: * `{{.locale.Tr ...}}` * `{{$.locale.Tr ...}}` * `{{$.root.locale.Tr ...}}` * `{{template "sub" .}}` * `{{template "sub" (dict "locale" $.locale)}}` * `{{template "sub" (dict "root" $)}}` * ..... With context function: only need to `{{ctx.Locale.Tr ...}}` The "ctx" could be considered as a super-global variable for all templates including sub-templates. To avoid potential risks (any bug in the template context function package), this PR only starts using "ctx" in "head.tmpl" and "footer.tmpl" and it has a "DataRaceCheck". If there is anything wrong, the code can be fixed or reverted easily.
* Allow package cleanup from admin page (#25307)KN4CK3R2023-08-087-7/+45
| | | | | | | | | | | | | | | Until now expired package data gets deleted daily by a cronjob. The admin page shows the size of all packages and the size of unreferenced data. The users (#25035, #20631) expect the deletion of this data if they run the cronjob from the admin page but the job only deletes data older than 24h. This PR adds a new button which deletes all expired data. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/b3e35d73-9496-4fa7-a20c-e5d30b1f6850) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix text truncate (#26354)Maxim Slipenko2023-08-071-1/+1
| | | | | | | | | | | | | | | 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: Giteabot <teabot@gitea.io>
* Fix incorrect sort link with `.profile` repository (#26374)CaiCandong2023-08-071-10/+10
| | | fix #26360
* Use more `IssueList` instead of `[]*Issue` (#26369)Lunny Xiao2023-08-074-8/+7
|
* Rename code_langauge.go to code_language.go (#26377)cassiozareck2023-08-071-0/+0
|
* Add changelog for 1.20.3 (#26373)delvh2023-08-071-3/+32
|
* Do not highlight `#number` in documents (#26365)Earl Warren2023-08-073-1/+61
| | | | | | | | | | | | | | - Currently the post processing will transform all issue indexes (such as `#6`) into a clickable link. - This makes sense in an situation like issues or PRs, where referencing to other issues is quite common and only referencing their issue index is an handy and efficient way to do it. - Currently this is also run for documents (which is the user profile and viewing rendered files), but in those situations it's less common to reference issues by their index and instead could mean something else. - This patch disables this post processing for issue index for documents. Matches Github's behavior. - Added unit tests. - Resolves https://codeberg.org/Codeberg/Community/issues/1120 Co-authored-by: Gusted <postmaster@gusted.xyz>
* Bypass MariaDB performance bug of the "IN" sub-query, fix incorrect ↵wxiaoguang2023-08-073-9/+59
| | | | | | IssueIndex (#26279) Close #26277 Fix #26285
* Fix nil pointer dereference error when open link with invalid pull index ↵CaiCandong2023-08-072-29/+30
| | | | | | | | | | | | | (#26353) fix #26331 Before: ![image](https://github.com/go-gitea/gitea/assets/50507092/028e6944-84d1-4404-80b6-4a4accdc7d0a) After: ![image](https://github.com/go-gitea/gitea/assets/50507092/b78978f9-e77f-459f-96e1-3a1f36ec8abe)
* [skip ci] Updated licenses and gitignoresGiteaBot2023-08-073-0/+27
|
* Display human-readable text instead of cryptic filemodes (#26352)delvh2023-08-063-2/+30
| | | | | | | | | | | | | | | | 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)Track32023-08-061-1/+1
| | | | | | Added missing backtick in quickstart.zh-cn.md docs so inline code can render properly. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix incorrect CLI exit code and duplicate error message (#26346)wxiaoguang2023-08-054-27/+98
| | | Follow the CLI refactoring, and add tests.
* Improve CLI and messages (#26341)wxiaoguang2023-08-052-52/+17
| | | | | | | Follow the CLI refactoring 1. Remove the "checkCommandFlags" helper 2. Unify the web startup message, make them have consistent names as `./gitea help` 3. Fine tune some other messages (see the diff)