summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove spurious logging (#12139) (#12148)zeripath2020-07-051-3/+0
| | | | | | | | | | | | Backport #12139 Unfortunately #10745 merged a spurious logging message. This PR removes this. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* templates/repo/empty.tmpl : fix repo setup instructions (#12147)Andreas Shimokawa2020-07-051-1/+1
| | | | Co-authored-by: codeberg <codeberg@codeberg.org> Co-authored-by: zeripath <art27@cantab.net>
* Move EventSource to SharedWorker (#12095) (#12130)zeripath2020-07-059-37/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move EventSource to SharedWorker (#12095) Backport #12095 Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1 open browser connections from preventing gitea from opening multiple tabs. Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating Fix #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io> * Bugfix for shared event source For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net> * Re-fix #12095 again Unfortunately some of the suggested changes to #12095 introduced bugs which due to caching behaviour of sharedworkers were not caught on simple tests. These are as follows: * Changing from simple for loop to use includes here: ```js register(port) { if (!this.clients.includes(port)) return; this.clients.push(port); port.postMessage({ type: 'status', message: `registered to ${this.url}`, }); } ``` The additional `!` prevents any clients from being added and should read: ```js if (this.clients.includes(port)) return; ``` * Dropping the use of jQuery `$(...)` selection and using DOM `querySelector` here: ```js async function receiveUpdateCount(event) { try { const data = JSON.parse(event.data); const notificationCount = document.querySelector('.notification_count'); if (data.Count > 0) { notificationCount.classList.remove('hidden'); } else { notificationCount.classList.add('hidden'); } notificationCount.text() = `${data.Count}`; await updateNotificationTable(); } catch (error) { console.error(error, event); } } ``` Requires that `notificationCount.text()` be changed to use `textContent` instead. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix ui bug in wiki commit page (#12089) (#12125)赵智超2020-07-031-2/+9
| | | | | | | | | | | | | | | * Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Set the base url when migrating from Gitlab using access token or username ↵zeripath2020-07-021-1/+1
| | | | | | | | | | | | without password (#11852) (#12104) Backport #11852 When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password Fix #11851 Co-authored-by: Gernot Eger <gernot.eger@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix gitgraph branch continues after merge (#12044) (#12105)zeripath2020-07-021-0/+7
| | | | | | | | | | | | | | | | | | | Backport #12044 * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io>
* Fix merge section in dark theme (#12086) (#12109)Lauris BH2020-07-021-26/+29
| | | | | | | Backport #12086 * Fix merge section in dark theme * Fix lint
* Ensure BlameReaders close at end of request (#12102) (#12103)zeripath2020-07-013-8/+19
| | | | | | | | | | | | | | | | | | | | | Backport #12102 this was thought to be due to timeouts, however on closer look this appears to be due to the Close() function of the BlameReader hanging with a blocked stdout pipe. This PR fixes this Close function to: * Cancel the context of the cmd * Close the StdoutReader - ensuring that the output pipe is closed Further it makes the context of the `git blame` command a child of the request context - ensuring that even if Close() is not called, on cancellation of the Request the blame is command will also be cancelled. Fixes #11716 Closes #11727 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Disable go module when downloading global binaries (#12030) (#12084)Stefan Bethke2020-06-281-6/+6
| | | | | | | | | | | | | Prevent `go get` from touching `go.mod` and `go.sum` when executing global binaries during the build process. Once https://github.com/golang/go/issues/30515 is fixed, we should is whatever solution is provided there. Fixes: https://github.com/go-gitea/gitea/pull/12010 Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix comments webhook panic backport (#12058)Cornel2020-06-258-9/+39
| | | | | * Handle HookIssueReviewed action in webhook * Fix webhook comment handling type cast panic
* Disable dropzone's timeout (#12024) (#12032)silverwind2020-06-241-0/+2
| | | | | | | | | | | | | | Dropzone 4.4 introduced a 30s XHR timeout that will kill any upload still in progress. This disable that timeout again. Ref: https://www.dropzonejs.com/#config-timeout Ref: https://github.com/go-gitea/gitea/pull/10645 Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute Fixes: https://github.com/go-gitea/gitea/issues/12022 Fixes: https://github.com/go-gitea/gitea/issues/11906 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Changelog for v1.12.1 (#12006)v1.12.1Lauris BH2020-06-221-0/+14
|
* Handle multiple merges in gitgraph.js (#11996) (#12000)zeripath2020-06-212-40/+39
| | | | | | | | | | | | Backport #11996 There is a bug in web_src/js/vendor/gitgraph.js whereby it fails to handle multiple merges in a single commit correctly. This PR adds changes to make this work. Fix #11981 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add serviceworker.js to KnownPublicEntries (#11992) (#11994)silverwind2020-06-202-10/+8
| | | | | Fixes a wrong 302 redirect to the login page, see https://github.com/go-gitea/gitea/issues/11989. Also made it so the reserved username list is extended with those known entries so we avoid code duplication.
* For language detection do not try to analyze big files by content (#11971) ↵Lauris BH2020-06-191-3/+7
| | | | (#11975)
* Fix scrollable header on dropdowns (#11893) (#11965)Cirno the Strongest2020-06-181-1/+1
| | | | | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> (cherry picked from commit 1fb783efb0dbb3cb866f37ee6b77a003b636de59)
* Changelog v1.12.0 (#11927)v1.12.065432020-06-181-55/+66
| | | | | | | | | * merge RC-logs * Update * Update CHANGELOG.md Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Changelog v1.11.7 (#11953) (#11955)65432020-06-181-0/+9
| | | | | * Changelog v1.11.7 * Update CHANGELOG.md
* Fix commenting on non-utf8 encoded files (#11916) (#11950)65432020-06-186-4/+41
| | | | | | | | | | | * Add comment on non-unicode line to force fail Signed-off-by: Andrew Thornton <art27@cantab.net> * Just quote/unquote patch Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Use google/uuid to instead satori/go.uuid (#11943) (#11946)Lunny Xiao2020-06-1838-817/+967
| | | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Align show/hide outdated button on code review block (#11932) (#11944)Cirno the Strongest2020-06-181-0/+6
| | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit 6c38f371ea3ed98a2ed0534261f5d175c11c628d)
* [Backport] Update to go-git v5.1.0 (#11936) (#11941)65432020-06-1876-555/+3133
| | | | | | | * update go-git 5.0.0 -> v5.1.0 * vendor Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Global default branch setting (#11918) (#11937)techknowlogick2020-06-177-3/+11
| | | | | | | | | | | | | | | * Global default branch setting (#11918) * Global default branch setting * add to app.ini example per @silverwind * update per @lunny Co-authored-by: John Olheiser <john.olheiser@gmail.com> * Update modules/setting/repository.go Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Use ID or Where to instead directly use Get when load object from database ↵65432020-06-179-28/+25
| | | | | | | | | | (#11925) (#11934) Backport #11925 Use ID or Where to instead directly use Get when load object from database Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update CommitsAhead CommitsBehind on Pull BaseBranch Change too (#11912) ↵65432020-06-161-1/+10
| | | | | | | (#11915) * Update CommitsAhead CommitsBehind on Pull BaseBranch Change too (#11912) * CI.restart()
* Invalidate comments when file is shortened (#11882) (#11884)zeripath2020-06-151-1/+4
| | | | | | | Backport #11882 Fix #10686 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Rework api/user/repos for pagination (#11827) (#11877)Cirno the Strongest2020-06-133-29/+48
| | | | | | | | | | | | | | | * Add count to `GetUserRepositories` so that pagination can be supported for `/user/{username}/repos` * Rework ListMyRepos to use models.SearchRepository ListMyRepos was an odd one. It first fetched all user repositories and then tried to supplement them with accessible map. The end result was that: * Limit for pagination did not work because accessible repos would always be appended * The amount of pages was incorrect if one were to calculate it * When paginating, all accessible repos would be shown on every page Hopefully it should now work properly. Fixes #11800 and does not require any change on Drone-side as it can properly interpret and act on Link header which we now set. Co-authored-by: Lauris BH <lauris@nix.lv> (cherry picked from commit 0159851cc3fa80e4df4908a5e760afa20452f712)
* Handle more pathological branch and tag names (#11843) (#11863)zeripath2020-06-127-87/+41
| | | | | | | | | | | | | | | | Backport #11843 It's possible to push quite pathological appearing branch names to gitea using git push gitea reasonable-branch:refs/heads/-- at which point large parts of the UI will break. Similarly you can git push origin reasonable-tag:refs/tags/-- which wil return an error. This PR fixes the problems these cause. It also changes the code from creating branches to pushing to ensure that branch restoration has to pass hooks. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix search form button overlap (#11840) (#11864)Cirno the Strongest2020-06-122-10/+6
| | | | Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit 8770bceafa3844a97f35d3f8a35089438bf2f33b)
* Add doctor check to set IsArchived false if it is null (partial backport ↵zeripath2020-06-112-0/+28
| | | | | | | | | | | | | #11853) (#11859) Partial backport of #11853 Add doctor check to set IsArchived false if it is null. (Migration change unfortunately not possible to be backported.) Fix #11824 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent panic on empty HOST for mysql (#11850) (#11856)zeripath2020-06-111-1/+1
| | | | | Backport #11850 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use DEFAULT_PAGING_NUM instead of MAX_RESPONSE_ITEMS in ListOptions (#11831) ↵Cirno the Strongest2020-06-101-1/+4
| | | | | | (#11836) Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit 2b2b3e4c3726ef224e87bb444340bebd3a70badb)
* Fix reply octicon (#11821) (#11822)John Olheiser2020-06-092-2/+2
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Honor DEFAULT_PAGING_NUM for API (#11805) (#11813)Cirno the Strongest2020-06-095-15/+16
| | | | | | | | | | | * Honor DEFAULT_PAGING_NUM for API * set pagination to 10 for tests * lint Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit cefbf73aea912c510a8dd194532233076b822d37)
* Ensure rejected push to refs/pull/index/head fails nicely (#11724) (#11809)zeripath2020-06-082-5/+37
| | | | | | | | | | | Backport #11724 A pre-receive hook that rejects pushes to refs/pull/index/head will cause a broken PR which causes an internal server error whenever it is viewed. This PR handles prevents the internal server error by handling non-existent pr heads and sends a flash error informing the creator there was a problem. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog v1.12.0-rc2 (#11799)v1.12.0-rc265432020-06-081-3/+57
| | | | | | | | | | | | | | | | | | * Update * format * seperate * Update CHANGELOG.md Co-authored-by: techknowlogick <matti@mdranta.net> * Update CHANGELOG.md Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Make tabular menu styling consistent for arc-green (#11570) (#11798)Cirno the Strongest2020-06-071-28/+24
| | | | | | | | | | | | | | | | | * Make tabular menu styling consistent for arc-green * rework completely * transparent borders * use darker color for active item; override only colors for borders * Update web_src/less/themes/theme-arc-green.less Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> (cherry picked from commit 4395c607ed79985602a99dda251f090fbd2f5cf9)
* Add option to API to update PullRequest base branch (#11666) (#11796)65432020-06-074-3/+52
| | | | | | | * EditPull: add option to change base Close #11552 Co-authored-by: Lauris BH <lauris@nix.lv>
* In File Create/Update API return 404 if Branch does not exist (#11791) (#11795)65432020-06-071-0/+4
| | | | | * In File Create/Update API return 404 if Branch does not exist (#11791) * v1.12 version ;)
* Fix doer of rename repo (#11789) (#11794)赵智超2020-06-071-1/+1
| | | | | | | | | fix #11725 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Increase maximum SQLite variables count to 32766 (#11696) (#11783)Cirno the Strongest2020-06-074-16/+10
| | | | | | | | | | | | * Increase maximum SQLite variables count to 32766 (#11696) per https://www.sqlite.org/limits.html Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit a5aa5c58c1bf5a0c91226e0cbbd7b95bb8f74692) * Fix missing CGO_EXTRA_FLAGS build arg for docker Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Initialize SimpleMDE when making a code comment (#11749) (#11785)zeripath2020-06-062-13/+28
| | | | | | | | | | | Backport #11749 Fix #11704 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix to allow comment poster to edit or delete his own comments (#11671) (#11774)赵智超2020-06-064-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * bug: fix comment update permision check No the ui only allow poster to update or delet comment, which is not reasonable and different with handle logic, this pr change it to allow poster of comment do it ref code: https://github.com/go-gitea/gitea/blob/e8955173a9be1acaa9a3755c37b6059422acda20/routers/repo/issue.go#L1636 https://github.com/go-gitea/gitea/blob/e8955173a9be1acaa9a3755c37b6059422acda20/routers/repo/issue.go#L1681 fix #11663 Signed-off-by: a1012112796 <1012112796@qq.com> * simplify code * fix sign in Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix timezone on issue deadline (#11697) (#11784)Cirno the Strongest2020-06-063-3/+8
| | | | | | | | * Fix timezone on issue deadline * FormatDate Co-authored-by: zeripath <art27@cantab.net> (cherry picked from commit bbe13b60cdf93d8296f4c6dab624df2b571db234)
* European Portuguese translation (#11568) (#11778)Emanuel Angelo2020-06-065-8/+58
| | | | | This PR includes the modifications necessary to make use of the European Portuguese translation from the default setting. Co-authored-by: zeripath <art27@cantab.net>
* Update emoji dataset with skin tone variants (#11678) (#11763)mrsdizzie2020-06-044-1742/+3155
| | | | | | | | | | | * Update emoji dataset with skin tone variants Since the format of emoji that support skin tone modifiers is predictable we can add different variants into our dataset when generating it so that we can match and properly style most skin tone variants of emoji. No real code change here other than what generates the dataset and the data itself. * use escape unicode sequence in map Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [API] on 500 error only show message if gitea in dev mode (#11641) (#11753)65432020-06-031-0/+4
| | | | | | | * add API specific InternalServerError() * return 500 error msg only if not Production mode * rm unnessesary change
* Add missing templates (#11729) (#11748)S7evinK2020-06-032-0/+6
| | | | Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Fix verification of subkeys of default gpg key (#11713) (#11747)zeripath2020-06-032-2/+64
| | | | | | | | | | | | | | | | | * Fix verification of subkeys of default gpg key Fix #10309 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove debug log * Update models/gpg_key.go * As per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix styling for commiter on diff view (#11715) (#11744)Cirno the Strongest2020-06-033-11/+33
| | | | | | | | | | | | | | | | | | | | | * Fix styling for commiter on diff view * Update options/locale/locale_en-US.ini * Update templates/repo/commit_page.tmpl Co-authored-by: silverwind <me@silverwind.io> * Update templates/repo/commit_page.tmpl Co-authored-by: silverwind <me@silverwind.io> * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io> (cherry picked from commit 8e035f81c01ba6c1ccf8952ffad37bef063aad2d)