gitea

Development moved to Codeberg

Commits at 8eb1cd9264af9493e0f57a4a4c0a1f764f7cefcf

  1. 8eb1cd92 Add "Allow edits from maintainer" feature (#18002) Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7). If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option. Then users with write access to the base branch get more permissions on this branch: * use the update pull request button * push directly from the command line (`git push`) * edit/delete/upload files via web UI * use related API endpoints You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions. This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR. Closes #17728 Co-authored-by: 6543 <6543@obermui.de> qwerty287 authored at GitHub comitted at
  2. 92dfbada Better describe what `/repos/{owner}/{repo}/raw/{filepath}` returns on 200 (#19542) - Set on the description that it returns the raw file content. - Resolves #19514 Gusted authored at GitHub comitted at
  3. 06e4687c more context for models (#19511) make more usage of context, to have more db transaction in one session (make diff of #9307 smaller) 6543 authored at GitHub comitted at
  4. 332b2ecd Prevent intermittent race in attribute reader close (#19537) There is a potential rare race possible whereby the c.running channel could be closed twice. Looking at the code I do not see a need for this c.running channel and therefore I think we can remove this. (I think the c.running might have been some attempt to prevent a hang but the use of os.Pipes should prevent that.) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> zeripath authored at GitHub comitted at
  5. ca4b920b Make repository file list useable on mobile (#19515) * Make repository file list useable on mobile - When you're browsing a repository on mobile, you're met by a giant block called the "repository file list". The current design is not useable for mobile and is a big annoyance while browsing a repo on mobile. This PR removes that annoyance by making it more suitable design when on mobile. - Adds HTML for the commit/file time to align it vertically(noticeable on mobile, not on PC). - Show all information horizontally and not vertically. - Remove the last commit message of the file, there isn't enough space on mobile to place this anywhere, so we're not trying to make a best-effort here and instead just not display it. * Remove unnecessary `!important` * Fix broken HTML * Simplify code Gusted authored at GitHub comitted at
  6. 3e8aa42a Update image URL for Discord webhook (#19536) Signed-off-by: jolheiser <john.olheiser@gmail.com> John Olheiser authored at GitHub comitted at
  7. 960b813a [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  8. b5383590 Fix 64-bit atomic operations on 32-bit machines (#19531) - Doing 64-bit atomic operations on 32-bit machines is a bit tricky by golang, as they can only be done under certain set of conditions(https://pkg.go.dev/sync/atomic#pkg-note-BUG). - This PR fixes such case whereby the conditions weren't met, it moves the int64 to the first field of the struct, which will 64-bit operations happening on this property on 32-bit machines. - Resolves #19518 Gusted authored at GitHub comitted at
  9. af09136b Fix `upgrade.sh` script error with `su -c` (#19483) * Fix scirpt err with `su -c`, add env auto loading. * Update upgrade.sh * Update upgrade.sh * Update contrib/upgrade.sh Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> YISH authored at GitHub comitted at
  10. 5651c650 When view _Siderbar or _Footer, just display once (#19501) Co-authored-by: zeripath <art27@cantab.net> Lunny Xiao authored at GitHub comitted at
  11. 2728f0c2 Fix migrate release from github (#19510) * Fix migrate release from github * Fix bug Lunny Xiao authored at GitHub comitted at
  12. 41fcf7b7 Prevent dangling archiver goroutine (#19516) Within doArchive there is a service goroutine that performs the archiving function. This goroutine reports its error using a `chan error` called `done`. Prior to this PR this channel had 0 capacity meaning that the goroutine would block until the `done` channel was cleared - however there are a couple of ways in which this channel might not be read. The simplest solution is to add a single space of capacity to the goroutine which will mean that the goroutine will always complete and even if the `done` channel is not read it will be simply garbage collected away. (The PR also contains two other places when setting up the indexers which do not leak but where the blocking of the sending goroutine is also unnecessary and so we should just add a small amount of capacity and let the sending goroutine complete as soon as it can.) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> zeripath authored at GitHub comitted at
  13. 3fbaa79c Don't let repo clone URL overflow (#19517) - Apparently `<input>` elements differ from other elements have a size attribute that act as a `min-width` CSS property, this causes a overflow on mobile. By setting this size to `1` it doesn't try to force a min-width and nicely shrink down. Gusted authored at GitHub comitted at
  14. cdab4622 Add commit status popup to issuelist (#19375) This gets the necessary data to the issuelist for it to support a clickable commit status icon which pops up the full list of commit statuses related to the commit. It accomplishes this without any additional queries or fetching as the existing codepath was already doing the necessary work but only returning the "last" status. All methods were wrapped to call the least-filtered version of each function in order to maximize code reuse. Note that I originally left `getLastCommitStatus()` in `pull.go` which called to the new function, but `make lint` complained that it was unused, so I removed it. I would have preferred to keep it, but alas. The only thing I'd still like to do here is force these popups to happen to the right by default instead of the left. I see that the only other place this is popping up right is on view_list.tmpl, but I can't figure out how/why right now. Fixes #18810 parnic authored at GitHub comitted at
  15. 0b38084b Disable unnecessary GitHooks elements (#18485) * Disable unnecessary GitHooks elements This mod fixes disabling unnecessary GitHooks elements. Related: https://github.com/go-gitea/gitea/pull/13129 Author-Change-Id: IB#1115251 Paweł Bogusławski authored at GitHub comitted at
  16. 85579dca Disable unnecessary GitHooks elements This mod fixes disabling unnecessary GitHooks elements. Related: https://github.com/go-gitea/gitea/pull/13129 Author-Change-Id: IB#1115251 Pawel Boguslawski authored at Andrew Thornton comitted at
  17. 076eaad7 Improve dashboard's repo list performance (#18963) * Improve dashboard's repo list performance - Avoid a lot of database lookups for all the repo's, by adding a undocumented "minimal" mode for this specific task, which returns the data that's only needed by this list which doesn't require any database lookups. - Makes fetching these list faster. - Less CPU overhead when a user visits home page. * Refactor javascript code + fix Fork icon - Use async in the function so we can use `await`. - Remove `archivedFilter` check for count, as it doesn't make sense to show the count of repos when you can't even see them(as they are filited away). * Add `count_only` * Remove uncessary code * Improve comment Co-authored-by: delvh <dev.lh@web.de> * Update web_src/js/components/DashboardRepoList.js Co-authored-by: delvh <dev.lh@web.de> * Update web_src/js/components/DashboardRepoList.js Co-authored-by: delvh <dev.lh@web.de> * By default apply minimal mode * Remove `minimal` paramater * Refactor count header * Simplify init Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Gusted authored at GitHub comitted at
  18. 89eec15d By default force vertical tabs on mobile (#19486) * By default force vertical tabs on mobile - While experimenting with using vertical tabs instead of horizontal tabs on gitea for a better mobile experience, I made a recent PR(https://github.com/go-gitea/gitea/pull/19468) in order to see if there was any objections to this new behavior for the repo headers(one of the most annoying horizontal tabs). This PR had no objections and even a user commenting that this change is brilliant. - This PR now improves upon the previous PR by making this the de-facto behavior for all menu's on mobile. The only exemption is the navbar which also uses the menu but caught some layout errors with the changes. * Fix organisation * Fix repo/wiki buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Gusted authored at GitHub comitted at
  19. d71df010 Refactor readme file renderer (#19502) * Refactor readme file renderer * improve Lunny Xiao authored at GitHub comitted at
  20. e4274f64 Allow package dump skipping (#19506) * Added addReader to support verbose. * Allow skipping packages. * Updated docs. * Update cmd/dump.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> KN4CK3R authored at GitHub comitted at
  21. 6dd36379 Unset git author/committer variables when running integration tests (#19512) TestAPIGitTag (and likely others) will fail if the running environment contains GIT_AUTHOR_NAME and other env variables like it. This PR simply unsets these when running the integration tests. Fix #14247 Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  22. 2347c9eb Allow commit status popup on /pulls page (#19507) * Allow commit status popup on /pulls page The /pulls page doesn't contain a "repository" element, so the early-out here was preventing the commit status popup hook from working. However, the only thing the .repository element is being used for here is determining whether the popup should be on the right or on the left, so we don't actually need the element to exist for the hook to work. Pull request #19375 allows the statuses on /pulls pages to appear clickable, but this commit is required to make the popup actually work there. * Move commit statuses popup hook to dedicated func * Add missing import parnic authored at GitHub comitted at
  23. 3c140f0d Use router param for filepath in GetRawFile (#19499) * Use router param for filepath Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move TreePath back into RepoRefForAPI Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> John Olheiser authored at GitHub comitted at
  24. 6cc8aed7 Fix two typos (#19504) Lunny Xiao authored at GitHub comitted at
  25. 03eba32b Add a new menu in file view to open blame view and fix blame view select range bug (#19500) Lunny Xiao authored at GitHub comitted at
  26. fef26c15 Fix two UI bugs: JS error in imagediff.js, 500 error in diff/compare.tmpl Co-authored-by: 6543 <6543@obermui.de> wxiaoguang authored at GitHub comitted at
  27. 741c55b4 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  28. 4e912a61 Improve Stopwatch behavior (#18930) - Don't send empty stopwatch over and over again, only send once. - Stop interval to update stopwatch's timer when there is no more stopwatch. Gusted authored at GitHub comitted at
  29. 1ebb30e4 Pass gitRepo down to GetRawDiff, since its used for main repo and wiki (#19461) as per https://github.com/go-gitea/gitea/pull/19449#issuecomment-1105283931 pass gitRepo down to GetRawDiff, since its used for main repo and wiki 6543 authored at GitHub comitted at
  30. 7c164d5a Use queue instead of memory queue in webhook send service (#19390) Lunny Xiao authored at GitHub comitted at