summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move gocovmerge as vendor (#10947)Lunny Xiao2020-04-046-4/+382
| | | | | | | | | * Move gocovmerge as vendor * Update Makefile Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add titles and improve messages on sidebar menus (#10872)赵智超2020-04-049-91/+145
| | | | | | | | | | | | | | | | | | | * ui: add more message on sidebar menus * add title on the menus * show some message instead of hide choose bar when have nothing to choose * add simply filter for each menus * do same changes in mew_form.tmpl * remove some unusefull comments in mew_form.tmpl Signed-off-by: a1012112796 <1012112796@qq.com> * do review suggestions * add filter message on sidebar filter * change IsIssueWriter to HasIssuesOrPullsWritePermission Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Rename scripts to build and add revive command as a new build tool command ↵Lunny Xiao2020-04-03182-1227/+15833
| | | | | (#10942) Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update docs to 1.11.4 (#10941)techknowlogick2020-04-031-1/+1
|
* Fix rebase conflict detection in git 2.26 (#10929)zeripath2020-04-031-6/+23
| | | | | | | | | | | | | * Fix rebase conflict detection in git 2.26 Git changed the technique used in rebase from simple apply-patches to use merge. This breaks our conflict detection code. Signed-off-by: Andrew Thornton <art27@cantab.net> * As per @techknowlogick reduce copying Signed-off-by: Andrew Thornton <art27@cantab.net>
* Generate Diff and Patch direct from Pull head (#10936)zeripath2020-04-032-20/+70
| | | | | | | | | | | | | | | | | | * Generate Diff and Patch direct from Pull head Fix #10932 Also fix "Empty Diff/Patch File when pull is merged" Closes #10934 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add tests to ensure that diff does not change Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure diffs and pulls pages work if head branch is deleted too Signed-off-by: Andrew Thornton <art27@cantab.net>
* Change review status icons on PR view style to Github style (#10737)赵智超2020-04-034-22/+25
| | | | | | | | | | | * change the icon of ApproveReview pr from "eye" to "check" like github * change the icon of RejectReview pr from "x" to "request-change" like github * add "-" after "{{" which need to be one line (TODO: may be not change all) Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* [UI] language status icon size (#10749)j.yao.SUSE2020-04-021-5/+7
| | | | | | | | | | | | | | | | | * language status icon size change the repository language status icon size * Update _base.less * fix: eslint rule length-zero-no-unit * [ui] .color-icon change size ti 14px * Update web_src/less/_base.less * Update web_src/less/_base.less Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2020-04-011-3/+32
|
* Prevent deadlock in pull_service.GetDiverging(pr) (#10905)65432020-04-012-47/+10
| | | | | * Switch to use a temporary repository instead of adding remotes to the base gitea repository to prevent deadlocking the base gitea repository. * Add documentation on how to use func **createTemporaryRepo**
* Changelog v1.11.4 (#10916) (#10917)65432020-04-011-0/+14
| | | | | | | | | | | * output of changelog * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* [Docs] Database Preparation - Connection over TLS (#10889)Bagas Sanjaya2020-04-011-0/+133
| | | | | | | | | | | | | | | | | * Database Preparation - Connection over TLS * Step 6 MySQL edit - have been created [before -> earlier] - recreate user, [and this time] * Apply suggestions from @guillep2k Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * certificat[e] typo Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Only update merge_base in checker if not already merged (#10908)zeripath2020-04-012-2/+2
| | | | | | | | Fix #10766 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2020-04-0125-0/+50
|
* Exclude vendor dirs from git CRLF normalization (#10911)silverwind2020-04-0110-1000/+1003
| | | | | | | | | | | * Exclude vendor dirs from git CRLF normalization Should get rid of a few warnings like at the end of `lint-backend` like https://drone.gitea.io/go-gitea/gitea/23117/1/4 * make vendor Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add Organization Wide Labels (#10814)mrsdizzie2020-04-0139-315/+1627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* Add accordion to release list and compact non-latest (#10910)John Olheiser2020-03-311-23/+30
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Various Merge Base fixes (#10786)zeripath2020-03-314-8/+148
| | | | | | | | | * Fix broken merge base migration v128 for merged PR * Allow PRs with deleted base branches to still show diff * as per @lunny Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix milestones too many SQL variables bug (#10880)Lunny Xiao2020-03-315-105/+135
| | | | | | | | | * Fix milestones too many SQL variables bug * Fix test * Don't display repositories with no milestone and fix tests * Remove unused code and add some comments
* Upgrade golangci-lint to 1.24.0 (#10894)zeripath2020-03-307-16/+16
| | | | | | | * upgrade golangci-lint to 1.24.0 to allow go 1.14 compatibility * fix golangci-lint errors * make make golangci-lint work when out of go-path Signed-off-by: Andrew Thornton <art27@cantab.net>
* Split dashboard elements into separate template files (#10885)mrsdizzie2020-03-303-117/+119
| | | | | | | | | | | | | | * Split dashboard elements into separate template files No code change just Move Heatmap and Repo list/search into separate template files (like feeds and navbar already are). This will let a user more easily replace dashboard.tmpl without regularly becoming out of sync with fixes or changes to the actual code. Fixes #10870 * End file with an empty line Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-03-301-0/+7
|
* Use subquery to instead In (#10874)Lunny Xiao2020-03-303-26/+45
| | | | | | | | | * Use subquery to instead In * Support excludedLabelNames on issues options * Fix tests Co-authored-by: zeripath <art27@cantab.net>
* Add IIS Reverse Proxy documentation (#10881)zeripath2020-03-301-0/+56
| | | | | | | | | | | | | | | | * Add IIS Reverse Proxy documentation @mahdiit in #10748 described how to set up IIS as a reverse proxy. This PR adds these to our documentation. Close #10748 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update docs/content/doc/usage/reverse-proxies.en-us.md Co-Authored-By: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-03-2913-26/+0
|
* Protect against NPEs in notifications list (#10879)zeripath2020-03-292-22/+75
| | | | | | | | | | | | Unfortunately there appears to be potential race with notifications being set before the associated issue has been committed. This PR adds protection in to the notifications list to log any failures and remove these notifications from the display. References #10815 - and prevents the panic but does not completely fix this. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Change the order of issues.closed_by to list opening user first (#10876)zeripath2020-03-291-2/+2
| | | | | | | Fix #8266 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Slight simplification of accessibleRepositoryCondition (#10875)zeripath2020-03-291-5/+6
| | | | | | * Slight simplification of accessibleRepositoryCondition Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add 'make lint', restructure 'compliance' pipeline (#10861)silverwind2020-03-294-159/+419
| | | | | | | | | | - Added 'lint', 'lint-frontend', 'lint-backend' targets - Added 'lint-frontend', 'lint-backend' ci steps and restructure the 'compliance' pipeline to have a clear separation between frontend and backend and use parallelism where possible. Also, the main build pipelines now depend on 'compliance' so they will skip if it fails. - Added dependencies on ci steps so they skip when 'compliance' fails - Moved JS linters to devDependencies - Removed deprecated 'js' and 'css' targets
* Remove test from installation directions (#10873)John Olheiser2020-03-291-9/+0
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Avoid logging []byte in queue failures - convert to string first (#10865)zeripath2020-03-291-1/+8
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Create a new function to build search repository condition (#10858)Lunny Xiao2020-03-291-6/+13
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Allow site admin to check /api/v1/orgs endpoints (#10867)zeripath2020-03-282-2/+2
| | | | | Fix #9950 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Convert plumbing.ErrObjectNotFound to git.ErrNotExist in getCommit (#10862)zeripath2020-03-281-0/+6
| | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen (#10863)zeripath2020-03-282-0/+10
| | | | | | | | | * Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen Fix #3985 Signed-off-by: Andrew Thornton <art27@cantab.net> * Pass up the unable to verify
* bug: fix assignees double load bug (#10856)赵智超2020-03-281-4/+0
| | | | | | | | | | | | | | | | | Because the assigness has been loaded in compare.go 416: RetrieveRepoMetas(ctx, ctx.Repo.Repository, true) then issue.go 381 RetrieveRepoMilestonesAndAssignees(ctx, repo) then issue.go 361 -- 365 , they are load assignees So the code on compare.go 425 -- 427 is double work, and which is the reason of #10853 Signed-off-by: a1012112796 <1012112796@qq.com>
* Add Matrix webhook (#10831)S7evinK2020-03-2814-1/+645
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Matrix webhook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add template and related translations for Matrix hook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add actual webhook routes and form Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing file Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Update modules/webhook/matrix_test.go * Use stricter regex to replace URLs Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Escape url and text Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Remove unnecessary whitespace * Fix copy and paste mistake Co-Authored-By: Tulir Asokan <tulir@maunium.net> * Fix indention inconsistency * Use Authorization header instead of url parameter * Add raw commit information to webhook Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Tulir Asokan <tulir@maunium.net>
* Handle push rejection in branch and upload (#10854)zeripath2020-03-2812-120/+197
| | | | | | | | | | | | | * Handle push rejections and push out-of-date in branch creation and file upload. * Remove the duplicated sanitize from services/pull/merge * Move the errors Err(Merge)PushOutOfDate and ErrPushRejected to modules/git * Handle errors better in the upload file dialogs Fix #10460 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* [Docs] Config Cheat Sheet: SSL_MODE Value Description (#10834)Bagas Sanjaya2020-03-281-1/+12
| | | | | | | | | | | * Add description of SSL_MODE values * Apply suggestions from @guillep2k Rewording suggestions Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-03-271-0/+35
|
* make `gitea admin auth list` formatting configurable (#10844)zeripath2020-03-271-1/+37
| | | | | | | | | * make admin auth list formatting configurable Signed-off-by: Andrew Thornton <art27@cantab.net> * As per @guillep2k Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix typo of MSSQL (#10850)Success Go2020-03-271-1/+1
|
* make avatar lookup occur at image request (#10540)zeripath2020-03-2713-21/+154
| | | | | | | | | | | | | speed up page generation by making avatar lookup occur at the browser not at page generation * Protect against evil email address ".." * hash the complete email address Signed-off-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: Lauris BH <lauris@nix.lv>
* Set MySQL rowtype to dynamic for new tables (#10833)Lauris BH2020-03-271-0/+3
| | | | | * Set mysql rowtype to dynamic for new tables * Update models.go
* In authorized_keys use double-quote for windows compatibility (#10841)zeripath2020-03-272-3/+5
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix internal server error on checkboxes (#10845)zeripath2020-03-261-1/+1
| | | | | | | Annoyingly goldmarks SetAttributeString requires that the value of the attribute is still a []byte but does not make it clear in the documentation. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow to set protected file patterns that can not be changed under no ↵Lauris BH2020-03-2715-23/+202
| | | | | conditions (#10806) Co-Authored-By: zeripath <art27@cantab.net>
* Option to set default branch at repository creation (#10803)zeripath2020-03-2610-33/+57
| | | | | | | | | | * Option to set default branch at repository creation * Handle template repos with non-default master branch * Add DefaultBranch handling on creation to API Fix #9542 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix repo summary height (#10825)silverwind2020-03-251-3/+6
| | | | | | | | Extracted the style that keeps the animation of the language bar in check. Fixes: https://github.com/go-gitea/gitea/issues/10754 Co-authored-by: Lauris BH <lauris@nix.lv>
* Simplify grep regexp to be more compatible (#10765)Stefan Bethke2020-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Simplify grep regexp to be more compatible The new expression also works with the BSD implementation of grep. Also, I believe the expression did not work consistently for all possible version numers, for example a two digit patch version would not have been matched. * Fix quote * Allow for two and three part version numbers * Select one, two and three part version numbers, reject amd64 * Also allow one to three parts for node version * Use JS code to print node verion in correct format * Avoid grep altogether * Handle go1.14beta1 as well. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>