summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove User.GetOrganizations() (#14032)65432021-06-183-56/+4
| | | as title
* Changelog v1.14.3 (#16131) (#16196)65432021-06-181-0/+50
| | | | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* fix TestAPIRepoTransfer (#16189)65432021-06-181-4/+4
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-182-6/+20
|
* Fix some API bugs (#16184)65432021-06-185-5/+13
| | | | | * Repository object only count releases as releases (fix #16144) * EditOrg respect RepoAdminChangeTeamAccess option (fix #16013)
* Add asymmetric JWT signing (#16010)KN4CK3R2021-06-1713-47/+481
| | | | | | | | | | | * Added asymmetric token signing. * Load signing key from settings. * Added optional kid parameter. * Updated documentation. * Add "kid" to token header.
* [API] Add repoCreateTag (#16165)65432021-06-177-3/+180
| | | | | | | * Add API CreateTag * Add Test * API: expose Tag Message
* Speed up git diff highlight generation (#16180)Mura Li2021-06-1714-0/+1249
| | | | Co-authored-by: Mura Li <typeless@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* [API] expose repo.GetReviewers() & repo.GetAssignees() (#16168)65432021-06-178-11/+170
| | | | | | | * API: expose repo.GetReviewers() & repo.GetAssignees() * Add tests * fix unrelated swagger query type
* Run processors on whole of text (#16155)zeripath2021-06-173-318/+416
| | | | | | | | | | | There is an inefficiency in the design of our processors which means that Emoji and other processors run in order n^2 time. This PR forces the processors to process the entirety of text node before passing back up. The fundamental inefficiency remains but it should be significantly ameliorated. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] ListReleases add filter for draft and pre-releases (#16175)65432021-06-179-22/+158
| | | | | | | | | | | * invent ctx.QueryOptionalBool * [API] ListReleases add draft and pre-release filter * Add X-Total-Count header * Add a release to fixtures * Add TEST for API ListReleases
* [API] User expose counters (#16167)65432021-06-173-0/+25
|
* [API] Issue Search Add filter for MilestoneNames (#16173)65432021-06-174-1/+40
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-06-171-1/+15
|
* 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>