summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change language statistics to save size instead of percentage (#11681)Lauris BH2020-05-305-37/+149
| | | | | | | | | | | * Change language statistics to save size instead of percentage in database Co-Authored-By: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> * Do not exclude if only language * Fix edge cases with special langauges Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
* Make tabular menu styling consistent for arc-green (#11570)Cirno the Strongest2020-05-301-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>
* Add logging to long migrations (#11647)zeripath2020-05-294-13/+154
| | | | | | | * Add logging to long migrations Also fix v136 to not use models Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix issue with DiffIndex on initial commit (#11677)zeripath2020-05-292-2/+9
| | | | | | | | | | | | | | | | | Unfortunately #11614 introduced a bug whereby the initial commit of a repository could not be seen due to there being no parent commit to create a clear diff from. Here we create a diffstat from the difference between the parentless SHA and the SHA of the empty tree - a constant known to git. (With thanks to @L0veSunshine for informing me of this SHA) Thanks to @a1012112796 for initial attempt to fix. Fix #11650 Closes #11674 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: L0veSunshine <xuan199651@gmail.com>
* Add API Endpoint for Branch Creation (#11607)Terence Le Huu Phuong2020-05-299-1/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [FEATURE] [API] Add Endpoint for Branch Creation Issue: https://github.com/go-gitea/gitea/issues/11376 This commit introduces an API endpoint for branch creation. The added route is POST /repos/{owner}/{repo}/branches. A JSON with the name of the new branch and the name of the old branch is required as parameters. Signed-off-by: Terence Le Huu Phuong <terence@qwasar.io> * Put all the logic into CreateBranch and removed CreateRepoBranch * - Added the error ErrBranchDoesNotExist in error.go - Made the CreateNewBranch function return an errBranchDoesNotExist error when the OldBranch does not exist - Made the CreateBranch API function checks that the repository is not empty and that branch exists. * - Added a resetFixtures helper function in integration_test.go to fine-tune test env resetting - Added api test for CreateBranch - Used resetFixture instead of the more general prepareTestEnv in the repo_branch_test CreateBranch tests * Moved the resetFixtures call inside the loop for APICreateBranch function * Put the prepareTestEnv back in repo_branch_test * fix import order/sort api branch test Co-authored-by: zeripath <art27@cantab.net>
* Normalize avatar radius (#11589)Cirno the Strongest2020-05-291-1/+6
| | | | | We already made avatars square for .ui avatar.img class but this is not enough, and in some place Fomantic default styling still applied. This PR updates our override of radius to match all Fomantic classes.
* Update emoji regex (#11584)mrsdizzie2020-05-293-7/+31
| | | | | When matching emoji, use a regex built from the data we have instead of something generic using unicode ranges. A generic regex can't tell the difference between two separate emoji next to each other or one emoji that is built out of two separate emoji next to each other. This means that emoji that are next to each other without space in between will be now accurately spanned individually with proper title etc...
* Fix missing authorization check on pull for public repos of private/limited ↵Cirno the Strongest2020-05-291-0/+11
| | | | | | org (#11656) Fixes #11651
* [skip ci] Updated translations via CrowdinGiteaBot2020-05-2924-24/+4
|
* Doctor check & fix db consistency (#11111)65432020-05-295-64/+275
| | | | | | | | | | | | | needed to fix issue as described in #10280 * rename check-db to check-db-version * add check-db-consistency: * find issues without existing repository * find pulls without existing issues * find tracked times without existing issues/pulls * find labels without repository or org reference Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* translate: Change translate for admin.config.enable_captcha (#11657)赵智超2020-05-291-1/+1
| | | | | | | | | | | | | | * translate: Change translate for admin.config.enable_captcha add 'register' to make it more accurate Signed-off-by: a1012112796 <1012112796@qq.com> * Update options/locale/locale_en-US.ini 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: Lauris BH <lauris@nix.lv>
* Exclude generated files from language statistics (#11653)Lauris BH2020-05-2928-1258/+1400
| | | * Update go-enry to v2.5.2
* Default MSSQL port 0 to allow automatic detection by default (#11642)zeripath2020-05-281-1/+1
| | | | | | | Fix #11633 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add debug option to hooks (#11624)zeripath2020-05-281-2/+17
| | | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Handle expected errors in AddGPGkey API (#11644)65432020-05-284-4/+18
| | | | | | | | | * handle GPG Parse & Email Errors * correct TEST * update Swagger * more Docu
* Return json on 500 error from API (#11574)65432020-05-281-4/+21
| | | | | | | | | | | | | | | * add API specific InternalServerError() Co-authored-by: zeripath <art27@cantab.net> * return 500 error msg only if not Production mode * Revert "return 500 error msg only if not Production mode" This reverts commit 8467b2cee674ad205b452780ca88abb1b27643c8. * InternalServerError Co-authored-by: zeripath <art27@cantab.net>
* Use -1 to disable key algorithm type in ssh.minimum_key_sizes (#11635)zeripath2020-05-281-0/+2
| | | | | Fix #11634 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-05-271-0/+4
|
* Fix alignment for commits on dashboard (#11595)mrsdizzie2020-05-271-6/+15
| | | | | Fix alignment issue between commit SHA and commit message
* When must change password only show Signout (#11600)zeripath2020-05-263-6/+31
| | | | | | | | | | | | When "Must Change Password" simplify the navbar header to only show the signout button as all other links will redirect back. This prevents the notifications icon from showing preventing initialization of the event-source and hence preventing redirect_to being set, however in addition do not set the redirect_to cookie if we are looking at the /user/events page. Fix #11554 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-05-262-0/+4
|
* Add link to owners election tickets, reorder to most-recent first (#11632)Sandro Santilli2020-05-261-12/+12
|
* Fix numbr of files, total additions, and deletions (#11614)zeripath2020-05-268-15/+106
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Apply padding to approval icons on PR list (#11622)Cirno the Strongest2020-05-261-0/+6
| | | | Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-05-264-4/+1
|
* Fix missing styling for shabox on PR commit history (#11625)Cirno the Strongest2020-05-261-65/+67
|
* Make issues.force_push_codes message shorter (#11575)Cirno the Strongest2020-05-251-1/+1
| | | | | Also removes stray dot and whitespace. Trying to make base message shorter; I don't envy translators, the message can easily get multi-line in English, I'm sure that is even bigger problem in other languages.
* Fix styling for PR merge section when no checks (#11609)Cirno the Strongest2020-05-253-3/+15
| | | Makes styling consistent between two cases. Also removed unnecessary double border.
* Style code review comment for arc-green (#11572)Cirno the Strongest2020-05-251-3/+36
| | | | | | | | * Style code review comment for arc-green * change border around review for light; update border around textarea to match #11570 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Right-align status icon on pull request commit history (#11594)Cirno the Strongest2020-05-251-3/+3
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix margin on PR form (#11566)Cirno the Strongest2020-05-251-0/+4
|
* Fix margin for attached top header on code review (#11571)Cirno the Strongest2020-05-251-1/+4
| | | | | Introduced naively by #11463 The margin was being applied too widely.
* Add warning to mailer documentation about authentication (#11563)zeripath2020-05-243-3/+16
| | | | | | | | | | | | | | | * Add warning to mailer documentation about authentication References #7966 Signed-off-by: Andrew Thornton <art27@cantab.net> * As per @guillep2k and @mrsdizzie * as per @mrsdizzie Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Do not show avatar for "{{user}} added X commits" (#11591)Cirno the Strongest2020-05-241-3/+0
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add chocolatey package install instructions (#11586)Will 保哥2020-05-241-3/+6
| | | | | | | | | | | | * Update from-package.en-us.md https://github.com/go-gitea/gitea/issues/10800 * Update docs/content/doc/installation/from-package.en-us.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix inconsistent font size for markdown preview on new PR view (#11565)Cirno the Strongest2020-05-241-0/+4
| | | | We use same method for new issue form and issue view, but was missing from new PR view making it one place where markdown preview is inconsistent in font size.
* When initialising repositories ensure that the user doing the creation is ↵zeripath2020-05-241-1/+1
| | | | | | | the initializer (#11601) Fix #10760 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-05-241-9/+9
|
* Fix wrong milestone in webhook message (#11596)Gary Kim2020-05-241-1/+1
| | | | | Fixes #11295 Signed-off-by: Gary Kim gary@garykim.dev
* Prevent empty query parameter being set on dashboard (#11561)zeripath2020-05-241-1/+6
| | | | | | | | | Prevent the dashboard from setting an empty query parameter Fix #11543 Signed-off-by: Andrew Thornton art27@cantab.net
* Fix images in wiki edit preview (#11546)mrsdizzie2020-05-242-2/+3
| | | | | | | | Make sure wiki editor sets wiki to true so gitea renders it as a wiki page. Also change the context data attr for edit form. This looks wrong but everywhere else in our code assumes the urlPrefix to be just the repo url when rendering and manually adds /wiki to the rendered url regardless. Fixes #11540
* Allow different HardBreaks settings for documents and comments (#11515)zeripath2020-05-2412-29/+77
| | | | | | | | | | | | | | | | GH has different HardBreaks behaviour for markdown comments and documents. Comments have hard breaks and documents have soft breaks - therefore Gitea's rendering will always be different from GH's if we only provide one setting. Here we split the setting in to two - one for documents and one for comments and other things. Signed-off-by: Andrew Thornton art27@cantab.net Changes to index.js as per @silverwind Co-authored-by: silverwind <me@silverwind.io> Changes to docs as per @guillep2k Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix serviceworker output file and misc improvements (#11562)silverwind2020-05-246-21/+38
| | | | | | | | | | | | | | * Fix serviceworker output file and misc improvements - Fix output file location for production build - Cache more asset types: fonts and worker variants - Parallelize a few tasks during initalization - Only invalidate caches starting with our prefix - Remove public/serviceworker.js before building - Remove font preloads, they cause strange cors issues - Misc eslint config adjustments * remove webpack output files on watch-frontend
* Add missing padding for multi-commit list on PR view (#11593)Cirno the Strongest2020-05-241-0/+4
|
* Prevent (caught) panic on login (#11590)zeripath2020-05-231-6/+14
| | | | | | | | | | | | | | | | Unfortunately when the virtual session is released it requires that the real session does not exist. This worked fine when sessions were only saved at the end of request/response cycle however, now sessions are saved proactively this does not hold. The result is a caught panic in the logs during every log-in. This panic has no significant side-effects but should not occur. This PR marks the virtual session as released when released and updates it if the same session is released again. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix styling and padding for commit list on PR view (#11588)Cirno the Strongest2020-05-243-7/+10
| | | | | * Fix styling and padding for commit list on PR view * fix bold on author
* Properly handle and return empty string for dangling commits in ↵Cirno the Strongest2020-05-234-3/+11
| | | | GetBranchName (#11587)
* Ensure serviceworker is created as /serviceworker.js (#11577)zeripath2020-05-232-1/+2
| | | | | | | | | #11538 moved the serviceworker to webbox but unfortunately created the serviceworker in public/js rather than public/ This PR fixes this, fixing multiple issues with broken js as a result of that change. Signed-off-by: Andrew Thornton art27@cantab.net
* Enforce transparent background on editor toolbar elements (#11569)Cirno the Strongest2020-05-231-0/+4
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix Enter not working in SimpleMDE (#11564)silverwind2020-05-221-1/+1
| | | | | | | | | | * Fix Enter not working in SimpleMDE This condition was wrongly inverted, leading to all enter keys being blocked. Fixes: https://github.com/go-gitea/gitea/issues/11559 * fix it for absent tribute too