aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Ensure settings for Service and Mailer are read on the install page (#15943)zeripath2021-06-162-0/+7
| | | | | | | | | | | | | | * Ensure settings for Service and Mailer are read on the install page NewContext does not set the mailer or service settings so add a new function that will run this. Fix #15894 Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] ListIssues add more filters (#16174)65432021-06-164-15/+134
| | | | | | | | | | | | | | | | | | | | * [API] ListIssues add more filters: optional filter repo issues by: - since - before - created_by - assigned_by - mentioned_by * Add Tests * Update routers/api/v1/repo/issue.go Co-authored-by: Lanre Adelowo <adelowomailbox@gmail.com> * Apply suggestions from code review Co-authored-by: Lanre Adelowo <adelowomailbox@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Clean-up the settings hierarchy for issue_indexer queue (#16001)zeripath2021-06-164-33/+34
| | | | | | | | | There are a couple of settings in `[indexer]` relating to the `issue_indexer` queue which override settings in unpredictable ways. This PR adjusts this hierarchy and makes explicit that these settings are deprecated. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix missing discard in repo_language_stats (#16030)zeripath2021-06-161-7/+3
| | | | | | | Set the missing discard(1) in repo_language_stats. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Add Status Updates whilst Gitea migrations are occurring (#15076)zeripath2021-06-1613-12/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add migrating message Signed-off-by: Andrew Thornton <art27@cantab.net> * simplify messenger Signed-off-by: Andrew Thornton <art27@cantab.net> * make messenger an interface Signed-off-by: Andrew Thornton <art27@cantab.net> * rename Signed-off-by: Andrew Thornton <art27@cantab.net> * prepare for merge Signed-off-by: Andrew Thornton <art27@cantab.net> * as per tech Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix spelling (#16179)Jonathan Tran2021-06-162-4/+4
| | | Co-authored-by: Jonathan Tran <jon@allspice.io>
* Add subject-type filter to list notification API endpoints (#16177)65432021-06-165-43/+105
| | | Close #15886
* issue-keyword class is being incorrectly stripped off spans (#16163)zeripath2021-06-161-5/+2
| | | | | | Bluemonday sanitizer regexp rules are not additive, so the addition of the icons, emojis and chroma syntax policy has led to this being stripped. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-1626-41/+51
|
* Only check access tokens if they are likely to be tokens (#16164)zeripath2021-06-161-1/+7
| | | | | | | | | | | * Only check access tokens if they are likely to be tokens Gitea will currently check every if every password is an access token even though most passwords are not and cannot be access tokens. By creation access tokens are 40 byte hexadecimal strings therefore only these should be checked. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update MAINTAINERS (#16162)Steven2021-06-151-0/+1
|
* Use milestone deadline when sorting issues (#14551)koalp2021-06-141-2/+11
| | | | | | | | | | When sorting issues by deadline, the deadline of the milestone the issue is attached to wasn't taken into account. It have been changed and the nearest deadline is taken into account for sorting. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make command in authorized keys a template (#16003)zeripath2021-06-143-43/+60
| | | | | | | | Fix #15595 Replaces #15978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add attachments for PR reviews (#16075)KN4CK3R2021-06-1415-47/+87
| | | | | | | | | | | | | * First step for multiple dropzones per page. * Allow attachments on review comments. * Lint. * Fixed accidental initialize of the review textarea. * Initialize SimpleMDE textarea. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-151-0/+7
|
* Fixed setting of wrong position (#16148)KN4CK3R2021-06-141-3/+13
|
* v180 migration should be standalone (#16151)zeripath2021-06-141-7/+56
| | | | | | | | | | Unfortunately the v180 migration picked up a few non-standalone dependencies. This PR forcibly copies the important parts back into the migration. Fix #16150 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix private repo permission problem (#16142)Nils Dralle2021-06-144-1/+38
| | | | | | | | | | | | * Change user access permission * Add string 'transfer_notices_3' * Add 3rd transfer note to transfer dialog * Add test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add push to remote mirror repository (#15157)KN4CK3R2021-06-1439-875/+2458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added push mirror model. * Integrated push mirror into queue. * Moved methods into own file. * Added basic implementation. * Mirror wiki too. * Removed duplicated method. * Get url for different remotes. * Added migration. * Unified remote url access. * Add/Remove push mirror remotes. * Prevent hangs with missing credentials. * Moved code between files. * Changed sanitizer interface. * Added push mirror backend methods. * Only update the mirror remote. * Limit refs on push. * Added UI part. * Added missing table. * Delete mirror if repository gets removed. * Changed signature. Handle object errors. * Added upload method. * Added "upload" unit tests. * Added transfer adapter unit tests. * Send correct headers. * Added pushing of LFS objects. * Added more logging. * Simpler body handling. * Process files in batches to reduce HTTP calls. * Added created timestamp. * Fixed invalid column name. * Changed name to prevent xorm auto setting. * Remove table header im empty. * Strip exit code from error message. * Added docs page about mirroring. * Fixed date. * Fixed merge errors. * Moved test to integrations. * Added push mirror test. * Added test.
* Improve performance of dashboard list orgs (#16099)Lunny Xiao2021-06-142-3/+23
| | | | | | | | | | | | | * Improve performance of dashboard list orgs * Fix wrong error description * unexport queryUserOrgIDs method * SimpleOrg -> MinimalOrg * . Co-authored-by: 6543 <6543@obermui.de>
* Add OpenID claims "profile" and "email". (#16141)KN4CK3R2021-06-143-1/+72
| | | | | | | | | | | | * Added OpenID claims "profile" and "email". * Splitted error. * Added scopes_supported and claims_supported. * Added more metadata. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fixed sanitize errors. (#15240)KN4CK3R2021-06-131-15/+7
| | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add a new table issue_index to store the max issue index so that issue could ↵Lunny Xiao2021-06-1414-82/+354
| | | | | | | | | | | | | | | | | | | | | | be deleted with no duplicated index (#15599) * Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index * Fix pull index * Add tests for concurrent creating issues * Fix lint * Fix tests * Fix postgres test * Add test for migration v180 * Rename wrong test file name Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* small refactor for retry downloader (#16137)a10121127962021-06-131-134/+83
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-06-133-3/+4
|
* Removable media support (#16136)Andrei Yankovich2021-06-111-3/+3
| | | | Add support removable media for snap version of gitia. for get more info about removable media interface see the snapcraft [documentation](https://snapcraft.io/docs/removable-media-interface)
* Set self-adjusting deadline for connection writing (#16068)zeripath2021-06-115-39/+90
| | | | | | | | | | | | | | | | | | | | | | | | | * Set self-adjusting deadline for connection writing In #16055 it appears that the simple 5s deadline doesn't work for large file writes. Now we can't - or at least shouldn't just set no deadline as go will happily let these connections block indefinitely. However, what seems reasonable is to set some minimum rate we expect for writing. This PR suggests the following algorithm: * Every write has a minimum timeout of 5s (adjustable at compile time.) * If there has been a previous write - then consider its previous deadline, add half of the minimum timeout + 2s per kb about to written. * If that new deadline is after the minimum timeout use that. Fix #16055 * Linearly increase timeout * Make PerWriteTimeout, PerWritePerKbTimeouts configurable Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Vendor Update (#16121)65432021-06-10819-34838/+37941
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-billy/v5 * update github.com/go-git/go-git/v5 * update github.com/go-redis/redis/v8 * update github.com/go-testfixtures/testfixtures/v3 * update github.com/jaytaylor/html2text * update github.com/json-iterator/go * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mattn/go-isatty * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/prometheus/client_golang * update github.com/unrolled/render * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * update github.com/yuin/goldmark-highlighting Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove utf8 option from installation page (#16126)Lunny Xiao2021-06-101-1/+0
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-101-1/+72
|
* Fix bug on getIssueIDsByRepoID (#16119)Lunny Xiao2021-06-102-1/+9
| | | | | * Fix bug on getIssueIDsByRepoID * Add test
* Remove unnecessary goroutine (#16080)Lunny Xiao2021-06-091-14/+12
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add sso.Group, context.Auth, context.APIAuth to allow auth special routes ↵Lunny Xiao2021-06-0919-220/+286
| | | | | | | | | | | (#16086) * Add sso.Group, context.Auth, context.APIAuth to allow auth special routes * Remove unnecessary check * Rename sso -> auth * remove unused method of Auth interface
* Fix http path bug (#16117)Lunny Xiao2021-06-093-0/+131
| | | | | | | | | * Fix http path bug * Add missed request * add tests Co-authored-by: 6543 <6543@obermui.de>
* Refactor routers directory (#15800)Lunny Xiao2021-06-09107-800/+940
| | | | | | | | | | | * refactor routers directory * move func used for web and api to common * make corsHandler a function to prohibit side efects * rm unused func Co-authored-by: 6543 <6543@obermui.de>
* Remove spurious AppSubUrl in serviceworker request. (#16047)zeripath2021-06-081-4/+3
| | | | | | | There is another spurious AppSubUrl placement in the serviceworker registration. This PR removes it. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix `doctor --run check-db-consistency --fix` with label fix (#16094)Lunny Xiao2021-06-081-17/+24
| | | | | | | * Add doctor for wrong label and issue_label data * Fix labels and issue labels check * Remove unnecessary functions
* Always store primary email address into email_address table and also the ↵Lunny Xiao2021-06-0811-236/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state (#15956) * Always store primary email address into email_address table and also the state * Add lower_email to not convert email to lower as what's added * Fix fixture * Fix tests * Use BeforeInsert to save lower email * Fix v180 migration * fix tests * Fix test * Remove wrong submited codes * Fix test * Fix test * Fix test * Add test for v181 migration * remove change user's email to lower * Revert change on user's email column * Fix lower email * Fix test * Fix test
* Fix data URI scramble (#16098)KN4CK3R2021-06-074-19/+23
| | | | | | | * Removed unused method. * No prefix for data uris. * Added test to prevent regressions.
* Merge all deleteBranch as one function and also fix bug when delete branch ↵Lunny Xiao2021-06-074-146/+111
| | | | | | | | | | | | | don't close related PRs (#16067) * Fix bug when delete branch don't close related PRs * Merge all deletebranch as one method * Add missed branch.go * fix comment Co-authored-by: Lauris BH <lauris@nix.lv>
* Fixed assert statements. (#16089)KN4CK3R2021-06-0756-228/+227
|
* Make commit info cancelable (#16032)zeripath2021-06-0612-35/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Make modules/context.Context a context.Context Signed-off-by: Andrew Thornton <art27@cantab.net> * Simplify context calls Signed-off-by: Andrew Thornton <art27@cantab.net> * Set the base context for requests to the HammerContext Signed-off-by: Andrew Thornton <art27@cantab.net> * pass context into get-last-commit Signed-off-by: Andrew Thornton <art27@cantab.net> * Make commit_info cancellable Signed-off-by: Andrew Thornton <art27@cantab.net> * use context as context Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix regression of renderer (#16091)Lunny Xiao2021-06-062-24/+36
| | | | | * Fix regression of renderer * Fix render setting load twice bug
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-061-0/+3
|
* Rewrite of the LFS server (#15523)KN4CK3R2021-06-067-407/+727
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Restructured code. Moved static checks out of loop. * Restructured batch api. Add support for individual errors. * Let router decide if LFS is enabled. * Renamed methods. * Return correct status from verify handler. * Unified media type check in router. * Changed error code according to spec. * Moved checks into router. * Removed invalid v1 api methods. * Unified methods. * Display better error messages. * Added size parameter. Create meta object on upload. * Use object error on invalid size. * Skip upload if object exists. * Moved methods. * Suppress fields in response. * Changed error on accept. * Added tests. * Use ErrorResponse object. * Test against message property. * Add support for the old invalid lfs client. * Fixed the check because MinIO wraps the error. * Use individual repositories. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Change default TMPDIR path in rootless containers (#16077)Steven2021-06-061-0/+2
| | | Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
* Fix panic (#16072)zeripath2021-06-051-1/+1
| | | | | | | There is an incorrect casting in the wrapped queue. Fix #16071 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix typo and add TODO notice (#16064)NekoBit2021-06-051-2/+2
| | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add Image Diff for SVG files (#14867)KN4CK3R2021-06-0519-436/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added type sniffer. * Switched content detection from base to typesniffer. * Added GuessContentType to Blob. * Moved image info logic to client. Added support for SVG images in diff. * Restore old blocked svg behaviour. * Added missing image formats. * Execute image diff only when container is visible. * add margin to spinner * improve BIN tag on image diffs * Default to render view. * Show image diff on incomplete diff. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Copy git data from disk when restore repository (#16066)Lunny Xiao2021-06-043-6/+11
|