summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve reviewing PR UX (#19612)Gusted2022-05-077-3/+74
|
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-072-0/+2
|
* Add Changelog v1.16.7 (#19575) (#19644)65432022-05-072-1/+24
| | | | | | | | | | | | * Add Changelog v1.16.7 (#19575) Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Gusted <williamzijl7@hotmail.com> * jup Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Gusted <williamzijl7@hotmail.com>
* Set safe dir for git operations in .drone.yml CI (#19641)techknowlogick2022-05-061-0/+10
| | | | | Our drone by necessity runs on git repositories not owned by the drone process. Unfortunately this means that git operations and thence CI builds will fail without the `safe.directory` option being set. See: https://drone.gitea.io/go-gitea/gitea/54632/2/8
* Add missing `sorting` column in `project_issue` table (#19635)wxiaoguang2022-05-061-0/+3
|
* Simplify `IsVendor` (#19626)Gusted2022-05-061-58/+2
| | | | | The changes in this file were upstreamed directly into go-enry as https://github.com/go-enry/go-enry/pull/44 and therefore they are no longer needed.
* Prevent NPE when checking repo units if the user is nil (#19625)zeripath2022-05-061-1/+1
| | | | | | | | | CheckRepoUnitUser should tolerate nil users. Fix #19613 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Skip duplicated layers. (#19624)KN4CK3R2022-05-051-0/+4
|
* Add "Reference" section to Issue view sidebar (#19609)neon2022-05-052-0/+10
| | | | | | | | | | | | | | | * Add "Reference" section to Issue view sidebar * Removed unneeded tailored CSS, added Fomantic UI classes * Removed tailored CSS in favour of HTML-only approach Kindly provided by @Gusted * Added i18 translation key for reference link string * Corrected spelling of "References:" to "Reference:" for reference link text * Removed `Issue.ReferenceLink` in favour of a local template variable
* GetFeeds must always discard actions with dangling repo_id (#19598)singuliere2022-05-055-7/+37
| | | | | | | | | | | | | | * GetFeeds must always discard actions with dangling repo_id See https://discourse.gitea.io/t/blank-page-after-login/5051/12 for a panic in 1.16.6. * add comment to explain the dangling ID in the fixture * loadRepoOwner must not attempt to use a nil action.Repo * make fmt Co-authored-by: Loïc Dachary <loic@dachary.org>
* Call MultipartForm.RemoveAll when request finishes (#19606)wxiaoguang2022-05-057-0/+21
|
* Remove `RequireHighlightJS` field, update plantuml example. (#19615)wxiaoguang2022-05-0511-28/+10
|
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-052-1/+315
|
* PullService lock via pullID (#19520)65432022-05-046-2/+21
| | | | | | | | | * lock pull on git&db actions ... * add TODO notes * rename prQueue 2 prPatchCheckerQueue * fmt
* Add health check endpoint (#18465)ttys32022-05-047-13/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * chore: add health check endpoint docs: update document about health check fix: fix up Sqlite3 ping. current ping will success even if the db file is missing fix: do not expose privacy information in output field * refactor: remove HealthChecker struct * Added `/api/healthz` to install routes. This was needed for using /api/healthz endpoint in Docker healthchecks, otherwise, Docker would never become healthy if using healthz endpoint and users would not be able to complete the installation of Gitea. * Update modules/cache/cache.go * fine tune * Remove unnecessary test code. Now there are 2 routes for installation (and maybe more in future) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Marcos de Oliveira <marcossantos@furb.br>
* Only check for non-finished migrating task (#19601)Gusted2022-05-042-11/+11
| | | | | | | | | | * Only check for non-finished migrating task - Only check if a non-finished migrating task exists for a mirror before fetching the mirror details from the database. - Resolves #19600 - Regression: #19588 * Clarify function
* Make .cs highlighting legible on dark themes. (#19604)Eekle2022-05-041-1/+1
|
* Fix broken TR on cherrypick page (#19599)Gusted2022-05-041-1/+1
| | | | - `repo.filter_branch` isn't a translation key so use `repo.pulls.filter_branch` which has the correct translation.
* Use correct context in `routers/web` (#19597)Gusted2022-05-031-3/+3
| | | - Don't use the `APIContext` in the web routers.
* Use for a repo action one database transaction (#19576)65432022-05-0329-260/+270
| | | | | ... more context (part of #9307)
* Only set CanColorStdout / CanColorStderr to true if the stdout/stderr is a ↵wxiaoguang2022-05-031-0/+21
| | | | terminal (#19581)
* Don't fetch Mirror when it's migrating (#19588)Gusted2022-05-032-5/+22
| | | | | | | | | | - When a repository is still being migrated, don't try to fetch the Mirror from the database. Instead skip it. This allows to visit repositories that are still being migrated and were configured to be mirrored. - Resolves #19585 - Regression: #19295 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move user password verification after checking his groups on ldap auth (#19587)Gwilherm Folliot2022-05-031-8/+8
| | | | | | | In case the binded user can not access its own attributes. Signed-off-by: Gwilherm Folliot <gwilherm55fo@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix some slice problems (incorrect slice length) (#19592)Lunny Xiao2022-05-033-3/+3
|
* Fix sending empty notifications (#19589)Gusted2022-05-021-1/+1
| | | - Don't send empty notifications on read notifications API.
* Handle the error of a missing blob object fix #19530 (#19552)99rgosse2022-05-021-2/+11
| | | | | | | | | | | | | | | | | | | | | * Handle the error of a missing blob object * Show error in logs * as per @zeripath * Add missing error check * Add missing error check * Update compare.go * Use formal code * Update compare.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove legacy `+build:` constraint (#19582)wxiaoguang2022-05-0286-86/+0
| | | Go 1.17 and later use modern `//go:build` constraints, the old `// +build:` constraints should be removed.
* Federation: return useful statistic information for nodeinfo (#19561)65432022-05-0211-16/+78
| | | Add statistic information for total user count, active user count, issue count and comment count for `/nodeinfo`
* Upgrade required git version to 2.0 (#19577)wxiaoguang2022-05-022-7/+18
| | | | | * Upgrade required git version to 2.0 * update document
* add smtp password to install page (#17564)Vladimir Smagin2022-05-021-0/+1
| | | | | | | | * add smtp password to install page * Update routers/install/install.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* ignore DNS error when doing migration allow/block check (#19566)wxiaoguang2022-05-022-8/+3
| | | Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-022-1/+6
|
* Dont overwrite err with nil & rename PullCheckingFuncs to reflect there ↵65432022-05-024-22/+22
| | | | | | | | | | | usage (#19572) - dont overwrite err with nil unintentionaly - rename CheckPRReadyToMerge to CheckPullBranchProtections - rename prQueue to prPatchCheckerQueue from #9307 Co-authored-by: delvh <dev.lh@web.de>
* Improve UI on mobile (#19546)Gusted2022-05-0116-16/+105
| | | | | | | | | | | | Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
* Add API to check if team has repo access (#19540)qwerty2872022-05-014-1/+117
| | | | | * Add API to check if team has repo access * Add test case
* Avoid MoreThanOne Error (#19557)99rgosse2022-05-011-1/+1
|
* [skip ci] Updated licenses and gitignoresGiteaBot2022-05-012-0/+466
|
* Simplify loops to copy (#19569)Gusted2022-05-012-6/+3
| | | - Simplify two loops into `copy` statements.
* Use middleware to open gitRepo (#19559)65432022-04-302-7/+3
|
* Added X-Mailer header to outgoing emails (#19562)Ivan Fedorov2022-04-301-0/+1
| | | | - It's a non-standard mentioned in https://www.ietf.org/rfc/rfc2076.html#section-3.4 - This header makes emails filtering easier
* fix #19545 (#19563)65432022-04-301-4/+5
|
* [skip ci] Updated translations via CrowdinGiteaBot2022-04-301-0/+2
|
* Respect DefaultUserIsRestricted system default when creating new user (#19310)Jimmy Praet2022-04-2917-85/+170
| | | | | | | | | | | | | | | | | | | * Apply DefaultUserIsRestricted in CreateUser * Enforce system defaults in CreateUser Allow for overwrites with CreateUserOverwriteOptions * Fix compilation errors * Add "restricted" option to create user command * Add "restricted" option to create user admin api * Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed * Revert "Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed" This reverts commit ee95d3e8dc9e9fff4fa66a5111e4d3930280e033.
* Mute link in diff header (#19556)silverwind2022-04-291-1/+1
| | | | Followup to https://github.com/go-gitea/gitea/pull/19534. Make the link render in color only on hover.
* Add API to query collaborators permission for a repository (#18761)Florin Hillebrand2022-04-298-3/+317
| | | | | | | | | | | | | | | | | | | | | Targeting #14936, #15332 Adds a collaborator permissions API endpoint according to GitHub API: https://docs.github.com/en/rest/collaborators/collaborators#get-repository-permissions-for-a-user to retrieve a collaborators permissions for a specific repository. ### Checks the repository permissions of a collaborator. `GET` `/repos/{owner}/{repo}/collaborators/{collaborator}/permission` Possible `permission` values are `admin`, `write`, `read`, `owner`, `none`. ```json { "permission": "admin", "role_name": "admin", "user": {} } ``` Where `permission` and `role_name` hold the same `permission` value and `user` is filled with the user API object. Only admins are allowed to use this API endpoint.
* Permalink files In PR diff (#19534)KN4CK3R2022-04-291-3/+4
|
* Fix Pull Request comment filename word breaks (#19535)parnic2022-04-292-2/+4
| | | | | | | | | | | | | | | | | | | | | * Fix word breaks in Chrome This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome. Fixes #16248 * Don't break Outdated badge This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename. * Move word break to recommended element * Add overflow-wrap per PR review * Update web_src/less/helpers.less Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Don't error when branch's commit doesn't exist (#19547)Gusted2022-04-291-2/+8
| | | | | | | | | | * Don't error when branch's commit doesn't exist - If one of the branches no longer exists, don't throw an error, it's possible that the branch was destroyed during the process. Simply skip it and disregard it. - Resolves #19541 * Don't send empty objects * Use more minimal approach
* [skip ci] Updated translations via CrowdinGiteaBot2022-04-291-0/+6
|
* Support `hostname:port` to pass host matcher's check #19543 (#19543)wxiaoguang2022-04-292-2/+9
| | | hostmatcher: split the hostname from the `hostname:port` string, use the correct hostname to do the match.