summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix line spacing for plaintext previews (#22699) (#22701)crystal2023-02-011-5/+1
| | | | | | | | | Backport #22699 Adding `<br>` between each line is not necessary since the entire file is rendered inside a `<pre>` fixes https://codeberg.org/Codeberg/Community/issues/915
* Add missing close bracket in imagediff (#22710) (#22712)Yarden Shoham2023-02-011-1/+1
| | | | | | | | | | | | | | | Backport #22710 There was a missing `]` in imagediff.js: ``` const $range = $container.find("input[type='range'"); ``` This PR simply adds this. Fix #22702 Co-authored-by: zeripath <art27@cantab.net>
* Fix wrong hint when deleting a branch successfully from pull request UI ↵Yarden Shoham2023-02-012-2/+2
| | | | | | | | | (#22673) (#22698) Backport #22673 Fix #18785 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix README TOC links (#22577) (#22677)crystal2023-01-311-2/+9
| | | | | | | | Backport #22577 Fixes anchored markup links by adding `user-content-` (which is prepended to IDs) Closes https://codeberg.org/Codeberg/Community/issues/894
* Don't return duplicated users who can create org repo (#22560) (#22562)Gusted2023-01-306-9/+28
| | | | | | | | | | | - Backport of #22560 - Currently the function `GetUsersWhoCanCreateOrgRepo` uses a query that is able to have duplicated users in the result, this is can happen under the condition that a user is in team that either is the owner team or has permission to create organization repositories. - Add test code to simulate the above condition for user 3, [`TestGetUsersWhoCanCreateOrgRepo`](https://github.com/go-gitea/gitea/blob/a1fcb1cfb84fd6b36c8fe9fd56588119fa4377bc/models/organization/org_test.go#L435) is the test function that tests for this. - The fix is quite trivial, use a map as a set to get distinct orgs.
* Fix missing message in git hook when pull requests disabled on fork (#22625) ↵John Olheiser2023-01-301-10/+13
| | | | | | | (#22658) Backport #22625 Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* Improve checkIfPRContentChanged (#22611) (#22644)zeripath2023-01-282-53/+61
| | | | | | | | | | | | | | | | | | Backport #22611 The code for checking if a commit has caused a change in a PR is extremely inefficient and affects the head repository instead of using a temporary repository. This PR therefore makes several significant improvements: * A temporary repo like that used in merging. * The diff code is then significant improved to use a three-way diff instead of comparing diffs (possibly binary) line-by-line - in memory... Ref #22578 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Link issue and pull requests status change in UI notifications directly to ↵Yarden Shoham2023-01-281-0/+1
| | | | | | | | | | | | their event in the timelined view. (#22627) (#22642) Backport #22627 Adding the related comment to the issue and pull request status change in the UI notifications allows to navigate directly to the specific event in its dedicated view, easing the reading of last comments and to the editor for additional comments if desired. Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
* Use `--index-url` in PyPi description (#22620) (#22636)Yarden Shoham2023-01-282-1/+3
|
* Prevent duplicate labels when importing more than 99 (#22591) (#22598)Yarden Shoham2023-01-241-1/+1
| | | | | | | | | | | | | | Backport #22591 Importing labels (via `gitea restore-repo`) did not split them up into batches properly. The first "batch" would create all labels, the second "batch" would create all labels except those in the first "batch", etc. This meant that when importing more than 99 labels (the batch size) there would always be duplicate ones. This is solved by actually passing `labels[:lbBatchSize]` to the `CreateLabels()` function, instead of the entire list `labels`. Co-authored-by: Sybren <122987084+drsybren@users.noreply.github.com>
* Changelog 1.18.3 (#22575)v1.18.3John Olheiser2023-01-231-0/+8
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Prevent multiple `To` recipients (#22566) (#22569)Yarden Shoham2023-01-227-20/+23
| | | | | | | | | Backport #22566 Change the mailer interface to prevent the leaking of possible hidden email addresses when sending to multiple recipients. Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Gusted <williamzijl7@hotmail.com>
* Truncate commit summary on repo files table. (#22551) (#22552)Yarden Shoham2023-01-201-0/+5
| | | | | | | | | | | | | Backport #22551 There was an unintended regression in #21124 which assumed that .commits-list .message-wrapper would only match the commit summaries on /{owner}/{name}/commits/*. This assumption is incorrect as the directory/file view also uses a .commits-list wrapper. Rather than completely restructure this page this PR simply adjusts the styling to again use display: inline-block; for #repo-files-table .commit-list .message-wrapper Fix #22360
* Mute all links in issue timeline (#22534)silverwind2023-01-201-49/+49
| | | | | | | | | Backport of https://github.com/go-gitea/gitea/pull/22533. https://github.com/go-gitea/gitea/pull/21799 introduced a regression where some links in the issue timeline were not muted any more. Fix it by replacing all `class="text grey"` with `class="text grey muted-links"` in the file. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* When updating by rebase we need to set the environment for head repo ↵v1.18.2zeripath2023-01-193-10/+19
| | | | | | | | | | | | | | | | | | | | (#22535) (#22536) Backport #22535 The update by rebase code reuses the merge code but shortcircuits and pushes back up to the head. However, it doesn't set the correct pushing environment - and just uses the same environment as the base repo. This leads to the push update failing and thence the PR becomes out-of-sync with the head. This PR fixes this and adjusts the trace logging elsewhere to help make this clearer. Fix #18802 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* chore: changelog 1.18.2 (#22530)John Olheiser2023-01-191-0/+11
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix issue not auto-closing when it includes a reference to a branch (#22514) ↵John Olheiser2023-01-191-1/+3
| | | | | | | (#22521) Backport #22514 Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* Fix invalid issue branch reference if not specified in template (#22513) ↵John Olheiser2023-01-191-1/+2
| | | | | | | (#22520) Backport #22513 Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* cgo cross-compile for freebsd (#22397) (#22519)techknowlogick2023-01-181-1/+8
| | | | | Provide pre-compiled cgo binaries for freebsd Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix 500 error viewing pull request when fork has pull requests disabled ↵John Olheiser2023-01-181-0/+3
| | | | | | | (#22512) (#22515) Backport #22512 Co-authored-by: Brecht Van Lommel <brecht@blender.org>
* Reliable selection of admin user (#22509) (#22511)John Olheiser2023-01-181-1/+4
| | | | | Backport #22509 Co-authored-by: Sybren <122987084+drsybren@users.noreply.github.com>
* Set disable_gravatar/enable_federated_avatar when offline mode is true ↵Jason Song2023-01-182-0/+37
| | | | | | | | (#22479) (#22496) Backport #22479. When offline mode is true, we should set `disable_gravatar` to `true` and `enable_federated_avatar` to `false` in system settings.
* chore: changelog 1.18.1 (#22471)v1.18.1John Olheiser2023-01-171-0/+41
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update `github.com/zeripath/zapx/v15` (#22485)KN4CK3R2023-01-172-3/+3
| | | | | | Fixes #22481 _Originally posted by @zeripath in https://github.com/go-gitea/gitea/issues/22481#issuecomment-1385188703_
* Fix pull request API field `closed_at` always being `null` (#22482) (#22483)Yarden Shoham2023-01-171-0/+4
| | | | | Backport #22482 Fix #22480
* Fix migration from GitBucket (#22465)Haruo Kinoshita2023-01-172-3/+12
| | | | | | | | | | | | | Migration from GitBucket does not work due to a access for "Reviews" API on GitBucket that makes 404 response. This PR has following changes. 1. Made to stop access for Reviews API while migrating from GitBucket. 2. Added support for custom URL (e.g. `http://example.com/gitbucket/owner/repository`) 3. Made to accept for git checkout URL (`http://example.com/git/owner/repository.git`) Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix container blob mount (#22226) (#22476)John Olheiser2023-01-175-71/+120
| | | | | Backport #22226 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix error when calculate the repository size (#22392) (#22474)zeripath2023-01-165-18/+42
| | | | | | | | | | Backport #22392 Fix #22386 `GetDirectorySize` moved as `getDirectorySize` because it becomes a special function which should not be put in `util`. Co-authored-by: Jason Song <i@wolfogre.com>
* Fix Operator does not exist bug on explore page with ↵zeripath2023-01-161-2/+7
| | | | | | | | | | | | | | | ONLY_SHOW_RELEVANT_REPOS (#22454) (#22472) Backport #22454 There is a mistake in the code for SearchRepositoryCondition where it tests topics as a string. This is incorrect for postgres where topics is cast and stored as json. topics needs to be cast to text for this to work. (For some reason JSON_ARRAY_LENGTH does not work, so I have taken the simplest solution of casting to text and doing a string comparison.) Ref https://github.com/go-gitea/gitea/pull/21962#issuecomment-1379584057 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix environments for KaTeX and error reporting (#22453) (#22473)zeripath2023-01-161-5/+9
| | | | | | | | | | | | | | | Backport #22453 In #22447 it was noticed that display environments were not working correctly. This was due to the setting displayMode not being set. Further it was noticed that the error was not being displayed correctly. This PR fixes both of these issues by forcibly setting the displayMode setting and corrects an error in displayError. Fix #22447 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove the netgo tag for Windows build (#22467) (#22468)wxiaoguang2023-01-161-2/+2
| | | | | | | | | | | | | | | Backport #22467 Fix #22370 and more. Before Go 1.19, the `netgo` tag for Windows does nothing. But Go 1.19 rewrite the net package code for Windows DNS, and there is a bug: * https://github.com/golang/go/issues/57757 This PR just removes the `netgo` tag for Windows build, then the Gitea for Windows can have the old DNS behavior.
* Fix leaving organization bug on user settings -> orgs (#21983) (#22438)zeripath2023-01-163-4/+26
| | | | | | | | | | | | Backport #21983 Fix #21772 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 花墨 <shanee@live.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Restore previous official review when an official review is deleted (#22449) ↵Jimmy Praet2023-01-152-9/+58
| | | | | | | (#22460) Backport #22449 Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent panic on looking at api "git" endpoints for empty repos (#22457) ↵zeripath2023-01-151-1/+1
| | | | | | | | | | | | | | (#22458) Backport #22457 The API endpoints for "git" can panic if they are called on an empty repo. We can simply allow empty repos for these endpoints without worry as they should just work. Fix #22452 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fixed colour transparency regex matching in project board sorting (#22092) ↵zeripath2023-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#22437) Backport #22092 As described in the linked issue (#22091), semi-transparent UI elements would result in JS errors due to the fact that the CSS `backgroundColor` element was being matched by the pattern `^rgb\((\d+),\s*(\d+),\s*(\d+)\)$`, which does not take the alpha channel into account. I changed the pattern to `^rgba?\((\d+),\s*(\d+),\s*(\d+).*\)$`. This new pattern accepts both `rgb` and `rgba` tuples, and ignores the alpha channel (that little `.*` at the end) from the sorting criteria. The reason why I chose to ignore alpha is because when it comes to kanban colour sorting, only the hue is important; the order of the panels should stay the same, even if some of them are transparent. Alternative solutions were discussed in the bug report and are included here for completeness: 1. Change the regex from ^rgb\((\d+),\s*(\d+),\s*(\d+)\)$ to ^rgba?\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d+(\.\d+)?))?\)$ (alpha channel is a float or NaN on 5th group) and include the alpha channel in the sorting criteria. 2. Rethink on why you're reading colours out of the CSS in the first place, then reformat this sorting procedure. Fix #22091 Co-authored-by: MisterCavespider <deler.urist@tutanota.de>
* Log STDERR of external renderer when it fails (#22442) (#22444)Jonathan Tran2023-01-141-1/+4
| | | Backport #22442.
* fix: PR status layout on mobile (#21547) (#22441)zeripath2023-01-142-8/+48
| | | | | | | | | | | | | | | | | | | | | | Backport #21547 This PR fixes the layout of PR status layouts on mobile. For longer status context names or on very small screens the text would overflow and push the "Details" and "Required" badges out of the container. Before: ![Screen Shot 2022-10-22 at 12 27 46](https://user-images.githubusercontent.com/13721712/197335454-e4decf09-4778-43e8-be88-9188fabbec23.png) After: ![Screen Shot 2022-10-22 at 12 53 24](https://user-images.githubusercontent.com/13721712/197335449-2c731a6c-7fd6-4b97-be0e-704a99fd3d32.png) Co-authored-by: kolaente <k@knt.li> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wechatwork webhook sends empty content in PR review (#21762) (#22440)zeripath2023-01-141-1/+1
| | | | | | | | | | | | | | Backport #21762 Wechatwork webhook is sending the following string for pull request reviews: ``` markdown > ``` This commit fixes this problem. Co-authored-by: Jim Kirisame <jim@lotlab.org>
* Remove duplicate "Actions" label in mobile view (#21974) (#22439)zeripath2023-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Backport #21974 Closes #21973. The "Actions" button on the commit view page is labelled twice in mobile view. No other buttons on the page have a `mobile-only` extra label, so this PR removes it. Before: ![before](https://user-images.githubusercontent.com/6496999/204540002-75baa08a-6c06-4b39-847b-34272e09d71e.PNG) After: ![after](https://user-images.githubusercontent.com/6496999/204539991-a0607765-d5e2-4b1a-84c9-a3e16cbc674e.PNG) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Mark Ormesher <me@markormesher.co.uk> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Prepend refs/heads/ to issue template refs (#20461) (#22427)zeripath2023-01-134-2/+11
| | | | | Backport #20461 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Continue GCing other repos on error in one repo (#22422) (#22425)zeripath2023-01-131-27/+34
| | | | | | | | | | | | Backport #22422 The current code propagates all errors up to the iteration step meaning that a single malformed repo will prevent GC of other repos. This PR simply stops that propagation. Fix #21605 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Correctly handle select on multiple channels in Queues (#22146) (#22428)zeripath2023-01-133-57/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #22146 There are a few places in FlushQueueWithContext which make an incorrect assumption about how `select` on multiple channels works. The problem is best expressed by looking at the following example: ```go package main import "fmt" func main() { closedChan := make(chan struct{}) close(closedChan) toClose := make(chan struct{}) count := 0 for { select { case <-closedChan: count++ fmt.Println(count) if count == 2 { close(toClose) } case <-toClose: return } } } ``` This PR double-checks that the contexts are closed outside of checking if there is data in the dataChan. It also rationalises the WorkerPool FlushWithContext because the previous implementation failed to handle pausing correctly. This will probably fix the underlying problem in #22145 Fix #22145 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove test session cache to reduce possible concurrent problem (#22199) ↵Lunny Xiao2023-01-132-11/+2
| | | | | (#22429) backport #22199
* Restore function to "Show more" buttons (#22399) (#22426)zeripath2023-01-134-3/+30
| | | | | | | | | | | | | | | Backport #22399 There was a serious regression in #21012 which broke the Show More button on the diff page, and the show more button was also broken on the file tree too. This PR fixes this by resetting the pageData.diffFiles as the vue watched value and reattachs a function to the show more button outside of the file tree view. Fix #22380 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow HOST has no port (#22280) (#22409)Lunny Xiao2023-01-123-5/+57
| | | | | | | Fix #22274 Backport #22280 This PR will allow `HOST` without port. Then a default port will be given in future steps.
* fix: omit avatar_url in discord payload when empty (#22393) (#22394)John Olheiser2023-01-101-1/+1
| | | | | Backport #22393 Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Don't display stop watch top bar icon when disabled and hidden when click ↵Yarden Shoham2023-01-102-0/+3
| | | | | | | | | | | | other place (#22374) (#22387) Backport #22374 Fix #22286 When timetracking is disabled, the stop watch top bar icon should be hidden. When the stop watch recording popup, it should be allowed to hide with some operation. Now click any place on this page will hide the popup window.
* Don't lookup mail server when using sendmail (#22300) (#22383)Lunny Xiao2023-01-091-14/+17
| | | | Fix #22287 backport #22300
* Fix set system setting failure once it cached (#22334)Lunny Xiao2023-01-092-13/+20
| | | backport #22333
* Update Emoji dataset to Unicode 14 (#22342) (#22343)isla w2023-01-043-306/+527
| | | Backport of #22342 to release/v1.18 as requested