aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Increase default LFS auth timeout from 20m to 24h (#24628)wxiaoguang2023-05-103-3/+3
| | | | | | | | | | | | | According to the discussion with DanielGibson, the default "20m" seems too short. It would make LFS fail if the file is large / network is slow. I think relaxing this timeout doesn't have side affect. So change the default value to 24h, IMO that should be long enough. ## :warning: BREAKING If admins want the previous timeout, they should set the setting `[server].LFS_HTTP_AUTH_EXPIRY`.
* Fix typo in the swift package documentation (#24637)ericLemanissier2023-05-101-1/+1
|
* Fix broken links in documents (#24630)Jason Song2023-05-104-7/+7
| | | | | | | | | | | Before: <img width="837" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/90c1c484-2d8d-4a57-8e86-2f4df0e7fbba"> After: <img width="822" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/e27f6b63-9e7b-4894-b315-7be0cfebe8ca">
* Improve updating Actions tasks (#24600)Jason Song2023-05-102-28/+12
| | | Co-authored-by: Giteabot <teabot@gitea.io>
* Modify luminance calculation and extract related functions into single files ↵Hester Gong2023-05-1010-83/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#24586) Close #24508 Main changes: As discussed in the issue 1. Change luminance calculation function to use [Relative Luminance](https://www.w3.org/WAI/GL/wiki/Relative_luminance) 2. Move the luminance related functions into color.go/color.js 3. Add tests for both the files (Not sure if test cases are too many now) Before (tests included by `UseLightTextOnBackground` are labels started with `##`): https://try.gitea.io/HesterG/testrepo/labels After: <img width="1307" alt="Screen Shot 2023-05-08 at 13 37 55" src="https://user-images.githubusercontent.com/17645053/236742562-fdfc3a4d-2fab-466b-9613-96f2bf96b4bc.png"> <img width="1289" alt="Screen Shot 2023-05-08 at 13 38 06" src="https://user-images.githubusercontent.com/17645053/236742570-022db68e-cec0-43bb-888a-fc54f5332cc3.png"> <img width="1299" alt="Screen Shot 2023-05-08 at 13 38 20" src="https://user-images.githubusercontent.com/17645053/236742572-9af1de45-fb7f-460b-828d-ba25fae20f51.png"> --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Do not send "registration success email" for external auth sources (#24632)wxiaoguang2023-05-105-15/+0
| | | | | | | | | | | | Co-author: @pboguslawski "registration success email" is only used for notifying a user that "you have a new account now" when the account is created by admin manually. When a user uses external auth source, they already knows that they has the account, so do not send such email. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix typo in Actions demo file (#24631)Jason Song2023-05-101-1/+1
| | | Reported by @kerwin612.
* Review fixes and enhancements (#24526)silverwind2023-05-105-71/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix regression with icons wrapping from https://github.com/go-gitea/gitea/pull/24459 - Fix box misalignment on small screen - Fix avatar misalignment on review comment - Fix incorrect underline hover effect on review icons - Move status icon to left side in review box - Enhance review icon colors, add helper function for it - Add missing inline avatars in review comments - Tweak icon sizes because some octicons have inconsistent sizing ### Before <img width="655" alt="Screenshot 2023-05-04 at 20 50 28" src="https://user-images.githubusercontent.com/115237/236301230-92325507-6e03-47ac-bfb4-c9ddde310571.png"> <img width="260" alt="Screenshot 2023-05-04 at 20 50 42" src="https://user-images.githubusercontent.com/115237/236301236-0dfa50e7-b8fc-4179-ae68-d872bc90f1f3.png"> ### After <img width="498" alt="Screenshot 2023-05-04 at 20 55 08" src="https://user-images.githubusercontent.com/115237/236301810-23862c2c-c0a9-43a4-a3eb-ee611c14a7f4.png"> <img width="219" alt="Screenshot 2023-05-04 at 20 55 16" src="https://user-images.githubusercontent.com/115237/236301817-d0de02ea-6ab5-43e1-9183-6b3848b72995.png"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove fluid on compare diff page (#24627)Hester Gong2023-05-101-2/+0
| | | | | | | | | | | | | | | | | As discuessed in https://github.com/go-gitea/gitea/pull/24598/files#r1189290462 After: Diff Page <img width="1426" alt="Screen Shot 2023-05-10 at 10 44 48" src="https://github.com/go-gitea/gitea/assets/17645053/bc1a5f78-ec17-4ac2-8390-081a5fc059d1"> New PR Page <img width="1428" alt="Screen Shot 2023-05-10 at 10 45 17" src="https://github.com/go-gitea/gitea/assets/17645053/ce94a28e-39d5-4534-9e78-c0edd4c7a339"> <img width="1432" alt="Screen Shot 2023-05-10 at 10 45 27" src="https://github.com/go-gitea/gitea/assets/17645053/047809e1-abb2-4c16-ae62-63b71094c1c7">
* Make the actions control button look like an actual button (#24611)Yarden Shoham2023-05-101-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | - Follows #24595 # Before ![image](https://user-images.githubusercontent.com/20454870/236889690-d1dfd74d-ad7d-4571-b712-69f0dc630c6e.png) ![image](https://user-images.githubusercontent.com/20454870/236903320-3b415619-8aff-4e5d-994e-6faa671990db.png) ![image](https://user-images.githubusercontent.com/20454870/236885823-0734216d-b450-4a43-bfe3-e88525a8822a.png) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/b0745b3f-5f7a-49d9-903a-fd2675baaa1a) ![image](https://github.com/go-gitea/gitea/assets/20454870/88789c78-2764-4be4-9a03-b080f1028c78) ![image](https://github.com/go-gitea/gitea/assets/20454870/a6e23400-4445-40c5-adbe-460c90fae36a) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add a tooltip to the job rerun button (#24617)Yarden Shoham2023-05-101-1/+1
| | | | | | | | | | | | | This one doesn't look very good as a real button (at least not in the ways I tried), so I've opted to simply add a tooltip for it. # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/05afe362-b914-42ce-9db3-e3471bc6ec4b) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/c99c88d4-bf43-46b0-911e-9ea17ff6977e) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Improve reverse-proxy document and fix nginx config bug (#24616)wxiaoguang2023-05-101-17/+29
| | | | | | | | | | | | | | Close #23711, thanks to @ghnp5 ! Close #24612, thanks to @DanielGibson ! Major changes: * the default value of nginx's client_max_body_size is too small, so put a 512M here * move `Resolving Error: 413 Request Entity Too Large` to a sub-section of `Nginx` section * make nginx use unescaped the URI and keep "%2F" as is when using sub-path * add details for General sub-path configuration
* Remove unnecessary code (#24610)Lunny Xiao2023-05-105-20/+8
| | | As title, remove unnecessary code.
* Fix commits pushed with deploy keys not shown in dashboard (#24521)Zettat1232023-05-101-6/+21
| | | | | | | | | | | | | | | | | Fix #21324 In the current logic, if the `Actor` user is not an admin user, all activities from private organizations won't be shown even if the `Actor` user is a member of the organization. As mentioned in the issue, when using deploy key to make a commit and push, the activity's `act_user_id` will be the id of the organization so the activity won't be shown to non-admin users because the visibility of the organization is private. https://github.com/go-gitea/gitea/blob/55a57177600028ba8e4a480a08f1ee4d69d219d6/models/activities/action.go#L490-L503 This PR improves this logic so the activities of private organizations can be shown.
* fix: release page for empty or non-existing target (#24470)oliverpool2023-05-106-17/+107
| | | | | | | | | | | | | | | Fixes #24145 To solve the bug, I added a "computed" `TargetBehind` field to the `Release` model, which indicates the target branch of a release. This is particularly useful if the target branch was deleted in the meantime (or is empty). I also did a micro-optimization in `calReleaseNumCommitsBehind`. Instead of checking that a branch exists and then call `GetBranchCommit`, I immediately call `GetBranchCommit` and handle the `git.ErrNotExist` error. This optimization is covered by the added unit test.
* Filter get single commit (#24613)Matthew Walowski2023-05-103-16/+44
| | | | Pretty much the same thing as #24568 but for getting a single commit instead of getting a list of commits
* Attach a tooltip to the action status icon (#24614)Yarden Shoham2023-05-095-9/+35
| | | | | | | | | | | | | | To clearly communicate the current state of the action ![image](https://github.com/go-gitea/gitea/assets/20454870/5d6de6b9-f34f-417d-b08e-fcd1b99b3079) ![image](https://github.com/go-gitea/gitea/assets/20454870/b976676a-4525-43e7-866f-8933be1a5dfd) ![image](https://github.com/go-gitea/gitea/assets/20454870/2e0a55fe-658f-4242-83de-b857a8b55f31) ![image](https://github.com/go-gitea/gitea/assets/20454870/6b42bcd1-c499-41ac-8419-1c4e60085d47) ![image](https://github.com/go-gitea/gitea/assets/20454870/363fcff8-fe61-4363-a04b-2db93cfc4fa3) ![image](https://github.com/go-gitea/gitea/assets/20454870/f8f59b68-93de-4f31-b9b0-24d94990d1d0) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Use official Vue extension in Gitpod (#24609)Yarden Shoham2023-05-091-1/+1
| | | | | | | | The previous one didn't work well --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Create a branch directly from commit on the create branch API (#22956)来自村里的小螃蟹2023-05-093-5/+41
| | | | | | | | | | | | | #### Added - API: Create a branch directly from commit on the create branch API - Added `old_ref_name` parameter to allow creating a new branch from a specific commit, tag, or branch. - Deprecated `old_branch_name` parameter in favor of the new `old_ref_name` parameter. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make repository response support HTTP range request (#24592)wxiaoguang2023-05-0912-212/+434
| | | | | | Replace #20480 Replace #18448 Close #16414
* Add Gitea Profile Readmes (#23260)Nicholas Pease2023-05-097-38/+97
| | | | | | | | | | | | | | | | | | | | | | | | | Implements displaying a README.md file present in a users ```.profile``` repository on the users profile page. If no such repository/file is present, the user's profile page remains unchanged. Example of user with ```.profile/README.md``` ![image](https://user-images.githubusercontent.com/34464552/222757202-5d53ac62-60d9-432f-b9e3-2537ffa91041.png) Example of user without ```.profile/README.md``` ![image](https://user-images.githubusercontent.com/34464552/222759972-576e058b-acd4-47ac-be33-38a7cb58cc81.png) This pull request closes the feature request in #12233 Special thanks to @techknowlogick for the help in the Gitea discord! --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Make diff view full width again (#24598)wxiaoguang2023-05-093-15/+18
| | | | | | Regression of #24459 , [the related line](https://github.com/go-gitea/gitea/pull/24459/files#diff-f255004de8d715ff40852710390429bf2a06e7e33a4e3f8ad568af636557ac71L8) The PR file diff view needs to be full-screen width.
* Add permission check for moving issue action in project view page (#24589)yp053272023-05-093-3/+6
| | | | Fix #22954 Only users who have write permission can move issues in the project view page.
* Update JS dependencies, add new eslint rules (#24597)silverwind2023-05-0911-528/+667
| | | | | | | | | | | | - Update all JS dependencies - Enable new eslint rules, fix issue (some via autofix) - Fix some missed eslint rule renames from [unicorn v25](https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v25.0.0) - Tested Monaco, Katex, Swagger UI --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Filters for GetAllCommits (#24568)Matthew Walowski2023-05-096-8/+72
| | | | | | | | | | | | | | | | | | | The `GetAllCommits` endpoint can be pretty slow, especially in repos with a lot of commits. The issue is that it spends a lot of time calculating information that may not be useful/needed by the user. The `stat` param was previously added in #21337 to address this, by allowing the user to disable the calculating stats for each commit. But this has two issues: 1. The name `stat` is rather misleading, because disabling `stat` disables the Stat **and** Files. This should be separated out into two different params, because getting a list of affected files is much less expensive than calculating the stats 2. There's still other costly information provided that the user may not need, such as `Verification` This PR, adds two parameters to the endpoint, `files` and `verification` to allow the user to explicitly disable this information when listing commits. The default behavior is true.
* [skip ci] Updated translations via CrowdinGiteaBot2023-05-091-2/+10
|
* Attach a tooltip to the action control button (#24595)Yarden Shoham2023-05-083-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The first time I saw the big red X button I thought something failed but apparently, it was just a "Cancel" button # Before ![image](https://user-images.githubusercontent.com/20454870/236889564-3729926a-cfb3-4e47-a8ed-51389c4f193f.png) ![image](https://user-images.githubusercontent.com/20454870/236886259-b0ab0d55-28c3-41f5-8709-8cfc6819423f.png) ![image](https://user-images.githubusercontent.com/20454870/236886081-b7a97f01-6108-4c18-9adb-11cbafd8c19c.png) # After ![image](https://user-images.githubusercontent.com/20454870/236889690-d1dfd74d-ad7d-4571-b712-69f0dc630c6e.png) ![image](https://user-images.githubusercontent.com/20454870/236885823-0734216d-b450-4a43-bfe3-e88525a8822a.png) ![image](https://user-images.githubusercontent.com/20454870/236903320-3b415619-8aff-4e5d-994e-6faa671990db.png) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* Improve Gitea's web context, decouple "issue template" code into service ↵wxiaoguang2023-05-0910-250/+228
| | | | | | | | | | | | | package (#24590) 1. Remove unused fields/methods in web context. 2. Make callers call target function directly instead of the light wrapper like "IsUserRepoReaderSpecific" 3. The "issue template" code shouldn't be put in the "modules/context" package, so move them to the service package. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Support markdown editor for issue template (#24400)yp053272023-05-088-89/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #24398 Task: - [x] Reusing "textarea" like GitHub seems more friendly to users. - [x] ^V image pasting and file uploading handling. <details><summary>screenshots</summary> ![image](https://user-images.githubusercontent.com/18380374/235418877-00090552-ebda-411c-8e39-b47246bc8746.png) ![image](https://user-images.githubusercontent.com/18380374/235419073-dc33cad7-7626-4bce-9161-eb205c7384b5.png) Display only one markdown editor: ![image](https://user-images.githubusercontent.com/18380374/235419098-ee21386d-2b2d-432e-bdb2-18646cc031e7.png) Support file upload and ^V image pasting ![image](https://user-images.githubusercontent.com/18380374/235419364-7b390fa4-da56-437d-b55e-3847fbc049e7.png) </details> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Do not select line numbers when selecting text from the action run logs (#24594)Yarden Shoham2023-05-081-0/+1
| | | | | | | | | | | | | - Fixes #24578 # Before ![image](https://user-images.githubusercontent.com/20454870/236873942-26e97f28-6595-4be9-88fa-158870eda253.png) # After ![image](https://user-images.githubusercontent.com/20454870/236874171-8f0182a5-e953-4740-b875-f3542dee8325.png) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* In TestViewRepo2, convert computed timezones to local time (#24579)Nick2023-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes up https://github.com/go-gitea/gitea/pull/10446; in that, the *expected* timezone was changed to the local timezone, but the computed timezone was left in UTC. The result was this failure, when run on a non-UTC system: ``` Diff: --- Expected +++ Actual @@ -5,3 +5,3 @@ commitMsg: (string) (len=12) "init project", - commitTime: (string) (len=29) "Wed, 14 Jun 2017 09:54:21 EDT" + commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC" }, @@ -11,3 +11,3 @@ commitMsg: (string) (len=12) "init project", - commitTime: (string) (len=29) "Wed, 14 Jun 2017 09:54:21 EDT" + commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC" } Test: TestViewRepo2 ``` I assume this was probably missed since the CI servers all run in UTC? The Format() string "Mon, 02 Jan 2006 15:04:05 UTC" was incorrect: 'UTC' isn't recognized as a variable placeholder, but was just being copied verbatim. It should use 'MST' in order to command Format() to output the attached timezone, which is what `time.RFC1123` has.
* Fix close org projects (#24588)yp053272023-05-081-4/+4
| | | | A part of #22865 We can not close org projects now. This PR will fix it.
* Rewrite queue (#24505)wxiaoguang2023-05-08100-6843/+2481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # ⚠️ Breaking Many deprecated queue config options are removed (actually, they should have been removed in 1.18/1.19). If you see the fatal message when starting Gitea: "Please update your app.ini to remove deprecated config options", please follow the error messages to remove these options from your app.ini. Example: ``` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].ISSUE_INDEXER_QUEUE_TYPE`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [E] Removed queue option: `[indexer].UPDATE_BUFFER_LEN`. Use new options in `[queue.issue_indexer]` 2023/05/06 19:39:22 [F] Please update your app.ini to remove deprecated config options ``` Many options in `[queue]` are are dropped, including: `WRAP_IF_NECESSARY`, `MAX_ATTEMPTS`, `TIMEOUT`, `WORKERS`, `BLOCK_TIMEOUT`, `BOOST_TIMEOUT`, `BOOST_WORKERS`, they can be removed from app.ini. # The problem The old queue package has some legacy problems: * complexity: I doubt few people could tell how it works. * maintainability: Too many channels and mutex/cond are mixed together, too many different structs/interfaces depends each other. * stability: due to the complexity & maintainability, sometimes there are strange bugs and difficult to debug, and some code doesn't have test (indeed some code is difficult to test because a lot of things are mixed together). * general applicability: although it is called "queue", its behavior is not a well-known queue. * scalability: it doesn't seem easy to make it work with a cluster without breaking its behaviors. It came from some very old code to "avoid breaking", however, its technical debt is too heavy now. It's a good time to introduce a better "queue" package. # The new queue package It keeps using old config and concept as much as possible. * It only contains two major kinds of concepts: * The "base queue": channel, levelqueue, redis * They have the same abstraction, the same interface, and they are tested by the same testing code. * The "WokerPoolQueue", it uses the "base queue" to provide "worker pool" function, calls the "handler" to process the data in the base queue. * The new code doesn't do "PushBack" * Think about a queue with many workers, the "PushBack" can't guarantee the order for re-queued unhandled items, so in new code it just does "normal push" * The new code doesn't do "pause/resume" * The "pause/resume" was designed to handle some handler's failure: eg: document indexer (elasticsearch) is down * If a queue is paused for long time, either the producers blocks or the new items are dropped. * The new code doesn't do such "pause/resume" trick, it's not a common queue's behavior and it doesn't help much. * If there are unhandled items, the "push" function just blocks for a few seconds and then re-queue them and retry. * The new code doesn't do "worker booster" * Gitea's queue's handlers are light functions, the cost is only the go-routine, so it doesn't make sense to "boost" them. * The new code only use "max worker number" to limit the concurrent workers. * The new "Push" never blocks forever * Instead of creating more and more blocking goroutines, return an error is more friendly to the server and to the end user. There are more details in code comments: eg: the "Flush" problem, the strange "code.index" hanging problem, the "immediate" queue problem. Almost ready for review. TODO: * [x] add some necessary comments during review * [x] add some more tests if necessary * [x] update documents and config options * [x] test max worker / active worker * [x] re-run the CI tasks to see whether any test is flaky * [x] improve the `handleOldLengthConfiguration` to provide more friendly messages * [x] fine tune default config values (eg: length?) ## Code coverage: ![image](https://user-images.githubusercontent.com/2114189/236620635-55576955-f95d-4810-b12f-879026a3afdf.png)
* Split "modules/context.go" to separate files (#24569)wxiaoguang2023-05-0818-676/+747
| | | | | | | | | | | | | | The "modules/context.go" is too large to maintain. This PR splits it to separate files, eg: context_request.go, context_response.go, context_serve.go This PR will help: 1. The future refactoring for Gitea's web context (eg: simplify the context) 2. Introduce proper "range request" support 3. Introduce context function This PR only moves code, doesn't change any logic.
* Pass 'not' to commit count (#24473)Matthew Walowski2023-05-0810-30/+177
| | | | | | | | | | | | Due to #24409 , we can now specify '--not' when getting all commits from a repo to exclude commits from a different branch. When I wrote that PR, I forgot to also update the code that counts the number of commits in the repo. So now, if the --not option is used, it may return too many commits, which can indicate that another page of data is available when it is not. This PR passes --not to the commands that count the number of commits in a repo
* Refresh the refernce of the closed PR when reopening (#24231)sillyguodong2023-05-085-21/+68
| | | | | | | | | | | | | | | | | | | | | | Close #24213 Replace #23830 #### Cause - Before, in order to making PR can get latest commit after reopening, the `ref`(${REPO_PATH}/refs/pull/${PR_INDEX}/head) of evrey closed PR will be updated when pushing commits to the `head branch` of the closed PR. #### Changes - For closed PR , won't perform these behavior: insert`comment`, push `notification` (UI and email), exectue [pushToBaseRepo](https://github.com/go-gitea/gitea/blob/74225033413dc0f2b308bbe069f6d185b551e364/services/pull/pull.go#L409) function and trigger `action` any more when pushing to the `head branch` of the closed PR. - Refresh the reference of the PR when reopening the closed PR (**even if the head branch has been deleted before**). Make the reference of PR consistent with the `head branch`.
* Fix broken link in tests/e2e/README (#24576)Steve Russo2023-05-081-1/+1
|
* [skip ci] Updated licenses and gitignoresGiteaBot2023-05-081-0/+17
|
* Add goto issue id function (#24479)Tyrone Yeh2023-05-075-3/+36
| | | | | | | | | | | | for https://github.com/go-gitea/gitea/issues/4109#issuecomment-1527104992 Supports format: `#1234` `Org/Repo#1234` --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improve decryption failure message (#24573)wxiaoguang2023-05-072-16/+25
| | | | | | | | | | | | | | | | Help some users like #16832 #1851 There are many users reporting similar problem: if the SECRET_KEY mismatches, some operations (like 2FA login) only reports unclear 500 error and unclear "base64 decode error" log (some maintainers ever spent a lot of time on debugging such problem) The SECRET_KEY was not well-designed and it is also a kind of technical debt. Since it couldn't be fixed easily, it's good to add clearer error messages, then at least users could know what the real problem is. --------- Co-authored-by: delvh <dev.lh@web.de>
* Simplify template helper functions (#24570)wxiaoguang2023-05-076-21/+20
| | | | | | | | | | | | | | | | | | | | To avoid bloating the template helper functions, some functions could be provided by type methods. And the new code `data-line-type="{{.GetHTMLDiffLineType}}"` reads better than `data-line-type="{{DiffLineTypeToStr .GetType}}"` After the fix, screenshots (the same as before): <details> ![image](https://user-images.githubusercontent.com/2114189/236657918-20ce01e0-1192-443e-aeb4-6b3fe1aa2102.png) ![image](https://user-images.githubusercontent.com/2114189/236657950-ee19727f-a1fc-4133-afc7-e5d1a8c1783f.png) </details>
* Makefile: Use portable !, not GNUish -not, with find(1). (#24565)riastradh2023-05-071-1/+1
| | | | | fix https://github.com/go-gitea/gitea/issues/24564 Co-authored-by: Taylor R Campbell <campbell+gitea@mumble.net>
* Add org visibility label to non-organization's dashboard (#24558)Hester Gong2023-05-072-1/+7
|
* Sort users and orgs on explore by recency by default (#24279)techknowlogick2023-05-066-9/+33
| | | | | | | | | This gives more "freshness" to the explore page. So it's not just the same X users on the explore page by default, now it matches the same sort as the repos on the explore page. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Change `add_on` translation to `added_on` and include placeholder for the ↵Yarden Shoham2023-05-068-9/+8
| | | | | | | | | | | | | | | | | | | | | | | date (#24562) - Very similar to #24550 The correct thing to do is to translate the entire phrase into a single string. The previous translation assumed all languages have a space between the "added on" and the date (and that "added on" comes before the date). Some languages, like Hebrew, have no space between the "added on" and the date. For example: ```ini added_on=נוסף ב-%s ``` ("added" becomes נוסף, "on" is ב and when paired with a date we use a dash to connect ב with the date) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: delvh <dev.lh@web.de>
* Change `valid_until` translation to `valid_until_date` and include ↵Yarden Shoham2023-05-062-2/+2
| | | | | | | | | | | | | placeholder for the date (#24563) - Similar to #24550 - Similar to #24562 The correct thing to do is to translate the entire phrase into a single string. The previous translation assumed all languages have a space between the "valid until" and the date (and that "valid until" comes before the date). Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix docs failing the build on `main` (#24561)Yarden Shoham2023-05-061-2/+2
| | | | | | | | Regression from https://github.com/go-gitea/gitea/pull/23380 First failing build: https://drone.gitea.io/go-gitea/gitea/74565 https://github.com/go-gitea/gitea/actions/runs/4897332409/jobs/8745242395 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Improve wiki user title test (#24559)wxiaoguang2023-05-061-1/+4
| | | | | | The `..` should be covered by TestUserTitleToWebPath. Otherwise, if the random string is "..", it causes unnecessary failure in TestUserWebGitPathConsistency
* Fix incorrect user visibility (#24557)Zettat1232023-05-061-2/+2
| | | Fix #24555
* Change `join_on` translation to `joined_on` and include placeholder for the ↵Yarden Shoham2023-05-065-5/+5
| | | | | | | | | | | | | | | | date (#24550) The correct thing to do is to translate the entire phrase into a single string. The previous translation assumed all languages have a space between the "joined on" and the date (and that "joined on" comes before the date). Some languages, like Hebrew, have no space between the "joined on" and the date. For example: ```ini joined_on=נרשם ב-%s ``` ("joined" becomes נרשם, "on" is ב and when paired with a date we use a dash to connect ב with the date)