gitea

Development moved to Codeberg

Commits at f1e85622da0492fa01d8449eb938197cd4fa65bf

  1. f1e85622 Improve TestPatch to use git read-tree -m and implement git-merge-one-file functionality (#18004) The current TestPatch conflict code uses a plain git apply which does not properly account for 3-way merging. However, we can improve things using `git read-tree -m` to do a three-way merge then follow the algorithm used in merge-one-file. We can also use `--patience` and/or `--histogram` to generate a nicer diff for applying patches too. Fix #13679 Fix #6417 Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  2. 487ce3b4 [skip ci] Updated licenses and gitignores GiteaBot authored at GiteaBot comitted at
  3. 9296baf6 Change <a> elements to underline on hover (#17898) Fomantic brings a opinionated style that removed underline on mouse hover which I think is important UX to have. This re-enables the underline in the Fomantic config and fixes a few cases where underline was deemed disruptive. silverwind authored at GitHub comitted at
  4. 8662ff68 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  5. b300e3f4 Support open compare page directly (#17975) * Support open compare page directly * simple code * Some improvements Co-authored-by: 6543 <6543@obermui.de> Lunny Xiao authored at GitHub comitted at
  6. 4cbc865d Add option to define refs in issue templates (#17842) Adds a markdown header option `ref` that allows you to set the ref the issue should belong. qwerty287 authored at GitHub comitted at
  7. 4bbbf356 Fix outType on gitea dump (#18000) - Force to output the dump file to use the given `--type`. - Resolves #17959 Gusted authored at GitHub comitted at
  8. a6d4a854 Fix rename notification bug (#18008) Lunny Xiao authored at GitHub comitted at
  9. d29b689f Ensure complexity, minlength and ispwned are checked on password setting (#18005) It appears that there are several places that password length, complexity and ispwned are not currently been checked when changing passwords. This PR adds these. Fix #17977 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> zeripath authored at GitHub comitted at
  10. dab28c70 Use JSON module instead of stdlib json (#18003) Gusted authored at GitHub comitted at
  11. 83546707 Prevent hang in git cat-file if repository is not a valid repository and other fixes (#17991) This PR contains multiple fixes. The most important of which is: * Prevent hang in git cat-file if the repository is not a valid repository Unfortunately it appears that if git cat-file is run in an invalid repository it will hang until stdin is closed. This will result in deadlocked /pulls pages and dangling git cat-file calls if a broken repository is tried to be reviewed or pulls exists for a broken repository. Fix #14734 Fix #9271 Fix #16113 Otherwise there are a few small other fixes included which this PR was initially intending to fix: * Fix panic on partial compares due to missing PullRequestWorkInProgressPrefixes * Fix links on pulls pages due to regression from #17551 - by making most /issues routes match /pulls too - Fix #17983 * Fix links on feeds pages due to another regression from #17551 but also fix issue with syncing tags - Fix #17943 * Add missing locale entries for oauth group claims * Prevent NPEs if ColorFormat is called on nil users, repos or teams. zeripath authored at GitHub comitted at
  12. 6e7d28cf Prevent double decoding of % in url params (#17997) There was an unfortunate regression in #14293 which has led to the double decoding of url parameter elements if they contain a '%'. This is due to an issue with the way chi decodes its RoutePath. In detail the problem lies in mux.go where the routeHTTP path uses the URL.RawPath or even the URL.Path instead of the escaped path to do routing. This PR simply forcibly sets the routePath to that of the EscapedPath. Fix #17938 Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  13. e0e3ba6c Add Reindex buttons to repository settings page (#17494) This PR adds reindexing request buttons to the repository settings page. Fix #3796 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> zeripath authored at GitHub comitted at
  14. 3a3cbcfd Set correct language for Dockerfile variants (#17999) silverwind authored at GitHub comitted at
  15. e79272ab Fix TemplateRepo no longer in models.repo (#17993) * Fixes error 500 that appears when trying to browse code of a repository generated from template * forgot to update comment * Update models/repo/repo.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * Update repo.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Caellion authored at GitHub comitted at
  16. cc129d2c Make AvatarRenderedSizeFactor configurable and set it to 3 (#17951) Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Configurability contributed by zeripath. Fixes: https://github.com/go-gitea/gitea/pull/17422 Fixes: https://github.com/go-gitea/gitea/issues/16287 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> silverwind authored at GitHub comitted at
  17. e78ee73d [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  18. b748acf2 Fixed emoji alias not parsed in links (#16221) * Do not skip links. * Restrict text in links to emojis. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> KN4CK3R authored at GitHub comitted at
  19. 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
  20. 4da1d978 Refactor HTTP request context (#17979) wxiaoguang authored at GitHub comitted at
  21. 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
  22. 790e6cfe [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  23. bfe597c7 Use non-expiring key. (#17984) KN4CK3R authored at GitHub comitted at
  24. 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
  25. b4782e24 Return nicer error for ForcePrivate (#17971) zeripath authored at GitHub comitted at
  26. 8e9140dd Fixed wording. (#17973) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> KN4CK3R authored at GitHub comitted at
  27. bd475f5c [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  28. eba07867 Prevent deadlock in create issue (#17970) zeripath authored at GitHub comitted at
  29. 39eb8244 Bump swagger-ui-dist from 4.1.2 to 4.1.3 (#17965) dependabot[bot] authored at GitHub comitted at
  30. 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