summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Ensure executable bit is kept on the web editor (#10607) (#10614)Lunny Xiao2020-03-051-2/+10
| | | | | | Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Fix potential bugs (#10513) (#10518)65432020-02-281-1/+1
| | | | | | * use e if it is an option * potential nil so check err first * check err first * m == nil already checked
* Handle push rejection message in Merge & Web Editor (#10373) (#10497)zeripath2020-02-271-4/+24
| | | | | | | | | | | | | | Backport #10373 * Handle push rejection message in Merge * Fix sanitize, adjust message handling * Handle push-rejection in webeditor CRUD too Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368) (#10493)guillep2k2020-02-261-1/+1
|
* Change admin dashboard to POST (#10465) (#10466)John Olheiser2020-02-251-0/+10
| | | | | | | | | | | | * Change admin dashboard to POST (#10465) * Add form and convert to POST * Redirect for flash * Convert octicons back to fa for 1.11 Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix webhook bug (#10427) (#10432)Lunny Xiao2020-02-241-2/+2
| | | | Co-authored-by: techknowlogick <matti@mdranta.net>
* Various fixes in login sources (#10428) (#10429)zeripath2020-02-232-6/+8
| | | | Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Don't manually replace whitespace during render (#10291) (#10315)mrsdizzie2020-02-172-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't manually replace whitespace during render For historical reasons Gitea manually alters the urlPrefix and replaces a whitespace with a +. This Works for URLs, but we're also passing urlPrefix to git calls and adding the + is breaking the tree path. Goldmark will automatically convert a white space to the proper %20, so we should leave the string as is which lets us pass it to git unmodified and then let Goldmark fix it. Also fixed separate bug in URLJoin I noticed while testing where it will silently discard sections of a path that have # in them (possibly others). We should just escape it first. Fixes 10156 * Escape elems as well * Revert "Escape elems as well" This reverts commit 8bf49596fee6fac4d9da256cd1e90a0ec0183671. * restart ci * remove changes to URLJoin * restart ci Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix Workerpool deadlock (#10283) (#10284)zeripath2020-02-152-3/+4
| | | | | * Prevent deadlock on boost * Force a boost in testchannelqueue
* Stop hanging issue indexer initialisation from preventing shutdown (#10243) ↵zeripath2020-02-121-17/+15
| | | | | | | | (#10249) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Fix commit between two commits calculation if there is only last commit ↵Lauris BH2020-02-111-1/+1
| | | | (#10225) (#10226)
* Prevent double waitgroup decrement (#10170) (#10175)guillep2k2020-02-071-3/+7
| | | | | | * Prevent double waitgroup decrement Co-authored-by: zeripath <art27@cantab.net>
* Sanitize credentials in mirror form (#9975) (#9991)Lunny Xiao2020-01-262-0/+28
|
* Fix pull view when head repository or head branch missed and close related ↵Lunny Xiao2020-01-251-5/+17
| | | | | | | | | | | | | | | | | | | | pull requests when delete head repository or head branch (#9927) (#9974) * fix pull view when head repository or head branch missed and close related pull requests when delete branch * fix pull view broken when head repository deleted * close pull requests when head repositories deleted * Add tests for broken pull request head repository or branch * fix typo * ignore special error when close pull request Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix check for push on default branch (#9963)guillep2k2020-01-241-1/+2
| | | | Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix file rename/copy not supported by indexer (#9967)guillep2k2020-01-241-2/+27
|
* Don't convert ellipsis in markdown (#9905) (#9937)John Olheiser2020-01-221-2/+3
| | | | | | | | | | | | | | | | | | * Don't convert ellipsis Signed-off-by: jolheiser <john.olheiser@gmail.com> * Formatting Co-Authored-By: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix wrong hint when status checking is running on pull request view (#9886) ↵Lunny Xiao2020-01-222-0/+64
| | | | | | | | | | | | | | | | | (#9928) * Fix wrong hint when status checking is running on pull request view * fix lint * fix test * fix test * fix wrong tmpl * fix import * rename function name
* Fix RocketChat (#9908) (#9921)John Olheiser2020-01-211-10/+5
| | | | | | | | | | | | | | | | | | * Fix RocketChat?? Signed-off-by: jolheiser <john.olheiser@gmail.com> * Don't send attachment for repo create/delete Signed-off-by: jolheiser <john.olheiser@gmail.com> * Make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update queue_redis.go (#9911)zeripath2020-01-211-5/+6
|
* Add option to prevent LDAP from deactivating everything on empty search ↵zeripath2020-01-202-0/+2
| | | | | | | | | | | (#9879) (#9896) * Add option to prevent LDAP from deactivating everything on empty search * Update options/locale/locale_en-US.ini Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wrong permissions check when issues/prs shared operations (#9885) (#9889)Lunny Xiao2020-01-202-3/+3
| | | | | | | | | | * Fix wrong permissions check when issues/prs shared operations * move redirect to the last of the function * fix swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow hyphen in language name (#9873) (#9880)zeripath2020-01-191-1/+1
| | | | Co-authored-by: techknowlogick <matti@mdranta.net>
* [Backport] CI optimisation & add github token env var (#9875)65432020-01-192-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ci: use docker image for golangci-lint (#9737) * ci: re-ordering Drone CI for optimizing time (#9719) * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try offloading mysql8 to arm64 * Revert "ci: try offloading mysql8 to arm64" This reverts commit c60de5db1cf8b5984c3014a57da6490f06c8d980. * ci: try offloading pgsql to arm64 * ci: activate ldap on arm64 * ci: test mysql8 in place pgsql arm64 * chore: clean un-needed move * typo * ci: revert runnning mysql on arm64 * ci: run compliance on arm * chore: limit change * chore: readd maybe need for release fetch-tags * ci: remove docker-linux-amd64-dry-run * ci: remove docker-linux-amd64-dry-run * Revert "ci: remove docker-linux-amd64-dry-run" This reverts commit 0715f65b11c37869359aaaa5d22901da512e8184. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * ci: use new mssql image (#9720) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * ci: run notify on arm64 (#9762) * ci: run notify on arm64 Free one jobs on amrd64 * Update .drone.yml * Update .drone.yml * Update .drone.yml Based on: https://github.com/appleboy/drone-discord/blob/master/.drone.yml#L339 * improve trigger Co-authored-by: techknowlogick <matti@mdranta.net> * ci: move some integration tests on arm64 (#9747) * tests: configure github remaining limit + read token (#9800) * ci: configure remaining github limmit * prepend with github since package is common to all migrations * add RefreshRate * Update github.go * add missing space * go fmt * Read env variable GITHUB_READ_TOKEN for token * Update .drone.yml * ci: simplify tag/release by always running coverage (#9774) * ci: simplify tag/release by always running coverage * use mod and vendor for unit test coverage * remove not needed lfs for unit test * use arm drone agent for docs (#9776) * run translations pipeline on arm server (#9865) * add git-check to Makefile Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net>
* Make CertFile and KeyFile relative to CustomPath (#9868) (#9874)zeripath2020-01-192-2/+22
| | | | | | | | | | | | | | | | | | * Make CertFile and KeyFile relative to CustomPath The current code will absolute CertFile and KeyFile against the current working directory. This is quite unexpected for users. This code makes relative paths absolute against the CustomPath. Fix #4196 * Improve error reporting when reading certificates * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix issues/pulls dependencies problems (#9842) (#9864)Lunny Xiao2020-01-191-2/+2
| | | | | | | * Fix issues/pulls dependencies problems * fix swagger and api param name * fix js
* Fix markdown anchor links (#9673) (#9840)Moritz2020-01-171-0/+3
|
* Fix missing unlock in uniquequeue (#9791)zeripath2020-01-161-0/+1
|
* Fix #9752 (#9769) (#9775)65432020-01-151-1/+1
| | | | Co-authored-by: zeripath <art27@cantab.net>
* Fix missing updated time on migrated issues and comments (#9744) (#9764)Lunny Xiao2020-01-146-0/+15
| | | | | | | | | | * Fix missing updated time on migrated issues and comments * Fix testing and missing updated on migrating pullrequest Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Make hook status printing configurable with delay (#9641) (#9725)zeripath2020-01-121-0/+4
| | | | | | | | | | | | | | | | * Delay printing hook statuses until after 1 second * Move to a 5s delay, wrapped writer structure and add config * Update cmd/hook.go * Apply suggestions from code review * Update cmd/hook.go Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Remove unused lock (#9710)zeripath2020-01-112-1/+3
|
* Missed q.lock.Unlock() will cause panic (#9706)zeripath2020-01-111-1/+0
|
* Don't attempt to close issue if already closed (#9699)guillep2k2020-01-111-3/+5
|
* Prevent redirect to Host (#9678) (#9679)zeripath2020-01-091-1/+2
|
* Add HTML URL to API Issues (#9654) (#9661)John Olheiser2020-01-095-4/+5
| | | | | | | | | | | | | | * Add HTML URL to API Issues Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add PR review webhook to Telegram (#9653) (#9655)John Olheiser2020-01-081-0/+21
| | | | | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* fix #9648 (#9652)65432020-01-081-5/+6
|
* Graceful Queues: Issue Indexing and Tasks (#9363)zeripath2020-01-0727-643/+2453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Queue: Add generic graceful queues with settings * Queue & Setting: Add worker pool implementation * Queue: Add worker settings * Queue: Make resizing worker pools * Queue: Add name variable to queues * Queue: Add monitoring * Queue: Improve logging * Issues: Gracefulise the issues indexer Remove the old now unused specific queues * Task: Move to generic queue and gracefulise * Issues: Standardise the issues indexer queue settings * Fix test * Queue: Allow Redis to connect to unix * Prevent deadlock during early shutdown of issue indexer * Add MaxWorker settings to queues * Merge branch 'master' into graceful-queues * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_disk.go * Update modules/queue/queue_disk_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Rename queue.Description to queue.ManagedQueue as per @guillep2k * Cancel pool workers when removed * Remove dependency on queue from setting * Update modules/queue/queue_redis.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * As per @guillep2k add mutex locks on shutdown/terminate * move unlocking out of setInternal * Add warning if number of workers < 0 * Small changes as per @guillep2k * No redis host specified not found * Clean up documentation for queues * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md * Update modules/indexer/issues/indexer_test.go * Ensure that persistable channel queue is added to manager * Rename QUEUE_NAME REDIS_QUEUE_NAME * Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME" This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add a /user/login landing page option (#9622)Timon Engelke2020-01-061-0/+3
| | | | | | * Add a /user/login landing page option * Add test case for login landing page
* Only show sender if it makes sense (#9601)John Olheiser2020-01-047-65/+71
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add branch protection option to block merge on requested changes. (#9592)David Svantesson2020-01-031-0/+1
| | | | | | | | | | | | | | | | | | | * Add branch protection option to block merge on requested changes. * Add migration step * Fix check to correct negation * Apply suggestions from code review Language improvement. Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Copyright year. Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Some more e-mail notification fixes (#9596)mrsdizzie2020-01-031-1/+2
| | | | | | | | | | | | | | | | | | | | | * Some more e-mail notification fixes A few more small e-mail notification fixes/changes * Style footer of notification email to be smaller * Include text for when pull request is merged * Don't include original body of issue or PR when merging/closing by setting issue.Content to "" in these cases * Set Re: prefix and meessage-ID headers based on actName instead of checking for a comment. This fixes a bug where certain actions that didn't have a comment were setting Message-ID instead of In-Reply-To which caused some mail programs not to show those messages as they would have had the same Message-ID as a previous message. Also fixes the case where a final comment and closing message would have been displayed out of order if you didn't have a copy of the original issue/pr cretion message. * Update other template footers for consistency
* [API] Fix 9544 | return 200 when reaction already exist (#9550)65432019-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add ErrReactionAlreadyExist * extend CreateReaction * reaction already exist = 200 * extend FindReactionsOptions * refactor swagger options/definitions * fix swagger-validate * Update models/error.go Co-Authored-By: zeripath <art27@cantab.net> * fix test PART1 * extend FindReactionsOptions with UserID option * catch error on test * fix test PART2 * format ... Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* update swagger info (#9558)65432019-12-311-4/+8
|
* Change markdown rendering from blackfriday to goldmark (#9533)zeripath2019-12-3112-265/+1064
| | | | | | | | | | | | | | | | | | | * Move to goldmark Markdown rendering moved from blackfriday to the goldmark. Multiple subtle changes required to the goldmark extensions to keep current rendering and defaults. Can go further with goldmark linkify and have this work within markdown rendering making the link processor unnecessary. Need to think about how to go about allowing extensions - at present it seems that these would be hard to do without recompilation. * linter fixes Co-authored-by: Lauris BH <lauris@nix.lv>
* Provide Default messages for merges (#9393)zeripath2019-12-302-9/+48
| | | | Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix repository issues pagination bug when there are more than one label ↵Lunny Xiao2019-12-281-0/+8
| | | | filter (#9512)
* Refactor webhooks to reduce code duplication (#9422)Cornel2019-12-2810-698/+534
| | | | | | | | | | | | | | | | | | | | | | | | * Start webhook refactoring to reduce code duplication * More webhook refactoring * Unify webhook release messages * Fix webhook release link * Remove sql import * More webhook refactoring * More webhook refactoring * Webhook tests extended * Fixed issue opened webhook Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Stop various tests from adding to the source tree (#9515)zeripath2019-12-284-11/+61
| | | | | | | Instead of just adding test generated files to .gitignore prevent them from being produced in the first place. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>