aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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.
* Actions are no longer experimental, so enable them by default (#27054)Lunny Xiao2023-09-154-4/+4
| | | | This PR makes the actions enabled by default, so people will find it easier to enable actions in repository setting.
* Update brew installation documentation since gitea moved to brew core ↵Lunny Xiao2023-09-154-4/+0
| | | | | package (#27070) ref: https://gitea.com/gitea/homebrew-gitea/pulls/178
* More refactoring of `db.DefaultContext` (#27083)JakobDev2023-09-1583-320/+336
| | | Next step of #27065
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-151-0/+4
|
* Reduce usage of `db.DefaultContext` (#27073)JakobDev2023-09-1483-324/+339
| | | | | | | | | | | | | | Part of #27065 This reduces the usage of `db.DefaultContext`. I think I've got enough files for the first PR. When this is merged, I will continue working on this. Considering how many files this PR affect, I hope it won't take to long to merge, so I don't end up in the merge conflict hell. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove the useless function `GetUserIssueStats` and move relevant tests to ↵Nanguan Lin2023-09-143-315/+82
| | | | | | | | | | | | | | | | | | | `indexer_test.go` (#27067) Since the issue indexer has been refactored, the issue overview webpage is built by the `buildIssueOverview` function and underlying `indexer.Search` function and `GetIssueStats` instead of `GetUserIssueStats`. So the function is no longer used. I moved the relevant tests to `indexer_test.go` and since the search option changed from `IssueOptions` to `SearchOptions`, most of the tests are useless now. We need more tests about the db indexer because those tests are highly connected with the issue overview webpage and now this page has several bugs. Any advice about those test cases is appreciated. --------- Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix issue templates when blank isses are disabled (#27061)JakobDev2023-09-142-11/+14
| | | | | | | | Fixes #27060 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Display all user types and org types on admin management UI (#27050)Lunny Xiao2023-09-146-4/+32
| | | | | | | | | | Follow #24026 <img width="1049" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/d3fc5159-b5e7-411a-b6f8-4a111a027e6b"> --------- Co-authored-by: delvh <dev.lh@web.de>
* Apply lng2020 to maintainers (#27068)Nanguan Lin2023-09-141-0/+1
| | | | | | | | | Hi all, I've very much enjoyed working on Gitea and was hoping to make it official by requesting maintainership. My [merged PRs list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3Alng2020+is%3Amerged)
* Fix incorrect default branch label while switching between branches (#27053)yp053272023-09-142-9/+9
| | | Fix #27008
* set version in snapcraft yamltechknowlogick2023-09-131-1/+1
|
* Replace 'userxx' with 'orgxx' in all test files when the user type is org ↵Nanguan Lin2023-09-1491-280/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27052) Currently 'userxx' and 'orgxx' are both used as username in test files when the user type is org, which is confusing. This PR replaces all 'userxx' with 'orgxx' when the user type is org(`user.type==1`). Some non-trivial changes 1. Rename `user3` dir to `org3` in `tests/git-repositories-meta` 2. Change `end` in `issue reference` because 'org3' is one char shorter than 'user3' ![ksnip_20230913-112819](https://github.com/go-gitea/gitea/assets/70063547/442988c5-4cf4-49b8-aa01-4dd6bf0ca954) 3. Change the search result number of `user/repo2` because `user3/repo21` can't be searched now ![ksnip_20230913-112931](https://github.com/go-gitea/gitea/assets/70063547/d9ebeba4-479f-4110-9a85-825efbc981fd) 4. Change the first org name getting from API because the result is ordered by alphabet asc and now `org 17` is before `org25` ![JW8U7NIO(J$H _YCRB36H)T](https://github.com/go-gitea/gitea/assets/70063547/f55a685c-cf24-40e5-a87f-3a2327319548) ![)KFD411O4I8RB5ZOH7E0 Z3](https://github.com/go-gitea/gitea/assets/70063547/a0dc3299-249c-46f6-91cb-d15d4ee88dd5) Other modifications are just find all and replace all. Unit tests with SQLite are all passed. --------- Co-authored-by: caicandong <1290147055@qq.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-141-0/+3
|
* Load reviewer before sending notification (#27063)sebastian-sauer2023-09-131-0/+3
| | | | | | | | The [template](https://github.com/go-gitea/gitea/blob/main/templates/mail/issue/default.tmpl#L51) uses the Reviewer.Name property - this was not loaded. Fixes #27035
* bump all nightly builds to 16gbtechknowlogick2023-09-131-3/+3
|
* Show the repo count in code tab on both user profile and org page. (#27048)puni98692023-09-131-0/+5
| | | | | | | | | | | | | | | | | | | | | as title Screenshot before User Profile page <img width="1367" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/24e79689-ba2f-4c85-b591-fe5621746965"> after <img width="1346" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/754a7ee8-c2f0-424d-9ba8-be38a48140aa"> Org page <img width="1354" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/c96178d8-664f-45c5-a162-f4df5690d9d0"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix Fomantic's line-height causing vertical scrollbars to appear (#26961)Kerwin Bryant2023-09-132-1/+11
| | | | | | | | | | | | | | | | | | Before: ![before](https://github.com/go-gitea/gitea/assets/3371163/bc5a3b20-3490-4e14-ab1d-2fcfbc4a2e20) After: ![after](https://github.com/go-gitea/gitea/assets/3371163/70e8be6a-11a2-46af-9e1e-78ac153cd2a4) --- 1. **Remove the scroll bar exception that in the a tag** 2. **Reduce the actual width of the a tag to the actual width of the content** ![c363a5b5883e105a0c65d7337893b50](https://github.com/go-gitea/gitea/assets/3371163/789d9b83-ad14-46d2-8a1b-df551a063f6a) As shown in the screenshot, the red box area should not be clickable
* Dashboard context dropdown position fix on landing page in mobile view. (#27047)puni98692023-09-131-6/+0
| | | | | | | | | | | | | as title. Screensots before ![image](https://github.com/go-gitea/gitea/assets/80308335/d72da379-1fb1-4d75-9f3e-f70e06ad4065) after ![image](https://github.com/go-gitea/gitea/assets/80308335/110ea806-feed-4947-bf56-2985b1e1ec5f)
* fix media description render for orgmode (#26895)Earl Warren2023-09-132-9/+34
| | | | | | | | | | | | | | | - In org mode you can specify an description for media via the following syntax `[[description][media link]]`. The description is then used as title or alt. - This patch fixes the rendering of the description by seperating the description and non-description cases and using `org.String()`. - Added unit tests. - Inspired by https://github.com/niklasfasching/go-org/blob/6eb20dbda93cb88c3503f7508dc78cbbc639378f/org/html_writer.go#L406-L427 - Resolves https://codeberg.org/Codeberg/Community/issues/848 (cherry picked from commit 8b8aab83113b34bade61964e2097ed497abc39e9) Co-authored-by: Gusted <postmaster@gusted.xyz>
* Show OpenID Connect and OAuth on signup page (#20242)Dmitry Sharshakov2023-09-134-0/+41
| | | | | | | | Fix #19809 --------- Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: jackHay22 <jack@allspice.io>
* Update status and code index after changing the default branch (#27018)Nanguan Lin2023-09-138-52/+97
| | | | | | | | | | | Fix #26723 Add `ChangeDefaultBranch` to the `notifier` interface and implement it in `indexerNotifier`. So when changing the default branch, `indexerNotifier` sends a message to the `indexer queue` to update the index. --------- Co-authored-by: techknowlogick <matti@mdranta.net>
* add sparse url in cargo package guide (#26937)merlleu2023-09-133-5/+14
| | | | | | | | | | | | | | Hello, The current package guide for cargo gives you only the git index, with the HTTP Index stabilized being used as default for crates.io and being better for most use-cases. However, it's not documented that gitea supports the sparse spec, and it does not require the _crates-index git repo for the sparse api. I personally think we should push users to use the sparse instead of the git repository. (Even let users disable crates-index repos if they only want to use sparse)
* Add missing 404 response to Swagger (#27038)JakobDev2023-09-1346-0/+750
| | | | | Most middleware throw a 404 in case something is not found e.g. a Repo that is not existing. But most API endpoints don't include the 404 response in their documentation. This PR changes this.
* Fix object storage path handling (#27024)wxiaoguang2023-09-132-14/+48
| | | | | | Object storage path rules: * No single `/` or `.`, use empty string for root path * Need to use trailing `/` for a list prefix to distinguish a "dir/"
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-131-0/+22
|
* bump rootful to 16gbtechknowlogick2023-09-121-1/+1
|
* setup go in the nightly release pipelinetechknowlogick2023-09-121-0/+8
|
* Speed up nightly builds (#27045)techknowlogick2023-09-122-1/+37
| | | | | | | * Rootless/ful docker images build separately * Vendor go modules outside docker to speed up the build Thanks to Alex Ellis for these suggestions (and actuated runner build time)
* Improve repo/user/org search (#27030)wxiaoguang2023-09-123-10/+4
| | | | | | | | | | | | | | | * Fix a regression from #26809 (the `data-org` is missing) * Remove unnecessary style Screenshots: ![image](https://github.com/go-gitea/gitea/assets/2114189/3f5cf628-db7f-4705-898a-7a4a1fbfbba8) ![image](https://github.com/go-gitea/gitea/assets/2114189/453d1fad-1090-4524-bf45-6c5da2465f04) ![image](https://github.com/go-gitea/gitea/assets/2114189/f14d9808-7596-42c8-84b4-0d57a0bf2278)
* Use Actuated.dev runner for nightly buildstechknowlogick2023-09-121-2/+2
|
* update snap package (#27021)Sienna Lloyd2023-09-122-5/+7
|