Commit Graph

8229 Commits

Author SHA1 Message Date
6543 cf35355db8 Ensure that diff stats can scroll independently of the diff (#8581) (#8611)
This PR ensures that once opened the diff stats detail box can be scrolled independently of the diff on the compare page.

Fixes #5532 

Details:

* make diff-detail-box the main container
* move file diff at the same level as diff-stats
* make diff-view options sticy again
* make diff-stats scroll if to mouch
* rm useless css info
* less: mv diff-stats to own class
* use new css class
* cleanup less file
* diff-counter: margin-right: 15px;
* make CI work
* make numbers colorful
* add sign (-/+) to numbers
2019-10-21 16:53:34 +08:00
Viktor Szakats 8e9265c402 webhook: set Content-Type for application/x-www-form-urlencoded (#8600)
This header is missing since switching http client from GiteaServer (`code.gitea.io/gitea/modules/httplib`) to Go-http-client/1.1 (`net.http`). The header [was added by default](https://github.com/go-gitea/gitea/blob/release/v1.8/modules/httplib/httplib.go#L301) by the former, but this is no longer true with `net.http`, so it needs to be done explicitly.

Closes: #7700
2019-10-20 18:18:05 +01:00
6543 435ce92935 Fix #8582 by handling empty repos (#8587) (#8594)
* Fix #8582 by handling empty repos

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2019-10-19 21:35:22 +01:00
Lunny Xiao 22cea96c18 Fix bug on pull requests when transfer head repository (#8564) (#8569)
* fix bug on pull requests when transfer head repository

* add migration and fix lint

* fix tests and add a cache check on LoadBaseRepo
2019-10-19 08:29:35 +01:00
6543 7565ac02c2 Allow more than 255 characters for tokens in external_login_user tabl… (#8585)
* Allow more than 255 characters for tokens in external_login_user table (#8554)

Signed-off-by: Wenxuan Zhao <viz@linux.com>

* use old xorm repo
2019-10-19 12:54:09 +08:00
zeripath 4e85c8e0d8
Add missed close in ServeBlobLFS (#8527) (#8542) 2019-10-16 20:32:15 +01:00
zeripath 34b8becef0 Ensure that GitRepo is set on Empty repositories (#8539) (#8541)
Both issues/new and settings/hooks/git expect `ctx.Repo.GitRepo` to be set.
This PR changes the context code to open the GitRepo.

Fixes #8538
2019-10-17 00:03:25 +08:00
6543 0752a3895a Fix migrate mirror 500 bug (#8526) (#8530)
* fix migrate mirror 500 bug

* update backport
2019-10-16 10:48:45 +01:00
guillep2k 595033f78e Fix password complexity regex for special characters (backport for v1.10.0) (#8524)
* Fix extra space

* Fix regular expression

* Fix error template name

* Simplify check code, fix default values, add test

* Fix router tests

* Fix fmt

* Fix setting and lint

* Move cleaning up code to test, improve comments

* Tidy up variable declaration
2019-10-16 11:09:27 +08:00
6543 db0d4ffdc7 Changelog for 1.10.0-RC1 (#8510)
* Changelog for 1.10.0
* clean up | remove TESTING and DOCS sction | short BUILD section

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-Authored-By: zeripath <art27@cantab.net>
2019-10-14 20:34:21 +01:00
David Svantesson 366806db32 Fix errors in create org UI regarding team access permission. (#8506) 2019-10-14 19:20:42 +01:00
GiteaBot 54c137b373 [skip ci] Updated translations via Crowdin 2019-10-14 17:46:01 +00:00
guillep2k eb8975dcce Add nofollow to sign in links (#8509) 2019-10-14 18:43:48 +01:00
GiteaBot 8c8a93c025 [skip ci] Updated translations via Crowdin 2019-10-14 15:45:33 +00:00
Maxim Tkachenko db657192d0 Password Complexity Checks (#6230)
Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords.

Co-Authored-By: T-M-A <maxim.tkachenko@gmail.com>
Co-Authored-By: Lanre Adelowo <adelowomailbox@gmail.com>
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-10-14 16:24:26 +01:00
Lunny Xiao f9aba9ba0f fix bug on FindExternalUsersByProvider (#8504) 2019-10-14 08:22:46 +01:00
Lunny Xiao e3e44a59d0 Update migrated repositories' issues/comments/prs poster id if user has a github external user saved (#7751)
* update migrated issues/comments when login as github

* add get userid when migrating or login with github oauth2

* fix lint

* add migrations for repository service type

* fix build

* remove unnecessary dependencies on migrations

* add cron task to update migrations poster ids and fix posterid when migrating

* fix lint

* fix lint

* improve code

* fix lint

* improve code

* replace releases publish id to actual author id

* fix import

* fix bug

* fix lint

* fix rawdata definition

* fix some bugs

* fix error message
2019-10-14 09:10:42 +03:00
Antoine GIRARD ba201aaa44 vendor: update mvdan.cc/xurls/v2 to v2.1.0 (#8495) 2019-10-14 08:38:15 +08:00
guillep2k 15809d81f7 Rewrite reference processing code in preparation for opening/closing from comment references (#8261)
* Add a markdown stripper for mentions and xrefs

* Improve comments

* Small code simplification

* Move reference code to modules/references

* Fix typo

* Make MarkdownStripper return [][]byte

* Implement preliminary keywords parsing

* Add FIXME comment

* Fix comment

* make fmt

* Fix permissions check

* Fix text assumptions

* Fix imports

* Fix lint, fmt

* Fix unused import

* Add missing export comment

* Bypass revive on implemented interface

* Move mdstripper into its own package

* Support alphanumeric patterns

* Refactor FindAllMentions

* Move mentions test to references

* Parse mentions from reference package

* Refactor code to implement renderizable references

* Fix typo

* Move patterns and tests to the references package

* Fix nil reference

* Preliminary rendering attempt of closing keywords

* Normalize names, comments, general tidy-up

* Add CSS style for action keywords

* Fix permission for admin and owner

* Fix golangci-lint

* Fix golangci-lint
2019-10-13 23:29:10 +01:00
Benson Muite 6e3f51098b Update seek-help.zh-cn.md (#8488)
Update link to Mandarin help forum
2019-10-13 22:36:09 +01:00
GiteaBot 0c680f337d [skip ci] Updated translations via Crowdin 2019-10-13 20:23:11 +00:00
Benson Muite ba716705b5 Update seek-help.en-us.md (#8487)
Update link to Mandarin help
2019-10-13 21:07:30 +01:00
GiteaBot c23cf4c97c [skip ci] Updated translations via Crowdin 2019-10-13 16:31:19 +00:00
zeripath c888ebfba7 IsBranchExist: return false if provided name is empty (#8485)
* IsBranchExist: return false if provided name is empty

* Ensure that the reference returned is actually of a valid type
2019-10-13 19:29:08 +03:00
GiteaBot f858b89b13 [skip ci] Updated translations via Crowdin 2019-10-13 14:37:37 +00:00
zeripath 300d9a1c70 Fixes #8369: Create .ssh dir as necessary (#8486)
* Ensure .ssh dir exists before rewriting public keys

* Ensure .ssh dir exists before appending to authorized_keys

* Log the error because it would be useful to know where it is trying to MkdirAll

* Only try to create RootPath if it's not empty
2019-10-13 17:35:19 +03:00
Lunny Xiao f2a3abc683
Move migrating repository from frontend to backend (#6200)
* move migrating to backend

* add loading image when migrating and fix tests

* fix format

* fix lint

* add redis task queue support and improve docs

* add redis vendor

* fix vet

* add database migrations and fix app.ini sample

* add comments for task section on app.ini.sample

* Update models/migrations/v84.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* Update models/repo.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* move migrating to backend

* add loading image when migrating and fix tests

* fix fmt

* add redis task queue support and improve docs

* fix fixtures

* fix fixtures

* fix duplicate function on index.js

* fix tests

* rename repository statuses

* check if repository is being create when SSH request

* fix lint

* fix template

* some improvements

* fix template

* unified migrate options

* fix lint

* fix loading page

* refactor

* When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration

* fix js

* Update models/repo.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix tests

* rename ErrTaskIsNotExist to ErrTaskDoesNotExist

* delete release after add one on tests to make it run happy

* fix tests

* fix tests

* improve codes

* fix lint

* fix lint

* fix migrations
2019-10-13 21:23:14 +08:00
zeripath 0a96e59884 Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477) 2019-10-12 23:45:00 +08:00
guillep2k f1fdd782d5 Add check for empty set when dropping indexes during migration (#8471)
* Add check for empty set when dropping indexes during migration
2019-10-12 05:55:07 +01:00
zeripath 5e759b60cc Restore functionality for early gits (#7775)
* Change tests to make it possible to run TestGit with 1.7.2

* Make merge run on 1.7.2

* Fix tracking and staging branch name problem

* Ensure that git 1.7.2 works on tests

* ensure that there is no chance for conflicts

* Fix-up missing merge issues

* Final rm

* Ensure LFS filters run on the tests

* Do not sign commits from temp repo

* Restore tracking fetch change

* Apply suggestions from code review

* Update modules/repofiles/temp_repo.go
2019-10-12 08:13:27 +08:00
GiteaBot ac3613b791 [skip ci] Updated translations via Crowdin 2019-10-11 21:34:17 +00:00
Lauris BH 772241b324 Latvian translation for home page (#8468) 2019-10-11 22:32:52 +01:00
spaeps 633cd7f473 Add home template italian translation (#8352)
It was just missing
2019-10-11 13:04:59 -04:00
Lunny Xiao 46a12f196b
Move change issue title from models to issue service package (#8456)
* move change issue title from models to issue service package

* make the change less

* fix typo
2019-10-11 14:44:43 +08:00
zeripath 9ff9f5ad1d Ensure that LFS files are relative to the LFS content path (#8455) 2019-10-10 17:08:33 -04:00
zeripath 6551a9d6ca
Ensure Request Body Readers are closed in LFS server (#8454) 2019-10-10 18:42:28 +01:00
guillep2k df2c11a878 Ignore mentions for users with no access (#8395)
* Draft for ResolveMentionsByVisibility()

* Correct typo

* Resolve teams instead of orgs for mentions

* Create test for ResolveMentionsByVisibility

* Fix check for individual users and doer

* Test and fix team mentions

* Run all mentions through visibility filter

* Fix error check

* Simplify code, fix doer included in teams

* Simplify team id list build
2019-10-10 19:45:11 +03:00
Yaşar Çiv 57b0d9a38b Add @yasarciv67 to TRANSLATORS file (#8451) 2019-10-10 15:47:38 +02:00
GiteaBot 7c1ddd5692 [skip ci] Updated translations via Crowdin 2019-10-10 12:44:06 +00:00
pseudocoder eac5a8be75 DOCS: add mention of swagger api reference (#8452)
It's(swagger api link) mentioned vaguely in the FAQ but IMHO missing from API usage page.
2019-10-10 08:42:01 -04:00
6543 1fe81bc22e add crowdin badge (#8447) 2019-10-09 22:16:58 -04:00
8ctopus 628f9da0de Doc recommend to use reverse proxy if Apache/nginx is also running on… (#8384)
* Doc recommend to use reverse proxy if Apache/nginx is also running on server

* Update docs/content/doc/usage/https-support.md

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
2019-10-10 00:11:25 +01:00
8ctopus e270896a83 Doc updated list of supported webhooks and added example (#8388)
* Doc updated list of supported webhooks and added example

* Replaced webhook password verification by signature verification
2019-10-09 23:33:03 +01:00
GiteaBot 5109d18b29 [skip ci] Updated translations via Crowdin 2019-10-09 19:02:21 +00:00
Tekaoh b6616591d1 Check for either escaped or unescaped wiki filenames (#8408)
* Check for either escaped or unescaped wiki filenames

+ Gitea currently saves wiki pages with escaped filenames.
+ Wikis mirrored from other places like Github use unescaped filenames.
+ We need to be checking for filenames in either format to increase compatibility.

* Better logic for escaped and unescaped wiki filenames

Co-Authored-By: null <guillep2k@users.noreply.github.com>
2019-10-09 21:49:37 +03:00
Lunny Xiao 7ad46cc116
fix template bug on mirror repository setting page (#8438) 2019-10-09 21:09:02 +08:00
guillep2k dd611c9a86 Fix migration v96 to keep issue attachments (#8435)
* Fix migration v96 to keep issue attachments

* Fix == operator
2019-10-09 17:36:53 +08:00
GiteaBot 3810fa48ac [skip ci] Updated translations via Crowdin 2019-10-09 01:29:16 +00:00
guillep2k a3612f9d35 Changelog for v1.9.4 (#8422) (#8433)
* changelog

* Update CHANGELOG.md

We ned to revert this then ...

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-10-09 03:27:45 +02:00
kolaente 7408942c80 Update golangci to v1.20 (#8432)
* Update golangci to v1.20

Signed-off-by: kolaente <k@knt.li>

* Use the timeout flag instead of deadline, move it to config

Signed-off-by: kolaente <k@knt.li>
2019-10-08 16:42:30 -04:00