aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix push mirror, wrong timestamp format (#27153)Daniel Kilimnik2023-09-233-10/+16
| | | | | | | | | | | | | | | | | I noticed, that the push mirrors endpoint, is the only endpoint which returns the times in long format rather than as time.Time(). I think the behavior should be consistent across the project. ---- ## ⚠️ BREAKING ⚠️ This PR changes the time format used in API responses for all push_mirror endpoints which return a push mirror. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Allow copying issue comment link on archived repos and when not logged in ↵JakobDev2023-09-233-13/+13
| | | | | (#27193) Fixes https://codeberg.org/Codeberg/Community/issues/1303
* fix: text decorator on issue sidebar menu label (#27206)metiftikci2023-09-231-1/+1
| | | fix underline for label on issue sidebar
* Update JS and Poetry dependencies and eslint (#27200)silverwind2023-09-227-546/+637
| | | | | | | - 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
* Remove some dead code (#27196)wxiaoguang2023-09-222-4/+0
| | | Some code is not in use any more, remove them.
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-221-1/+22
|
* Updates to the API for archived repos (#27149)JakobDev2023-09-2122-34/+249
|
* Fix release URL in webhooks (#27182)John Olheiser2023-09-219-9/+9
|
* Fix dropdown icon position (#27175)wxiaoguang2023-09-2116-35/+33
| | | | | | 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
* Fix repo sub menu (#27169)wxiaoguang2023-09-212-3/+3
| | | Fix #27166
* Fix review request number and add more tests (#27104)Nanguan Lin2023-09-2112-23/+115
| | | | | | | | | | | | | | | | | | | | | 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: CaiCandong <50507092+CaiCandong@users.noreply.github.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix the variable regexp pattern on web page (#27161)Nanguan Lin2023-09-211-1/+1
| | | same as (https://github.com/go-gitea/gitea/pull/26910)
* Fix organization field being null in POST /orgs/{orgid}/teams (#27150)Dionysios Kakouris2023-09-211-1/+1
| | | | | | | | | | | | | 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`).
* Add index to `issue_user.issue_id` (#27154)JakobDev2023-09-213-1/+19
| | | | | | | | | | | | 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) ```
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-211-0/+8
|
* Start development on Gitea 1.22 (#27155)v1.22.0-devdelvh2023-09-200-0/+0
|
* 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
* Fix NPE when editing OAuth2 applications (#27078)JakobDev2023-09-161-3/+3
| | | | | | | | | Fixes #27072 It looks like there are some cases where `ContextUser` is not set here --------- Co-authored-by: techknowlogick <matti@mdranta.net>
* Use `print` instead of `printf` (#27093)KN4CK3R2023-09-167-23/+23
| | | A bit more performant when we only use it for appending strings.
* Add tests for db indexer in indexer_test.go (#27087)Nanguan Lin2023-09-161-131/+324
| | | | | | | | | | | | | | | | | | | | As described in the title. Some points: 1. Why need those tests? Because `buildIssueOverview` is not well tested, there are several continuous bugs in the issue overview webpage. 2. Why in indexer_test.go? It's hard to put those tests in `./modules/indexer/issue/db/db_test.go` because those tests need 'real' data in db mocked by fixtures instead of random data in `./modules/indexer/issue/internal/tests`. When using 'real' data(`unittest.PrepareTestDatabase`), `InitIssueIndexer` and the package `init()` function of `indexer` are required to init indexer. 3. Why only db? The other three indexer engines are well tested by random data and it's okay to also test them with 'real' data in db mocked by fixtures. Any follow-up PR is welcome. 4. Those tests are really basic, any more complicated tests are welcome. 5. I think it's also necessary to add tests in `TestAPISearchIssues` in`api_test_issue.go` and `TestIssues` in `home_test.go`
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-1627-326/+219
|
* Allow empty Conan files (#27092)KN4CK3R2023-09-151-7/+2
| | | | | | | Fixes #27090 Looks like the Conan upload process has changed since last year. The empty uploads don't occur anymore.