summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Allow-/Block-List for Migrate & Mirrors (#13610)65432020-11-2811-4/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add black list and white list support for migrating repositories * fix fmt * fix lint * fix vendor * fix modules.txt * clean diff * specify log message * use blocklist/allowlist * allways use lowercase to match url * Apply allow/block * Settings: use existing "migrations" section * convert domains lower case * dont store unused value * Block private addresses for migration by default * fix lint * use proposed-upstream func to detect private IP addr * a nit * add own error for blocked migration, add tests, imprufe api * fix test * fix-if-localhost-is-ipv4 * rename error & error message * rename setting options * Apply suggestions from code review Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Verify password for local-account activation (#13631)65432020-11-282-28/+58
| | | | | | | | | | | | | | | | | | | | | * Verify passwords for activation This is to prevent 3rd party activation * Fix function comment * only veify password on local-account aktivation * fix lint * Update templates/user/auth/activate.tmpl Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reduce number of docker pulls on ci (#13739)silverwind2020-11-281-26/+0
| | | | | | Should reduce errors like https://drone.gitea.io/go-gitea/gitea/32989/7/2 by only pulling each distinct image once per pipeline. Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-11-282-1/+4
|
* Push HEAD instead of master when initialising repositories (#13719)zeripath2020-11-281-2/+2
| | | | | | | | | | | | | | | | | | * Push HEAD instead of master when initialising repositories It is possible on modern gits to change the initial branch to something other than master. This breaks initialising repositories because we assume that the initial branch is going to be master unless specifically changed. This PR simply bypasses this issue by pushing the HEAD rather than the master branch. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/repository/init.go Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add block on official review requests branch protection (#13705)a10121127962020-11-2814-141/+228
| | | | | Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix .editorconfig (#13735)silverwind2020-11-281-1/+1
| | | | | | | | These whitespaces introduced in #13698 seem to break my editorconfig plugin in sublime text resulting in tab-indented files getting converted to spaces on save. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix missing stylesheets on installation page (#13736)Simon2020-11-281-0/+6
| | | | | | | | | | | | | | When running gitea for the first time, the stylesheets for the installation page are broken since the middleware that statically serves stylesheets does not get executed by chi. This is because if no handlers are registered in chi, it will drop all middleware. This commit introduces a "dummy" handler to deal with that quirk. Closes #13725 Thanks: Lunny Xiao <xiaolunwen@gmail.com> for finding the quirk Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* ui: show 'owner' tag for real owner (#13689)a10121127962020-11-283-3/+43
| | | | | | | | | | | | | | | | | * ui: show 'owner' tag for real owner Signed-off-by: a1012112796 <1012112796@qq.com> * Update custom/conf/app.example.ini * simplify logic fix logic fix a small bug about original author * remove system manager tag Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix review request notification issue link when external issue tracker is ↵Jimmy Praet2020-11-281-1/+1
| | | | | enabled (#13723) The issue.HTMLURL() automatically gets converted to the expected #issue format by the post processors
* Format files (#13698)65432020-11-2837-134/+92
| | | | | | | | | | | | | | | | * align "make help" * format * untouch build/generate-svg.js * untouch .eslintrc * combine editorconfig's * rm editorconfig Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Handle and propagate errors when checking if paths are Dirs, Files or Exist ↵zeripath2020-11-2729-94/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | (#13186) * Ensure errors from IsDir propagate * Handle errors when checking IsFile * Handle and propagate errors from IsExist * Update modules/templates/static.go * Update modules/templates/static.go * Return after ctx.ServerError * Apply suggestions from code review * Fix tests The previous merge managed to break repo_form.go Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fixed the log path on fail2ban page (#13726)Jesse Laprade2020-11-271-8/+8
| | | | | | * Changed path from /home/git/gitea/log/gitea.log to /var/lib/gitea/log/gitea.log on the fail2ban page, so the log matches the instructions found on the following binary installation page: https://docs.gitea.io/en-us/install-from-binary/#create-required-directory-structure
* Enable linting of JS inside templates (#13708)silverwind2020-11-287-9/+81
| | | | | | | | | | Indentation-related rules are disabled because indent templates with tabs but our lint rules expect spaces. Also had to exclude a few files where using template variables in the JS is causing syntax errors for the JS parser. I don't think there's a way to solve this otherwise. Co-authored-by: Lauris BH <lauris@nix.lv>
* Use trashcan icon for remove review request (#13722)Jimmy Praet2020-11-272-2/+2
|
* Increment skip to avoid infini-loop (#13703)John Olheiser2020-11-271-1/+1
| | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent clone protocol button flash on page load (#13626)silverwind2020-11-263-22/+21
| | | | | | | | | | | | | * Prevent clone protocol button flash on page load Previously, the saved active buttons would flash on page load because if delay involved in JS execution. Prevent these flashes bydisabling transitions on page load and run the script right after. It's not an ideal solution (which would require server-side storage of user settings like this) but I'd say better than before. * add defer Co-authored-by: zeripath <art27@cantab.net>
* CSS navbar and color tweaks (#13609)silverwind2020-11-2618-291/+267
| | | | | | | | | | | | | | | | | | | * CSS and color tweaks - Unify navbar-style menus - Fix admin bar overlapping menu bar - Fixes file edit comment box - Fix double border on review box - Fix review timeline icons * Many fixes to new-menu and navbar layout enhancements * misc settings fixes * navbar tweak * fix pr tabs * branch tag and arc color tweaks
* Use chronological commit order in default squash message (#13661) (#13696)Jimmy Praet2020-11-251-2/+3
|
* Support shortened commit SHAs in URLs (#13686)Lauris BH2020-11-251-4/+13
| | | | | | | | | | | * Support shortened commit SHAs in URLs and API * Add test case for short sha * Fix format * Revert API support * Add canonical link headers for short commit ID URLs
* [skip ci] Updated translations via CrowdinGiteaBot2020-11-251-0/+2
|
* Issue and Pulls lists rework (#13594)silverwind2020-11-2512-478/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Issue and Pulls lists rework Reorganized and restyled the issue and pull request lists. * color and layout tweaks * use new issue list on dashboard as well * move pagination into template * misc tweaks * fix label hover * fix milestone list * fix discrepancies between issue and milestone list, add new 'merge' helper * fmt * simplify merge helper * remove whitespace * fix startIndex * further simplify dict merging * rename helper to 'mergeinto' for clarity * allow bottom-row to wrap Co-authored-by: Lauris BH <lauris@nix.lv>
* CSS table fixes (#13692)silverwind2020-11-243-22/+17
| | | | | | | | | * CSS table fixes Override the right fomantic selectors. Fixes: https://github.com/go-gitea/gitea/issues/13690 * use flexbox
* Fix heatmap rendering in Chrome and Safari (#13645)silverwind2020-11-231-8/+23
| | | | | | | | | | | | | | | | | | * Fix heatmap rendering in Chrome and Safari Apparently SVG inside flexbox renders slightly different across browsers where Firefox would stretch to fit the parent while Chrome and safari wouldn't. Stretch the SVG to the width of the parent for consistent rendering. Also did a few minor tweaks on the min-height of the box so it takes up less space on smaller responsive breakpoints. Fixes: https://github.com/go-gitea/gitea/issues/13634 Fixes: https://github.com/go-gitea/gitea/pull/13637 * position tweak Co-authored-by: zeripath <art27@cantab.net>
* [API] Add more filters to issues search (#13514)65432020-11-234-9/+130
| | | | | | | | | | | * Add time filter for issue search * Add limit option for paggination * Add Filter for: Created by User, Assigned to User, Mentioning User * update swagger * Add Tests for limit, before & since
* Update _repository.less (#13672)Cirno the Strongest2020-11-231-6/+2
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Send error message when CSRF token is missing (#13676)Kevin Zúñiga2020-11-231-1/+1
|
* Don't show a dropdown menu when only 1 merge option is available (#13660) ↵Jimmy Praet2020-11-222-16/+36
| | | | (#13670)
* [skip ci] Updated translations via CrowdinGiteaBot2020-11-2126-52/+41
|
* Handle incomplete diff files properly (#13662)zeripath2020-11-212-6/+96
| | | | | | | | | | | | | | | | | | | | | | | * Handle incomplete diff files properly The code for parsing diff hunks has a bug whereby a very long line in a very long diff would not be completely read leading to an unexpected character. This PR ensures that the line is completely cleared Fix #13602 Signed-off-by: Andrew Thornton <art27@cantab.net> * Also allow git max line length <4096 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add test case Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improve strings (#13548)Norwin2020-11-201-2/+2
| | | | | | | | | | | * Correct oauth signup title When linking accounts, a password is not required anymore, so this string becomes confusing * string "remenber me": be more precise Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Refactor combine label comments with tests (#13619)Lunny Xiao2020-11-202-56/+275
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* skip email validation on empty string (#13627)65432020-11-202-17/+35
| | | | - move validation into its own function - use a session for UpdateUserSetting
* API: Admin EditUser: Make FullName, Email, Website & Location optional (#13562)65432020-11-194-21/+66
| | | | | | | | | * API: Admin EditUser: Make FullName, Email, Website & Location optional * update swagger docs * add Tests Co-authored-by: Lauris BH <lauris@nix.lv>
* finaly fix gitlab migration with subdir 2.0 (#13646)65432020-11-201-2/+6
| | | | | | | | | * final fix 2.0? * ignore Approvals for pulls if not found * CI.restart() Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix issue/pull request list assignee filter (#13647)Karl Heinz Marbaise2020-11-193-2/+4
| | | | | | | | | | | | | | * Fixes #13641 - Filtering in Pull Request kept all the time. - The URL contains all the time the assignee in cases where once a type has been selected. Signed-off-by: Karl Heinz Marbaise <kama@soebes.de> * Followup Fixes #13641 - Filtering in Pull Request kept all the time. - The URL contains all the time the assignee in cases where once a type has been selected. - The same behaviour was observed issues viewed via milestones. Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* specific version in docker compose (#13644)techknowlogick2020-11-192-7/+7
| | | | | | | * specific version in docker compose fix #13643 * update latest version
* finaly fix gitlab migration with subdir (#13629)65432020-11-191-2/+9
| | | | | * finaly fix #13535 * add logging
* [skip ci] Updated translations via CrowdinGiteaBot2020-11-181-0/+1
|
* Remove fetch request from heatmap (#13623)silverwind2020-11-1811-74/+86
| | | | | | | | | | | | | | | | | | | * Remove fetch request from heatmap Render heatmap data directly to HTML, eliminating one HTTP request on frontpage and user profile. Also added min-height to the container so the page content will no longer move after loading. * rename and error display * also log the js error * add error handler * remove useless inline style and hide divider on small screens * Update routers/user/home.go * Update routers/user/profile.go
* Config lock bot (#13624)65432020-11-181-0/+23
| | | | | * config lock bot * Update .github/lock.yml
* Fix a bug when check if owner is active (#13612)Lunny Xiao2020-11-182-2/+2
|
* Docs: Installation from package (#13607)gsilvan2020-11-181-12/+15
| | | | | | | | | | | | | | | | * add Arch Linux * add Arch Linux ARM * remove Debian There is no package in any of Debian's official repositories as of 17.11.2020 17:55 UTC. * shrink Alpine Linux * Update docs/content/doc/installation/from-package.en-us.md Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <matti@mdranta.net>
* HTTP cache rework and enable caching for storage assets (#13569)silverwind2020-11-178-36/+91
| | | | | | | | | | This enabled HTTP time-based cache for storage assets, primarily avatars. I have not observed If-Modified-Since from browsers during tests but I guess it's good to support regardless. It introduces a new generic httpcache module that can handle both time-based and etag-based caching. Additionally, manifest.json and robots.txt are now also cachable.
* Move metrics from macaron to chi (#13601)Lunny Xiao2020-11-173-22/+22
|
* fix media query edge case (#13546)Norwin2020-11-1712-51/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | * fix media query edge case was failing for 768px width before * code review * define responsive breakpoints as less variables * add missing variables.less * rename variables, drop screen constraints * fix less import * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> * code review altough it doesnt matter, LESS lazy evals variables Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix label display on new issues (#13590)silverwind2020-11-176-40/+26
| | | | | | | | | | | | | | | | | | * Fix label display on new issues PR #13570 broke label rendering for new issues and pulls because missed the fact that the code was relying on the DOM elements being toggled by JavaScript. On top of that, the label rendering for new issues and pull was using an outdated template which I consolidated in a new shared template. * remove wrapper element and style tweaks * style tweaks * use shared template for whole label list Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Change markdown font weight to 600 (#13584)silverwind2020-11-161-4/+4
| | | | | | | Previously it was reduced globally from 700 to 500 but it actually needs to be 600 to match GitHub's rendering. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Fix Fomatic Build (#13595)silverwind2020-11-161-2/+2
| | | Port of #13593 to 1.14
* [skip ci] Updated translations via CrowdinGiteaBot2020-11-161-10/+10
|