summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add scroll-margin-top to account for sticky header (#16269)Jimmy Praet2021-06-272-1/+9
| | | | | Fixes #16263 Co-authored-by: zeripath <art27@cantab.net>
* Make app.ini more restrictive on new installations (#16266)Steven2021-06-271-0/+13
| | | Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
* Add --quiet and --verbose to gitea web to control initial logging (#16260)zeripath2021-06-269-27/+46
| | | | | | | | | | | | | | | | | | | | | | One of the repeatedly reported issues has been that gitea produces too much console logging during set up even if the console logger is turned off. Fundamentally this is due to some otherwise very helpful logging that has to occur before logging is set up. This has come to a head with the merging of #16243 where otherwise potentially helpful Trace logging in the git module now appears on the console. This PR proposes three things: 1. Change the initial default logger to Info not Trace. 2. Change the logging for the AppPath things to Info in recompense. 3. Add two new command line options to gitea web: --quiet and --verbose `gitea web -q` or `gitea web --quiet` will only log Fatal level initially. `gitea web -verbose` will log at Trace. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-06-271-0/+112
|
* Add Visible modes function from Organisation to Users too (#16069)Sergey Dryabzhinsky2021-06-2632-68/+440
| | | | | | | | | | | | | | | | | | You can limit or hide organisations. This pull make it also posible for users - new strings to translte - add checkbox to user profile form - add checkbox to admin user.edit form - filter explore page user search - filter api admin and public user searches - allow admins view "hidden" users - add app option DEFAULT_USER_VISIBILITY - rewrite many files to use Visibility field - check for teams intersection - fix context output - right fake 404 if not visible Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Limit stdout tracelog to actual stdout (#16258)zeripath2021-06-261-1/+5
| | | | | | Related #16243 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Let package git depend on setting but not opposite (#15241)Lunny Xiao2021-06-2617-92/+113
| | | | | * Let package git depend on setting but not opposite * private some package variables
* Fixed issues not updated by commits (#16254)KN4CK3R2021-06-261-4/+5
| | | `UpdateIssuesCommit` may get called with fewer commits because of `FeedMaxCommitNum` and therefore may miss some commands.
* Add better errors for disabled account recovery (#15117)John Olheiser2021-06-253-3/+10
| | | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Improve efficiency in FindRenderizableReferenceNumeric and getReferences ↵zeripath2021-06-261-7/+9
| | | | | | | | | | | | | (#16251) * Fuzzer finds an NPE due to incorrect URLPrefix The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw * Make FindRenderizableReferenceNumeric and getReferences more efficient Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Added support for gopher URLs. (#14749)ayb2021-06-256-1/+54
| | | | | | | | | * Added support for gopher URLs. * Add setting and make this user settable instead Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fuzzer finds an NPE due to incorrect URLPrefix (#16249)zeripath2021-06-251-1/+1
| | | | | | | The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Append to existing trailers in generated squash commit message (#15980)Jimmy Praet2021-06-252-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | * Remove superfluous newline before Co-authored-by trailers * Append to existing PR description trailer section If the existing PR description message already contains a trailer section (e.g. Signed-off-by: ), append to it instead of creating a new trailer section. * Reuse compiled regexp * Simplify regex and deal with trailing \n in PR description * Add tests for CommitMessageTrailersPattern - add support for Key:Value (no space after colon) - add support for whitespace "folding" * Update services/pull/pull_test.go Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Prevent webhook action buttons from shifting (#16087)Steven2021-06-251-3/+3
| | | | | | | | | On long webhook urls the action buttons (edit, delete) have been shifted by the url text. Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix heatmap activity (#15252)siddweiker2021-06-255-18/+58
| | | | | | | | | | | | | | | | | | | | | | | * Group heatmap actions by 15 minute intervals Signed-off-by: Sidd Weiker <siddweiker@gmail.com> * Add multi-contribution test for user heatmap Signed-off-by: Sidd Weiker <siddweiker@gmail.com> * Add timezone aware summation for activity heatmap Signed-off-by: Sidd Weiker <siddweiker@gmail.com> * Fix api user heatmap test Signed-off-by: Sidd Weiker <siddweiker@gmail.com> * Update variable declaration style Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use gitea logging module for git module (#16243)65432021-06-2519-58/+60
| | | | | | remove log() func from gogs times and switch to proper logging Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Add tag protection (#15629)KN4CK3R2021-06-2527-182/+1220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added tag protection in hook. * Prevent UI tag creation if protected. * Added settings page. * Added tests. * Added suggestions. * Moved tests. * Use individual errors. * Removed unneeded methods. * Switched delete selector. * Changed method names. * No reason to be unique. * Allow editing of protected tags. * Removed unique key from migration. * Added docs page. * Changed date. * Respond with 404 to not found tags. * Replaced glob with regex pattern. * Added support for glob and regex pattern. * Updated documentation. * Changed white* to allow*. * Fixed edit button link. * Added cancel button. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix IIS reverse proxy doc (#16246)Martin Strob2021-06-251-0/+3
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-259-5/+213
|
* API: Allow COMMENT reviews to not specify a body (#16229)sebastian-sauer2021-06-252-6/+70
| | | | | | | | | | | | | * Allow COMMENT reviews to not specify a body when using web ui there is no need to specify a body. so we don't need to specify a body if adding a COMMENT-review via our api. * Ensure comments or Body is provided and add some integration tests for reviewtype COMMENT. Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
* Replace ARCCache with TwoQueueCache to avoid patent issue (#16240)Mura Li2021-06-241-2/+2
| | | | Co-authored-by: Mura Li <typeless@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix diff expansion is missing final line in a file (#16222)KN4CK3R2021-06-242-4/+13
| | | | | | * Fixed down offset. * Fixed wrong line count result.
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-2426-25/+233
|
* Do not show No match found for tribute (#16231)zeripath2021-06-231-2/+2
| | | | | | | | | Tribute.js will show an untranslated no match found if no emoji or mentions. Further the mentions should really require a preceding space. This PR fixes both of these. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238)zeripath2021-06-231-1/+5
| | | | | | | Instead log these at debug - with warn logging for other errors. Fix #16235 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Rework repository archive (#14723)Lunny Xiao2021-06-2325-460/+628
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use storage to store archive files * Fix backend lint * Add archiver table on database * Finish archive download * Fix test * Add database migrations * Add status for archiver * Fix lint * Add queue * Add doctor to check and delete old archives * Improve archive queue * Fix tests * improve archive storage * Delete repo archives * Add missing fixture * fix fixture * Fix fixture * Fix test * Fix archiver cleaning * Fix bug * Add docs for repository archive storage * remove repo-archive configuration * Fix test * Fix test * Fix lint Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add sanitizer rules per renderer (#16110)KN4CK3R2021-06-2310-113/+215
| | | | | | | * Added sanitizer rules per renderer. * Updated documentation. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [API] Add repoGetTag (#16166)65432021-06-234-37/+132
| | | | | | | | | | | * GetTag -> GetAnnotatedTag * API: Add repoGetTag * fix swagger docs * support "/" as tag name char Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix 500 Error with branch and tag sharing the same name #15592 (#16040)Viktor Yakovchuk2021-06-233-1/+37
| | | | | | | | | | | | | | | * Fix 500 Error with branch and tag sharing the same name #15592 Fixed 500 error while create Pull request when there are more than one sources (branch, tag) with the same name Fix #15592 Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net> * fix logging Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
* Add code block highlight to orgmode back (#14222)Lunny Xiao2021-06-231-0/+44
| | | | | Fix missed orgmode code block hightlight Co-authored-by: zeripath <art27@cantab.net>
* [API] GET / SET User Settings (#16169)65432021-06-237-1/+281
| | | | | | | | | | | | | | | | | | | | * API: GET/SET User Settings * linter * Apply suggestions from code review * Update modules/structs/user.go * lint * fix swagger * move User2UserSettings to convert * as per @zeripath "preferences" -> "settings" Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add docs for windows env vars (#16236)techknowlogick2021-06-231-0/+2
| | | | | | | | | | | | * Add docs for windows env vars Fix #16213 * Fix docs/content/doc/developers/hacking-on-gitea.en-us.md Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Small refactoring of modules/private (#15947)KN4CK3R2021-06-2313-231/+185
| | | | | | | | | | | | | | | | | * Use correct variable name. * doer is never nil here. * Use status code constants. * Replaced generic map with concrete struct. * Fixed windows lint. * Removed unused method. * Changed error codes. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix Nits (#16234)65432021-06-232-4/+4
| | | | | | | * template fix * nits * add doer to "created issue/pull"
* Use data path instead of config path (#16227)KN4CK3R2021-06-233-3/+12
|
* Localize Email Templates (#16200)65432021-06-2313-71/+143
| | | close #14822
* Run compliance on amd64 infra (#16232)techknowlogick2021-06-231-4/+4
| | | | | * Run compliance on amd64 infra * Update .drone.yml
* Improve notifications for WIP draft PR's (#14663)Jimmy Praet2021-06-238-43/+97
| | | | | | | | | | | | | | | | | | | * #14559 Reduce amount of email notifications for WIP draft PR's don't notify repo watchers of WIP draft PR's * #13190 Notification when WIP Pull Request is ready for review * Send email notification to repo watchers when WIP PR is created * Send ui notification to repo watchers when WIP PR is created * send specific email notification when PR is marked ready for review instead of reusing the CreatePullRequest action * Fix lint error Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use pulls url if issue is a pull request (#16230)sebastian-sauer2021-06-221-1/+5
| | | | | | | | | if a pull request is displayed use the /pulls path if a pull requests diff is displayed use the /pulls/{id}/files url if an issue is displayed use the issues url Fixes #16102 Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
* Use html.Parse rather than html.ParseFragment (#16223)zeripath2021-06-221-13/+12
| | | | | | | | * Use html.Parse rather than html.ParseFragment There have been a few issues with html.ParseFragment - just use html.Parse instead. * Skip document node Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update milestone counters on new issue. (#16183)KN4CK3R2021-06-214-56/+39
| | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Update documentation for Implicit TLS (#16220)zeripath2021-06-212-4/+4
| | | | | | | As per RFC 8314, it is now recommended to prefer TLS over STARTTLS. Fix #16160 Signed-off-by: Andrew Thornton <art27@cantab.net>
* reqOrgMembership calls need to be preceded by reqToken (#16198)zeripath2021-06-212-3/+7
| | | | | | | | ReqOrgMembership calls need to be preceded by reqToken Fix #16192 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Add tests for all webhooks (#16214)KN4CK3R2021-06-2015-891/+2110
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added tests for MS Teams. * Added tests for Dingtalk. * Added tests for Telegram. * Added tests for Feishu. * Added tests for Discord. * Added tests for closed issue and pullrequest comment. * Added tests for Matrix. * Trim all spaces. * Added tests for Slack. * Added JSONPayload tests. * Added general tests. * Replaced duplicated code. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-211-0/+4
|
* More efficiently parse shas for shaPostProcessor (#16101)zeripath2021-06-2111-10/+122
| | | | | | | | | | | | | | | | * More efficiently parse shas for shaPostProcessor The shaPostProcessor currently repeatedly calls git rev-parse --verify on both backends which is fine if there is only one thing that matches a sha - however if there are multiple things then this becomes wildly inefficient. This PR provides functions for both backends which are much faster to use. Fix #16092 * Add ShaExistCache to RenderContext Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Use git log name-status in get last commit (#16059)zeripath2021-06-2140-295/+2538
| | | | | | | | | | | | | | | | | * Improve get last commit using git log --name-status git log --name-status -c provides information about the diff between a commit and its parents. Using this and adjusting the algorithm to use the first change to a path allows for a much faster generation of commit info. There is a subtle change in the results generated but this will cause the results to more closely match those from elsewhere. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-201-0/+21
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-196-4/+42
|
* Reintroduce squash merge default comment as a config setting (#16134)parnic2021-06-193-5/+37
| | | | | | | * Reinstate most of commit 09304db9a5d88c035a96f74a4544572bc8c5dac0 * Move the behaviour behind a config setting * Also fix the initial #12365