gitea

Development moved to Codeberg

Commits at f58e687a83b18d58298097d485f4febf98062dd7

  1. f58e687a Shorten page title in file view (#17987) Move the more relevant sections of the page title earlier which make it possible to distinguish multiple tabs from each other when tab width is limited. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> silverwind authored at GitHub comitted at
  2. 4da1d978 Refactor HTTP request context (#17979) wxiaoguang authored at GitHub comitted at
  3. 9d943bf3 Add missing `X-Total-Count` and fix some related bugs (#17968) * Add missing `X-Total-Count` and fix some related bugs Adds `X-Total-Count` header to APIs that return a list but doesn't have it yet. Fixed bugs: * not returned after reporting error (https://github.com/qwerty287/gitea/blob/39eb82446c6fe5da3d79124e1f701f3795625b69/routers/api/v1/user/star.go#L70) * crash with index out of bounds, API issue/issueSubscriptions I also found various endpoints that return lists but do not apply/support pagination yet: ``` /repos/{owner}/{repo}/issues/{index}/labels /repos/{owner}/{repo}/issues/comments/{id}/reactions /repos/{owner}/{repo}/branch_protections /repos/{owner}/{repo}/contents /repos/{owner}/{repo}/hooks/git /repos/{owner}/{repo}/issue_templates /repos/{owner}/{repo}/releases/{id}/assets /repos/{owner}/{repo}/reviewers /repos/{owner}/{repo}/teams /user/emails /users/{username}/heatmap ``` If this is not expected, an new issue should be opened. Closes #13043 * fmt * Update routers/api/v1/repo/issue_subscription.go Co-authored-by: KN4CK3R <admin@oldschoolhack.me> * Use FindAndCount Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: 6543 <6543@obermui.de> qwerty287 authored at GitHub comitted at
  4. 790e6cfe [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  5. bfe597c7 Use non-expiring key. (#17984) KN4CK3R authored at GitHub comitted at
  6. 0981ec30 Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766) * Add setting to OAuth handlers to override local 2FA settings This PR adds a setting to OAuth and OpenID login sources to allow the source to override local 2FA requirements. Fix #13939 Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix regression from #16544 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add scopes settings Signed-off-by: Andrew Thornton <art27@cantab.net> * fix trace logging in auth_openid Signed-off-by: Andrew Thornton <art27@cantab.net> * add required claim options Signed-off-by: Andrew Thornton <art27@cantab.net> * Move UpdateExternalUser to externalaccount Signed-off-by: Andrew Thornton <art27@cantab.net> * Allow OAuth2/OIDC to set Admin/Restricted status Signed-off-by: Andrew Thornton <art27@cantab.net> * Allow use of the same group claim name for the prohibit login value Signed-off-by: Andrew Thornton <art27@cantab.net> * fixup! Move UpdateExternalUser to externalaccount * as per wxiaoguang Signed-off-by: Andrew Thornton <art27@cantab.net> * add label back in Signed-off-by: Andrew Thornton <art27@cantab.net> * adjust localisation Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> zeripath authored at GitHub comitted at
  7. b4782e24 Return nicer error for ForcePrivate (#17971) zeripath authored at GitHub comitted at
  8. 8e9140dd Fixed wording. (#17973) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> KN4CK3R authored at GitHub comitted at
  9. bd475f5c [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  10. eba07867 Prevent deadlock in create issue (#17970) zeripath authored at GitHub comitted at
  11. 39eb8244 Bump swagger-ui-dist from 4.1.2 to 4.1.3 (#17965) dependabot[bot] authored at GitHub comitted at
  12. c3eea2f8 Improve behavior of "Fork" button (#17288) * Improbe behaviour of fork button * Apply suggestions from code review * Remove old lines * Apply suggestions * Fix test * Remove unnecessary or * Update templates/repo/header.tmpl Co-authored-by: silverwind <me@silverwind.io> * Add comment * Fix situation if you can't fork but don't have forks * Fix lint * Apply changes from #17783 * fmt * fmt * Apply tweaks Co-authored by: silverwind <me@silverwind.io> * Rm dupl css * Fix build Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> qwerty287 authored at GitHub comitted at
  13. e0118b0d Prefer "Hiragino Kaku Gothic ProN" in system-ui-ja (#17954) rinsuki authored at GitHub comitted at
  14. 57232404 Some repository refactors (#17950) * some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner Lunny Xiao authored at GitHub comitted at
  15. 0a7e8327 [skip ci] Updated licenses and gitignores GiteaBot authored at GiteaBot comitted at
  16. 6d417298 Fix markdown URL parsing (#17924) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> wxiaoguang authored at GitHub comitted at
  17. 379a5241 Fix overflow in commit graph (#17947) * Fix overflow in commit graph Limit commit message to 50% width. This is rather crude but should work for common use cases with not too-long author names. Fixes: https://github.com/go-gitea/gitea/issues/17944 * Make it work with dynamic width * use span * use explicit none Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> silverwind authored at GitHub comitted at
  18. f550e356 Prevent services/mailer/mailer_test.go tests from deleteing data directory (#17941) Running `make test-backend` will delete `data/` due to reloading the configuration and resetting the appdatapath. This PR removes this unnecessary config reload but also adds extra code in to the unittest main to prevent its cleanup from deleting the wrong directory. Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  19. 3ca5dc7e Move keys to models/asymkey (#17917) * Move keys to models/keys * Rename models/keys -> models/asymkey * change the missed package name * Fix package alias * Fix test * Fix docs * Fix test * Fix test * merge Lunny Xiao authored at GitHub comitted at
  20. 0a9fcf63 Clean legacy SimpleMDE code (#17926) Since we are using EasyMDE now, we do not need to keep the SimpleMDE code anymore. This PR removes all legacy SimpleMDE code, and makes some related changes: * `createCommentEasyMDE` can accept native DOM element, and it doesn't need `jQuery.data` to store EasyMDE editor object (as discussed about the frontend guideline). * introduce `getAttachedEasyMDE` to get the attached EasyMDE editor object, it's easier to find all the usage of EasyMDE. * rename variable names from `$simplemde` to `easyMDE`, the `$` was incorrect because it is a EasyMDE editor, not a jQuery object. With this PR, it will be easier to do more refactoring or replacing EasyMDE with other editors. wxiaoguang authored at GitHub comitted at
  21. 719bddcd Move repository model into models/repo (#17933) * Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function Lunny Xiao authored at GitHub comitted at
  22. fb8166c6 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  23. c7e23401 Fix a panic in NotifyCreateIssueComment (caused by string truncation) (#17928) * Fix a panic in NotifyCreateIssueComment (caused by string truncation) * more unit tests * refactor * fix some edge cases * use SplitStringAtByteN for comment content wxiaoguang authored at GitHub comitted at
  24. 18317526 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  25. d2d9bc84 Use disable_form_autofill on Codebase and Gitbucket (#17936) Removes the old fake input on the Codebase migration screen, and adds the disable_form_autofill qwerty287 authored at GitHub comitted at
  26. 9e6e1dc9 Improve checkBranchName (#17901) The current implementation of checkBranchName is highly inefficient involving opening the repository, the listing all of the branch names checking them individually before then using using opened repo to get the tags. This PR avoids this by simply walking the references from show-ref instead of opening the repository (in the nogogit case). Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  27. b59875aa allways set a message-id on mails (#17900) * allways set a message-id on mails * Add unit tests for mailer & Message-ID Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Garionion authored at GitHub comitted at
  28. 0ff18a80 Support sorting for project board issuses (#17152) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Anbraten authored at GitHub comitted at
  29. 4cbe7925 Remove unnecessary `X-Remote` HTTP header in AJAX request (#17932) wxiaoguang authored at GitHub comitted at
  30. a6f961fb Refactor install page (db type) (#17919) * Refactor install page (db type) * set correct default DB HOST for different DB TYPE * remove legacy TiDB from documents * unify the usage of DB TYPE, in code we only use "mysql". "MySQL" is only shown to users for friendly name. * Gitea can use TiDB via MySQL protocol Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> wxiaoguang authored at GitHub comitted at