summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-2817-90/+138
|
* Link to previous blames in file blame page (#16259)Norwin2021-06-286-101/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a link to each blame hunk, to view the blame of an earlier version of the file, similar to GitHub. Also refactors the blame render from fmtstring based to template based. * Fix blame bottom line and add blame prior button * Jump to previous parent commit from the commit. * Fix previous commit link * Fix previous blame link * Fix the given file not exist in the previous commit. * Fix blameRow struct not export * fix theming issues, rename template var * remove unused LastCommit fetch * fix location of blame-hunk divider * rewrite previous commit checks * remove duplicate commit lookup its already resolved and stored in ctx.Repo.Commit! * split out blamePart processing into function Co-authored-by: rogerluo410 <rogerluo410@gmail.com>
* Fix API to return author for author on commits(#16276)65432021-06-271-2/+2
|
* Handle misencoding of login_source cfg in mssql (#16268)zeripath2021-06-272-20/+21
| | | | | | | | | | | | | | | | * Handle misencoding of login_source cfg in mssql Unfortunately due a bug in xorm (see https://gitea.com/xorm/xorm/pulls/1957) updating loginsources on MSSQL causes them to become corrupted. (#16252) Whilst waiting for the referenced PR to be merged and to handle the corrupted loginsources correctly we need to add a wrapper to the `FromDB()` methods to look for and ignore the misplaced BOMs that have been added. Fix #16252 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/login_source.go
* Add previous/next buttons to review comments (#16273)Jimmy Praet2021-06-272-0/+30
| | | | | | Co-authored-by: Norwin <noerw@users.noreply.github.com> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Refactor Webhook + Add X-Hub-Signature (#16176)KN4CK3R2021-06-2718-179/+130
| | | | | | | | | | | | | | This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`. ## :warning: BREAKING :warning: * The `Secret` field is no longer passed as part of the payload. * "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129). Close #16115 Fixes #7788 Fixes #11755 Co-authored-by: zeripath <art27@cantab.net>
* Make allowed Visiblity modes configurable for Users (#16271)65432021-06-2711-63/+146
| | | | | | | Now that #16069 is merged, some sites may wish to enforce that users are all public, limited or private, and/or disallow users from becoming private. This PR adds functionality and settings to constrain a user's ability to change their visibility. Co-authored-by: zeripath <art27@cantab.net>
* Add jpraet to MAINTAINERS (#16274)Jimmy Praet2021-06-271-0/+1
|
* review comments: break-word for long file names (#16272)Norwin2021-06-271-1/+1
| | | | | | | * review comments: break-word for long file names fixes #16248 Co-authored-by: zeripath <art27@cantab.net>
* 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>