aboutsummaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* refactor: remove redundant err declarations (#32381)Oleksandr Redko2024-10-305-5/+0
|
* Respect UI.ExploreDefaultSort setting again (#32357)65432024-10-302-2/+4
| | | | | | fix regression of https://github.com/go-gitea/gitea/pull/29430 --- *Sponsored by Kithara Software GmbH*
* Suggestions for issues (#32327)Anbraten2024-10-292-0/+94
| | | closes #16872
* Refactor the DB migration system slightly (#32344)wxiaoguang2024-10-271-1/+1
| | | | Introduce "idNumber" for each migration, and clarify the difference between the migration ID number and database version.
* Fix disable 2fa bug (#32320)Lunny Xiao2024-10-231-3/+6
|
* Make admins adhere to branch protection rules (#32248)Tim2024-10-232-0/+6
| | | | | | | | | | | | This introduces a new flag `BlockAdminMergeOverride` on the branch protection rules that prevents admins/repo owners from bypassing branch protection rules and merging without approvals or failing status checks. Fixes #17131 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for ↵Zettat1232024-10-227-30/+36
| | | | | | | | | | | | explore pages and fix an issue related to user search (#32288) These settings can allow users to only display the repositories explore page. Thanks to yp05327 and wxiaoguang ! --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* API: enhance SearchIssues swagger docs (#32208)65432024-10-191-19/+32
| | | | | | | this will result in better api clients generated out of the openapi docs ... for SearchIssues --- *Sponsored by Kithara Software GmbH*
* Make `owner/repo/pulls` handlers use "PR reader" permission (#32254)wxiaoguang2024-10-151-26/+29
| | | Fix #32253 (partially)
* Make git push options accept short name (#32245)wxiaoguang2024-10-121-1/+1
| | | | | Just like what most CLI parsers do: `--opt` means `opt=true` Then users could use `-o force-push` as `-o force-push=true`
* Allow maintainers to view and edit files of private repos when "Allow ↵Zettat1232024-10-111-2/+0
| | | | | maintainers to edit" is enabled (#32215) Fix #31539
* Use per package global lock for container uploads instead of memory lock ↵Lunny Xiao2024-10-111-8/+18
| | | | | | (#31860) This PR uses a per-package lock instead of a global lock for container uploads. So that different packages can be uploaded simultaneously.
* Move admin routers from /admin to /-/admin (#32189)Lunny Xiao2024-10-1019-48/+48
| | | | | | | Resolve #32181 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor CSRF token (#32216)wxiaoguang2024-10-102-5/+7
|
* Fix incorrect "Target branch does not exist" in PR title (#32222)Zettat1232024-10-101-1/+1
|
* Fix bug when a token is given public only (#32204)Lunny Xiao2024-10-086-51/+111
|
* Allow filtering PRs by poster in the ListPullRequests API (#32209)65432024-10-071-9/+33
| | | | | | as title --- *Sponsored by Kithara Software GmbH*
* Enhance USER_DISABLED_FEATURES to allow disabling change username or full ↵Zisu Zhang2024-10-051-1/+15
| | | | | | | | | | | | | | | name (#31959) Fix #31958 Enhanced `USER_DISABLED_FEATURES`(also `EXTERNAL_USER_DISABLE_FEATURES`) option in `[admin]` section. Added following values: - `change_username`: Disable change username - `change_full_name`: Disable change full name --- Progress: - [x] Update code - [x] Update translations
* Add support for searching users by email (#30908)yp053272024-10-041-5/+6
| | | | | | | Fix #30898 we have an option `SearchByEmail`, so enable it, then we can search user by email. Also added a test for it.
* Fix PR creation on forked repositories (#31863)Job2024-10-041-3/+14
| | | Resolves #20475
* Fix javascript error when an anonymous user visiting migration page (#32144)Lunny Xiao2024-10-023-54/+45
| | | | | | | | | | | | This PR fixes javascript errors when an anonymous user visits the migration page. It also makes task view checking more restrictive. The router moved from `/user/task/{id}/status` to `/username/reponame/-/migrate/status` because it's a migrate status. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make oauth2 code clear. Move oauth2 provider code to their own ↵Lunny Xiao2024-10-024-851/+674
| | | | | | packages/files (#32148) Fix #30266 Replace #31533
* Support repo license (#24872)yp053272024-10-0111-10/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close #278 Close #24076 ## Solutions: - Use [google/licenseclassifier](https://github.com/google/licenseclassifier/) Test result between [google/licensecheck](https://github.com/google/licensecheck) and [go-license-detector](https://github.com/go-enry/go-license-detector): https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167 Test result between [google/licensecheck](https://github.com/google/licensecheck) and [google/licenseclassifier](https://github.com/google/licenseclassifier/): https://github.com/go-gitea/gitea/pull/24872#issuecomment-1576092178 - Generate License Convert Name List to avoid import license templates with same contents Gitea automatically get latest license data from[ spdx/license-list-data](https://github.com/spdx/license-list-data). But unfortunately, some license templates have same contents. #20915 [click here to see the list](https://github.com/go-gitea/gitea/pull/24872#issuecomment-1584141684) So we will generate a list of these license templates with same contents and create a new file to save the result when using `make generate-license`. (Need to decide the save path) - Save License info into a new table `repo_license` Can easily support searching repo by license in the future. ## Screen shot Single License: ![image](https://github.com/go-gitea/gitea/assets/18380374/41260bd7-0b4c-4038-8592-508706cffa9f) Multiple Licenses: ![image](https://github.com/go-gitea/gitea/assets/18380374/34ce2f73-7e18-446b-9b96-ecc4fb61bd70) Triggers: - [x] Push commit to default branch - [x] Create repo - [x] Mirror repo - [x] When Default Branch is changed, licenses should be updated Todo: - [x] Save Licenses info in to DB when there's a change to license file in the commit - [x] DB Migration - [x] A nominal test? - [x] Select which library to use(https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167) - [x] API Support - [x] Add repo license table - ~Select license in settings if there are several licenses(Not recommended)~ - License board(later, not in this PR) ![image](https://github.com/go-gitea/gitea/assets/18380374/2c3c3bf8-bcc2-4c6d-8ce0-81d1a9733878) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Fix the logic of finding the latest pull review commit ID (#32139)Zettat1232024-10-011-1/+0
| | | Fix #31423
* Add pure SSH LFS support (#31516)ConcurrentCrab2024-09-272-9/+38
| | | | | | | | | Fixes #17554 /claim #17554 Docs PR https://gitea.com/gitea/docs/pulls/49 To test, run pushes like: `GIT_TRACE=1` git push. The trace output should mention "pure SSH connection".
* Notify the user when the file path contains leading or trailing spaces and ↵charles2024-09-241-1/+1
| | | | | fix the error message for invalid file names. (#31507) close #31478
* Display head branch more comfortable on pull request view (#32000)Lunny Xiao2024-09-241-1/+13
| | | | | | | | | | This PR do some minor improvements for head branch display on pull request view UI. - [x] Remove the link if the head branch has been deleted with a tooltip, so that users will not result in a 404 page - [x] Display a label if this pull request is an agit based one. ![图片](https://github.com/user-attachments/assets/872f26b6-f1cf-4427-9e41-e3a5b176dfa4)
* Allow set branch protection in an empty repository (#32095)Lunny Xiao2024-09-241-1/+1
|
* Fix bug in getting merged pull request by commit (#32079)Zettat1232024-09-242-3/+5
|
* Fix Bug in Issue/pulls list (#32081)cloudchamb3r2024-09-241-0/+1
| | | | | | | | | | | | | | | | fix #32080 ## After ### for opened issues <img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM" src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec"> ### for closed issues <img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM" src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482"> ### for all issues <img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM" src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169">
* Fix rename branch permission bug (#32066)Lunny Xiao2024-09-221-2/+1
| | | | | | The previous implementation requires admin permission to rename branches which should be write permission. Fix #31993
* Fix artifact v4 upload above 8MB (#31664)ChristopherHX2024-09-222-40/+156
| | | | | | | | | | | | Multiple chunks are uploaded with type "block" without using "appendBlock" and eventually out of order for bigger uploads. 8MB seems to be the chunk size This change parses the blockList uploaded after all blocks to get the final artifact size and order them correctly before calculating the sha256 checksum over all blocks Fixes #31354
* Fix wrong last modify time (#32102)Lunny Xiao2024-09-212-2/+5
|
* Fix upload maven pacakge parallelly (#31851)Lunny Xiao2024-09-211-0/+13
| | | | | | | Use globallock for maven package uploads. Thanks @tlusser for the test code. Depends on ~#31813~
* Fix incorrect `/tokens` api (#32085)KN4CK3R2024-09-201-0/+5
| | | | | | | | | | Fixes #32078 - Add missing scopes output. - Disallow empty scope. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor CSRF protector (#32057)wxiaoguang2024-09-181-0/+2
| | | | | | Remove unused CSRF options, decouple "new csrf protector" and "prepare" logic, do not redirect to home page if CSRF validation falis (it shouldn't happen in daily usage, if it happens, redirecting to home doesn't help either but just makes the problem more complex for "fetch")
* Included tag search capabilities (#32045)Bruno Sofiato2024-09-181-3/+13
| | | | | | | | | | | | | | | | | | | | | Resolves #31998 The first screenshot shows the tag page without any filter being applied: ![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb) The second one, shows the page when the given filter returns no tag: ![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e) The last one shows a single tag being filtered: ![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291) Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
* Use a common message template instead of a special one (#31878)Lunny Xiao2024-09-141-1/+1
|
* Check if the `due_date` is nil when editing issues (#32035)Zettat1232024-09-141-4/+10
|
* Handle invalid target when creating releases using API (#31841)Kemal Zebari2024-09-121-0/+3
| | | | | | | A 500 status code was thrown when passing a non-existent target to the create release API. This snapshot handles this error and instead throws a 404 status code. Discovered while working on #31840.
* Add option to filter board cards by labels and assignees (#31999)Lauris BH2024-09-129-25/+171
| | | | | | | | | | | | | | | Works in both organization and repository project boards Fixes #21846 Replaces #21963 Replaces #27117 ![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0) **Note** that implementation was made intentionally to work same as in issue list so that URL can be bookmarked for quick access with predefined filters in URL
* Failed authentications are logged to level Warning (#32016)Daniel2024-09-111-4/+4
| | | | | | | PR for issue #31968 Replaces PR #31983 to comply with gitea's error definition Failed authentications are now logged to level `Warning` instead of `Info`.
* Support migration from AWS CodeCommit (#31981)Zettat1232024-09-112-0/+8
| | | | | | | | | | | | | | | | | | | | This PR adds support for migrating repos from [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html). The access key ID and secret access key are required to get repository information and pull requests. And [HTTPS Git credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) are required to clone the repository. <img src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0" width="680" /> The AWS CodeCommit icon is from [AWS Architecture Icons](https://aws.amazon.com/architecture/icons/). <img src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d" width="320" />
* bump to go 1.23 (#31855)techknowlogick2024-09-105-5/+6
|
* Save initial signup information for users to aid in spam prevention (#31852)techknowlogick2024-09-094-4/+8
| | | | | | | | | | | | | | This will allow instance admins to view signup pattern patterns for public instances. It is modelled after discourse, mastodon, and MediaWiki's approaches. Note: This has privacy implications, but as the above-stated open-source projects take this approach, especially MediaWiki, which I have no doubt looked into this thoroughly, it is likely okay for us, too. However, I would be appreciative of any feedback on how this could be improved. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove SHA1 for support for ssh rsa signing (#31857)Wim2024-09-071-1/+1
| | | | | | | | | | | | https://github.com/go-fed/httpsig seems to be unmaintained. Switch to github.com/42wim/httpsig which has removed deprecated crypto and default sha256 signing for ssh rsa. No impact for those that use ed25519 ssh certificates. This is a breaking change for: - gitea.com/gitea/tea (go-sdk) - I'll be sending a PR there too - activitypub using deprecated crypto (is this actually used?)
* Distinguish official vs non-official reviews, add tool tips, and upgr… ↵william-allspice2024-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31924) This Pull Request is a follow up to https://github.com/go-gitea/gitea/pull/31886: 1. Adds a UI indicator between official (green) and unofficial (grey) approved pull requests on the Pull Request page (as suggested by @kdumontnu ) 2. Adds tooltips adding clarity to the type and status of a review on the Pull Request page (as suggested by @kdumontnu) 3. Updates text adding more clarity to required approvals (as suggested by @kdumontnu) 4. Updates text on the branch settings page explaining what branch approval limitations (as suggested by @yp05327) Official approval: <img width="376" alt="Screenshot 2024-08-26 at 1 03 52 PM" src="https://github.com/user-attachments/assets/500f083d-bfc0-45c5-82b7-b98e20495696"> Unofficial approval: <img width="442" alt="Screenshot 2024-08-26 at 12 53 15 PM" src="https://github.com/user-attachments/assets/e8c565ff-5886-4ce1-8b79-a0fa26c282f7"> Rejected approval: <img width="452" alt="Screenshot 2024-08-26 at 12 53 06 PM" src="https://github.com/user-attachments/assets/aebc0e2f-7052-4dea-8098-7caa0db86617"> Stale approval: <img width="546" alt="Screenshot 2024-08-26 at 1 07 59 PM" src="https://github.com/user-attachments/assets/da599ff3-e35c-4fa3-8141-ed80b738dd77"> Requested review tooltip: <img width="434" alt="Screenshot 2024-08-26 at 12 53 22 PM" src="https://github.com/user-attachments/assets/460d163e-8724-43b6-8760-34b285da8fe2"> Updated text for approvals: <img width="991" alt="Screenshot 2024-08-26 at 12 54 00 PM" src="https://github.com/user-attachments/assets/ab3ff012-9742-4c1b-933d-21addcb89f2c"> Updated text for allowlisted/whitelisted approvals: <img width="990" alt="Screenshot 2024-08-26 at 1 01 40 PM" src="https://github.com/user-attachments/assets/1a5bae61-d9e0-4d96-b86f-92610b0940d1"> Protected branch settings text: <img width="1022" alt="Screenshot 2024-08-26 at 1 01 14 PM" src="https://github.com/user-attachments/assets/892ce208-e1c2-41f7-8fec-46d5a0e7e776"> Comments list: <img width="1048" alt="Screenshot 2024-08-28 at 9 25 31 AM" src="https://github.com/user-attachments/assets/9c5c00c5-06cf-43b3-b413-4f7f673609b2"> --------- Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* Return 404 instead of error when commit not exist (#31977)Adam Majer2024-09-061-1/+1
| | | Fix #31976
* For consistency make repo search sort options case sensitive (#31951)65432024-09-051-2/+1
|
* Fix nuget/conan/container packages upload bugs (#31967)Lunny Xiao2024-09-055-10/+66
|