summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use mask-based fade-out effect for `.new-menu` (#27181) (#27243)Giteabot2023-09-253-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #27181 by @silverwind The `.new-menu` was using a pseudo-element based fade-out effect. Replace this with a more modern mask-based effect which in this case required a child element to avoid fading out the background as well, so I applied it to child `new-menu-inner` which was present on all these menus except explore where I added it. There is no visual difference except that the items on the explore page have no `gap` between them any longer, making it consistent with other menus. Before and after: <img width="221" alt="Screenshot 2023-09-21 at 21 13 19" src="https://github.com/go-gitea/gitea/assets/115237/b4a38ce2-cee1-4c54-84a5-e1d0bfd79e29"> <img width="222" alt="Screenshot 2023-09-21 at 21 32 36" src="https://github.com/go-gitea/gitea/assets/115237/bb6b1335-d935-4ad4-bb85-3b0fc3027c2b"> Also, this cleans up the related CSS vars: - `--color-header-wrapper-transparent` is removed, no longer needed - `--color-header-wrapper` is defined in base theme as well, was previously unset and therefor transparent. [no whitespace diff](https://github.com/go-gitea/gitea/pull/27181/files?diff=unified&w=1) [demo of mask fade](https://jsfiddle.net/silverwind/tsfadb3u/) Co-authored-by: silverwind <me@silverwind.io>
* Add missing public user visibility in user details page (#27246) (#27250)Giteabot2023-09-251-0/+1
| | | | | | | | | | | | | | | Backport #27246 by @yp05327 It seems that `Public` user visibility is missing in the template. Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/a8e7f3e0-1b77-41a0-921a-10adba90211e) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/b0bffe13-0ca6-453e-95d7-0794528d5733) Co-authored-by: yp05327 <576951401@qq.com>
* cleanup locale function usage (#27227) (#27240)Giteabot2023-09-2549-133/+121
| | | | | | | | | | | | | | | Backport #27227 by @denyskon Throughout the Gitea codebase, you can meet some weird constructions to make `locale.Tr` work in subtemplates. Since we now have `ctx.Locale.Tr` which solves that problem, clean up various templates which pass `locale` through `dict` or use some weird constructions like `$.root.locale` Going on, it would be great to replace every case of `$.locale.Tr` and `.locale.Tr` with `ctx.Locale.Tr`, but that needs to be done with patience. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Fix z-index on markdown completion (#27237) (#27239)Giteabot2023-09-241-0/+1
| | | | | | | Backport #27237 by @silverwind Fixes: https://github.com/go-gitea/gitea/issues/27230 Co-authored-by: silverwind <me@silverwind.io>
* Fix EOL handling in web editor (#27141) (#27234)Giteabot2023-09-243-6/+22
| | | | | | | | | | | | | Backport #27141 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/27136. This does the following for Monaco's EOL setting: 1. Use editorconfig setting if present 2. Use the file's dominant line ending as detected by monaco, which uses LF for empty file Co-authored-by: silverwind <me@silverwind.io>
* Update database-preparation and add note re: MariaDB (#27232) (#27236)Giteabot2023-09-251-3/+3
| | | | | | | | Backport #27232 by @techknowlogick update DB docs per feedback. https://gitea.com/gitea/gitea-docusaurus/issues/69 Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Allow copying issue comment link on archived repos and when not logged in ↵Giteabot2023-09-243-13/+13
| | | | | | | | | (#27193) (#27210) Backport #27193 by @JakobDev Fixes https://codeberg.org/Codeberg/Community/issues/1303 Co-authored-by: JakobDev <jakobdev@gmx.de>
* fix issues on action runners page (#27226) (#27233)Giteabot2023-09-244-26/+20
| | | | | | | | | | | | | | Backport #27226 by @denyskon - switch from some weird status badge to label - translate untranslated `Reset registration token` string - change documentation link from act_runner README to Gitea Docs site - fix "No runners available" message width - use `ctx.Locale.Tr` where possible ![grafik](https://github.com/go-gitea/gitea/assets/47871822/65547228-f9ed-4f80-9cfd-df5e55513a44) Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Fix Fomantic UI dropdown icon bug when there is a search input in menu ↵Giteabot2023-09-242-0/+4
| | | | | | | | | | | (#27225) (#27228) Backport #27225 by @wxiaoguang Fix #27224 And add the case to the devtest page. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Quote table `release` in sql queries (#27205) (#27218)Giteabot2023-09-232-6/+6
| | | | | | | | | | | | | | Backport #27205 by @KN4CK3R Fixes #27174 `release` is a reserved keyword in MySql. I can't reproduce the issue on my setup and we have a test for that code but it seems there can be setups where it fails. https://github.com/go-gitea/gitea/blob/a101dbaa7952e359843c6d8303ca24a0e63c865c/tests/integration/repo_activity_test.go#L45-L46 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Update go-enry to 2.8.5 (#27215) (#27217)Giteabot2023-09-232-3/+3
|
* Update nodejs installation method in release container (#27207) (#27212)Giteabot2023-09-231-1/+4
| | | | | | | | | Backport #27207 by @silverwind Nodesource has [deprecated](https://github.com/nodesource/distributions#new-update-%EF%B8%8F) their install script, so use this new [manual method](https://github.com/nodesource/distributions#installation-instructions) instead.
* fix: text decorator on issue sidebar menu label (#27206) (#27209)Giteabot2023-09-231-1/+1
| | | | | | | Backport #27206 by @metiftikci fix underline for label on issue sidebar Co-authored-by: metiftikci <metiftikci@hotmail.com>
* Update JS and Poetry dependencies and eslint (#27200) (#27201)Giteabot2023-09-227-546/+637
| | | | | | | | | | | Backport #27200 by @silverwind - Update all JS and Poetry dependencies - Remove deprecated `eslint-plugin-custom-elements` and replace it with rules from `eslint-plugin-wc` - Add a convenience `make update` to update both js and py dependencies - Tested markdown toolbar, swagger and citation Co-authored-by: silverwind <me@silverwind.io>
* Fix release URL in webhooks (#27182) (#27185)Giteabot2023-09-219-9/+9
| | | | | | | | | | | | Backport #27182 by @jolheiser Resolves #27180 `URL` points to the API URL, `HTMLURL` points to the web page. Notably, however, for PRs they are the same URL. I switched them to use HTMLURL to match the rest of the codebase terminology. Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix review request number and add more tests (#27104) (#27168)Giteabot2023-09-2112-23/+115
| | | | | | | | | | | | | | | | | | | | | Backport #27104 by @lng2020 fix #27019 ## testfixture yml 1. add issue20(a pr issue) in repo 23, org 17 2. add user15 to team 9 3. add four reviews about issue20 ## test case add two tests that are described with code comments the code before pr #26784 failed the first test <img width="479" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/1d9b5787-11b4-4c4d-931f-6a9869547f35"> current code failed the second test(as mentioned in #27019) <img width="484" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/05608055-7587-43d1-bae1-92c688270819"> Any advice is appreciated. Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com> Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix dropdown icon position (#27175) (#27177)Giteabot2023-09-2116-35/+33
| | | | | | | | | | Backport #27175 by @wxiaoguang According to https://fomantic-ui.com/modules/dropdown.html and our "devtest" page, many dropdown elements has incorrect "icon" position. This PR fixes all of them. Fix #27173 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix repo sub menu (#27169) (#27170)Giteabot2023-09-212-3/+3
| | | | | | | Backport #27169 by @wxiaoguang Fix #27166 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the variable regexp pattern on web page (#27161) (#27164)Giteabot2023-09-211-1/+1
| | | | | | | Backport #27161 by @lng2020 same as (https://github.com/go-gitea/gitea/pull/26910) Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Fix organization field being null in POST /orgs/{orgid}/teams (#27150) (#27163)Giteabot2023-09-211-1/+1
| | | | | | | | | | | | | | | | | Backport #27150 by @memphis88 Similarly to the fix in https://github.com/go-gitea/gitea/pull/24694, this addresses the team creation not returning the organization information in the response. This fix is connected to the [issue](https://gitea.com/gitea/terraform-provider-gitea/issues/27) discovered in the terraform provider. Moreover, the [documentation](https://docs.gitea.com/api/1.20/#tag/organization/operation/orgCreateTeam) suggests that the response body should include the `organization` field (currently being `null`). Co-authored-by: Dionysios Kakouris <1369451+memphis88@users.noreply.github.com>
* Add index to `issue_user.issue_id` (#27154) (#27158)Giteabot2023-09-213-1/+19
| | | | | | | | | | | | | | | | Backport #27154 by @JakobDev This fixes a performance bottleneck. It was discovered by Codeberg. Every where query on that table (which has grown big over time) uses this column, but there is no index on it. See this part of the log which was posted on Matrix: ``` 2023/09/10 00:52:01 ...rs/web/repo/issue.go:1446:ViewIssue() [W] [Slow SQL Query] UPDATE `issue_user` SET is_read=? WHERE uid=? AND issue_id=? [true x y] - 51.395434887s 2023/09/10 00:52:01 ...rs/web/repo/issue.go:1447:ViewIssue() [E] ReadBy: Error 1205 (HY000): Lock wait timeout exceeded; try restarting transaction 2023/09/10 00:52:01 ...eb/routing/logger.go:102:func1() [I] router: completed GET /Codeberg/Community/issues/1201 for [::ffff:xxx]:0, 500 Internal Server Error in 52384.2ms @ repo/issue.go:1256(repo.ViewIssue) ``` Co-authored-by: JakobDev <jakobdev@gmx.de>
* Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152)v1.21.0-rc0delvh2023-09-201-1/+1
| | | | A function should not return an error when it is successful. Otherwise, things like https://discord.com/channels/322538954119184384/322538954119184384/1153705341620600833 happen…
* Improve actions docs related to `pull_request` event (#27126)Zettat1232023-09-202-0/+6
| | | | | | Related to #27039 The `ref` property in Gitea Actions is different from GitHub Actions. This PR improves the documentation to explain the difference.
* Remove outdated paragraphs when comparing Gitea Actions to GitHub Actions ↵delvh2023-09-202-20/+14
| | | | | | | | | (#27119) No backport needed as this new state only applies to 1.21+ --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix: treat tab "overview" as "repositories" in user profiles without readme ↵hazy2023-09-201-1/+2
| | | | | | | | | | | | | | | | (#27124) Beginning since 2af30f715e64dbb0a3900168e3768ffb36c06392, Gitea has a 500 error when visiting a user profile with `?tab=overview` in the URL when the user doesn't have a `.profile/README.md`, because the backend code assumes that if the tab is overview a profile repository must exist, and checks that the repository is nil aren't done. In this PR I treat `?tab=overview` the same as if no tab is set in the URL, which corrects this behaviour- Now, when visiting `?tab=overview`, if `.profile/README.md` exists on that user's profile it'll show that as it should, otherwise it'll show the repositories tab. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix incorrect test code for error handling (#27139)wxiaoguang2023-09-201-4/+12
| | | | If `assert.NoError` fails, it should return. Otherwise the code could still execute even if the error occurs.
* Increase auth provider icon size on login page (#27122)silverwind2023-09-196-12/+14
| | | | | | | | | | | | | | | | | | Before, 20px: <img width="474" alt="Screenshot 2023-09-19 at 00 10 05" src="https://github.com/go-gitea/gitea/assets/115237/4bed4edb-219d-4844-9d3c-0d747033b09f"> After, 28px: <img width="576" alt="Screenshot 2023-09-19 at 00 20 40" src="https://github.com/go-gitea/gitea/assets/115237/f482ac09-38ae-4c84-80d9-0bd39b7f9772"> Dropdown in account settings is unchanged at 20px: <img width="157" alt="Screenshot 2023-09-19 at 00 09 11" src="https://github.com/go-gitea/gitea/assets/115237/9c998cdf-eeed-4118-9262-664faaa56092"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* fix pagination for followers and following (#27127)Earl Warren2023-09-191-2/+2
| | | | | | | | | | | - Use the correct total amount for pagination. Thereby correctly show the pagination bare when there's more than one page of followers/followings. Refs: https://codeberg.org/forgejo/forgejo/pulls/1477 (cherry picked from commit c1a136318be3bf72511bed108f2d67f2cf34e1b8) Co-authored-by: Gusted <postmaster@gusted.xyz>
* services/wiki: Close() after error handling (#27129)Earl Warren2023-09-191-2/+2
| | | | | | | | Refs: https://codeberg.org/forgejo/forgejo/pulls/1385 Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com> (cherry picked from commit 589e7d346f51de4a0e2c461b220c8cad34133b2f) Co-authored-by: Lars Lehtonen <lars.lehtonen@gmail.com>
* Use fetch helpers instead of fetch (#27026)silverwind2023-09-1917-98/+70
| | | | | | | | | | | | WIP because: - [x] Some calls set a `content-type` but send no body, can likely remove the header - [x] Need to check whether `charset=utf-8` has any significance on the webauthn calls, I assume not as it is the default for json content. - [x] Maybe `no-restricted-globals` is better for eslint, but will require a lot of duplication in the yaml or moving eslint config to a `.js` extension. - [x] Maybe export `request` as `fetch`, shadowing the global.
* Change green buttons to primary color (#27099)silverwind2023-09-18108-176/+183
| | | | | | | | | | | | | | | | | | | | | | | | I think it's better if the primary actions have primary color instead of green which fits better into the overall single-color UI design. This PR currently replaces every green button with primary: <img width="141" alt="Screenshot 2023-09-16 at 14 07 59" src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe"> <img width="161" alt="Screenshot 2023-09-16 at 14 07 51" src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1"> Modal actions now use uncolored/primary instead of previous green/red colors. I also removed the box-shadow on all basic buttons: <img width="259" alt="Screenshot 2023-09-16 at 14 16 39" src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490"> <img width="261" alt="Screenshot 2023-09-16 at 14 17 42" src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88"> The change currently includes the "Merge PR" button, for which we might want to make an exception to match the icon color there: <img width="442" alt="Screenshot 2023-09-16 at 14 33 53" src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b">
* Fix wrong xorm get usage on migration (#27111)Lunny Xiao2023-09-181-19/+14
| | | | | | | | | | | | | | | | | | Fix the bug on try.gitea.io ```log 2023/09/18 01:48:41 ...ations/migrations.go:635:Migrate() [I] Migration[276]: Add RemoteAddress to mirrors 2023/09/18 01:48:41 routers/common/db.go:34:InitDBEngine() [E] ORM engine initialization attempt #7/10 failed. Error: migrate: migration[276]: Add RemoteAddress to mirrors failed: exit status 128 - fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). - fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). ``` Caused by #26952 --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Fix the incorrect route path in the user edit page. (#27007)CaiCandong2023-09-181-4/+4
| | | | | | | | | Regression of #26713 After #26713 , the base path of user edit has been changed to `/admin/users/{userid}/edit` ## Before https://github.com/go-gitea/gitea/assets/50507092/5f4a3f64-fe2b-4499-b110-e01c9d87ea19
* Refactor lfs requests (#26783)Chongyi Zheng2023-09-186-135/+124
| | | | | | | | | | | | | | - Refactor lfs request code - The original code uses `performRequest` function to create the request, uses a callback to modify the request, and then send the request. - Now it's replaced with `createRequest` that only creates request and `performRequest` that only sends the request. - Reuse `createRequest` and `performRequest` in `http_client.go` and `transferadapter.go` --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Display archived labels specially when listing labels (#26820)puni98692023-09-186-19/+32
| | | | | | | | | | | | | | Follow up https://github.com/go-gitea/gitea/pull/26741 Changes: Added archived label for org labels and added into issue filter list. Part of https://github.com/go-gitea/gitea/issues/25237 --------- Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove a `gt-float-right` and some unnecessary helpers (#27110)wxiaoguang2023-09-182-56/+35
| | | | | | | | Follow Remove polluted .ui.right #26825 Remove more `gt-float-right`, remove unnecessary helpers, remove negative margin tricks. ![image](https://github.com/go-gitea/gitea/assets/2114189/2785c6e6-7823-4699-a4f3-184eef50ceda)
* [skip ci] Updated licenses and gitignoresGiteaBot2023-09-189-4/+164
|
* Fix token endpoints ignore specified account (#27080)CaiCandong2023-09-184-4/+52
| | | | | | | | | Fix #26234 close #26323 close #27040 --------- Co-authored-by: silverwind <me@silverwind.io>
* Make SSPI auth mockable (#27036)wxiaoguang2023-09-179-76/+72
| | | | | | Before, the SSPI auth is only complied for Windows, it's difficult to test and it breaks a lot. Now, make the SSPI auth mockable and testable.
* Search branches (#27055)Lunny Xiao2023-09-175-4/+24
| | | | | | | | | Resolve #25233 <img width="1315" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/3ba59b58-471a-4e1b-985c-87edac2268c0"> <img width="1297" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/b6caa12f-323b-4f70-9c44-ef91cb71a26c">
* Fix wrong migration for email address (#27106)Lunny Xiao2023-09-171-18/+70
| | | | | On Iterate, `sess` should not be used in the closure function body. Caused by #26952
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-171-15/+17
|
* Support `.git-blame-ignore-revs` file (#26395)KN4CK3R2023-09-1619-52/+306
| | | | | | | | | | | | | | | | | Closes #26329 This PR adds the ability to ignore revisions specified in the `.git-blame-ignore-revs` file in the root of the repository. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/9e91be0c-6e9c-431c-bbe9-5f80154251c8) The banner is displayed in this case. I intentionally did not add a UI way to bypass the ignore file (same behaviour as Github) but you can add `?bypass-blame-ignore=true` to the url manually. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add `RemoteAddress` to mirrors (#26952)KN4CK3R2023-09-1613-53/+194
| | | | | This PR adds a new field `RemoteAddress` to both mirror types which contains the sanitized remote address for easier (database) access to that information. Will be used in the audit PR if merged.
* Upgrading the actions/checkout@4 (#27096)puni98692023-09-167-25/+25
| | | | | | | as title ..Upgrading the actions/checkout@4 Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Next round of `db.DefaultContext` refactor (#27089)JakobDev2023-09-1690-464/+434
| | | Part of #27065
* Ui correction in mobile view nav bar left aligned items. (#27046)puni98692023-09-161-1/+0
| | | | | | | | | | | | | | | | | As title From the long time I was looking for this UI, Now its the time to fix it. Before <img width="252" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/963f2cb4-5cfd-4a14-ab85-88e25c3daef5"> <img width="502" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/58453ef1-2555-4568-95d0-5293055b33b8"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add missing deps to files-changed (#27100)silverwind2023-09-163-32/+37
| | | | | | | The `docs` and `yaml` actions categories need to run when the dependencies `markdownlin-cli` or `yamllint` change, so add those to the list of dependencies for these actions. Fixes: https://github.com/go-gitea/gitea/issues/27098
* Use db.WithTx for AddTeamMember to avoid ctx abuse (#27095)wxiaoguang2023-09-161-48/+48
| | | | Compare with ignoring spaces: https://github.com/go-gitea/gitea/pull/27095/files?diff=split&w=1
* Drop Node.js 16 and update js dependencies (#27094)Chongyi Zheng2023-09-1611-152/+231
| | | | | | | | | - Drop Node.js 16 since it reached EOL - Upgrade js dependencies - Two packages have major version bump - `updates`: require node 18 - `eslint-plugin-array-func`: require `eslint` 8.40.0, which is satisfied - Run `make svg` for `@primer/octicons` update