Commit Graph

7698 Commits (fcda2d5b35ec9bec9a8e8fa0a0fb04cb21593648)

Author SHA1 Message Date
SagePtr 59f879bfec Fix double-generation of scratch token (#6832) (#6833) 2019-05-02 23:06:01 +03:00
zeripath ade88a877d Allow Recaptcha service url to be configured (#6820) 2019-05-02 16:09:39 +03:00
zeripath 159294f799 When mirroring we should set the remote to mirror (#6824) 2019-05-02 09:43:20 +03:00
techknowlogick 897927690f
Rename LFS_JWT_SECRET to include OAUTH2 as well (#6826) 2019-05-01 22:32:06 -04:00
John Olheiser e255df83a6 Change verbose flag in dump command to avoid colliding with global version flag (#6822)
* Change verbose flag to avoid colliding with version flag
* Update docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-05-01 21:36:09 +01:00
mrsdizzie caba2829ef Improve issue reference on commit (#6694)
* Improve issue reference on commit

Allow commits to properly reference issues in other repositories and also to
close/reopen those issues if user has code permission. Should match
Github behavior described here: https://help.github.com/en/articles/closing-issues-using-keywords

Fixes 6664

* Fix missing return

* Match user/repo directly in regex
2019-05-01 19:21:05 +03:00
Lunny Xiao 5be1780045 update github.com/mcuadros/go-version to v0.0.0-20190308113854-92cdf37c5b75 (#6815) 2019-05-01 11:44:16 -04:00
Antoine GIRARD eb8632b20b Add existing issues (#6811) 2019-04-30 20:50:17 +03:00
GiteaBot 26042a8175 [skip ci] Updated translations via Crowdin 2019-04-30 13:30:05 +00:00
Filip Navara 55daee8d22 Remove `seen` map from `getLastCommitForPaths` (#6807)
Ensures correctly traversing the commit graph for all path and avoids
erroneously skipping some. Also preallocate some arrays to correct size
to prevent unnecessary reallocations.

Fixes #6708.

Signed-off-by: Filip Navara <filip.navara@gmail.com>
2019-04-30 16:27:41 +03:00
Lauris BH 9b9ec7847c
Show scrollbar only when needed (#6802) 2019-04-29 23:08:04 +03:00
silverwind c64fe091d3 UI: Tweak tab text and icon colors (#6760)
This adds a hover highlight and fades out the icon on inactive tabs.
2019-04-29 14:49:59 -04:00
zeripath 8d0d7bc28d Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 2019-04-29 14:08:21 -04:00
GiteaBot ccf4783980 [skip ci] Updated translations via Crowdin 2019-04-29 01:47:24 +00:00
techknowlogick 9a838cff61
Service worker js is a missing comma (#6788)
Fix #6787
2019-04-28 21:45:05 -04:00
GiteaBot 3d26b3f216 [skip ci] Updated translations via Crowdin 2019-04-28 19:50:49 +00:00
Nicola Scattaglia cde6079879 Restore IsWindows variable assignment (#6722) (#6790)
Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
2019-04-28 22:48:46 +03:00
ngourdon d29d97d91c Set user search base field optional in DLDAP edit page (#6779) 2019-04-28 09:53:55 -04:00
Zer00CooL 345bc06e56 README WordPress the code is overflowing #6679 (#6696) 2019-04-27 20:07:55 -04:00
ngourdon 4e311123d8 Fix team edit API panic (#6780) 2019-04-27 19:32:33 -04:00
Lukas Prettenthaler 81059a2567 LDAP: ignore already existing public keys after ldap sync (#6766)
* fix type in public key exist error, only log trace for ldap public key import if existing

Signed-off-by: Lukas Prettenthaler <lukas@noenv.com>

* cleanup switch statement

Signed-off-by: Lukas Prettenthaler <lukas@noenv.com>

* replace switch with if, fix log formatting

Signed-off-by: Lukas Prettenthaler <lukas@noenv.com>

* fix formatting

Signed-off-by: Lukas Prettenthaler <lukas@noenv.com>
2019-04-26 18:01:54 +03:00
zeripath f6eedd4dc8 UI: Detect and restore encoding and BOM in content (#6727)
* detect and remove a decoded BOM

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Restore the previous encoding and BOM

* On error keep as UTF-8

Signed-off-by: Andrew Thornton <art27@cantab.net>

* create remove BOM function

* Deal with LFSed content

* Update modules/repofiles/update.go

* Fix final LFS bug

* Keep LFS sections referring to opts.Content
2019-04-26 15:00:30 +03:00
Lunny Xiao 4c34bc111c
fix pulls broken when fork repository deleted (#6754)
* fix pulls broken when fork repository deleted

* fix lint
2019-04-26 11:03:39 +08:00
techknowlogick ec2d489d15
OAuth2 token can be used in basic auth (#6747) 2019-04-25 18:42:50 -04:00
Lunny Xiao 199faadea3 Fix org visibility bug when git cloning (#6743)
* fix org visibility bug

* fix permission check

* add integration tests

* fix tests

* change test user name for easier maintainance and fix test

* fix test git repo name
2019-04-25 21:59:10 +03:00
Lunny Xiao e8f4c7733a
fix missing return (#6751) 2019-04-25 19:30:38 +08:00
Lunny Xiao 65b3f513c3
fix new team 500 (#6749)
* fix new team 500

* Update models/unit.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>
2019-04-25 17:00:34 +08:00
James E. Blair dabee9b1a4 Handle redirects in git clone commands (#6688)
Add support for repo_redirect objects in the git smart http
handler so that when a user clones a repo that has been moved
or renamed, they are redirected to the new location.

This requires that the query string be included in the redirect
as well, so that is added.

Signed-off-by: James E. Blair <jeblair@redhat.com>
2019-04-25 08:51:40 +03:00
mrsdizzie 0064535ad2 Fix domain name pattern in email regex (#6739)
Fixes #6735
2019-04-24 21:53:41 -04:00
John Olheiser 6a58832286 Add FAQ for version downloads (#6742) 2019-04-24 14:44:58 -04:00
Lunny Xiao ff03b2f606 Fix: Sort repos on org home page with non-admin login (#6741) 2019-04-24 19:20:22 +01:00
Lanre Adelowo 821184c203 Drop is_bare IDX only when it exists for MySQL and MariaDB (#6736)
* Drop is_bare IDX only when it exists

* show indexes only on mysql or mariadb
2019-04-24 20:43:38 +03:00
Lunny Xiao 1d8b521ae1 Add tests for Org API (#6731) 2019-04-24 12:16:14 -04:00
Lanre Adelowo 08d8ea9403 fix template error (#6737) 2019-04-24 21:14:36 +08:00
Lunny Xiao 59be704efb Fix team members API (#6714) 2019-04-24 01:32:35 -04:00
GiteaBot e0172f0db7 [skip ci] Updated translations via Crowdin 2019-04-24 04:56:25 +00:00
Joel da Rosa 67c91e1aa1 Order file actions equal to GitHub (#6706) 2019-04-24 12:53:57 +08:00
John Olheiser 45fa5cc1be [API] Load issue attributes when editing an issue (#6723) 2019-04-23 13:07:12 -04:00
techknowlogick cbf8538635
Disable web preview for telegram webhook (#6719) 2019-04-23 12:12:00 -04:00
GiteaBot 2a0e86d5f2 [skip ci] Updated translations via Crowdin 2019-04-22 20:43:37 +00:00
zeripath be666b03ee Trace Logging on Permission Denied & ColorFormat (#6618)
* Add log.ColorFormat and log.ColorFormatted

Structs can now implement log.ColorFormatted to provide their own
colored format when logged with `%-v` or additional flags.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add basic ColorFormat to repository and user

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add basic ColorFormat to access and unit

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add ColorFormat to permission and on trace log it

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add log.NewColoredIDValue to make ID value coloring consistent

Signed-off-by: Andrew Thornton <art27@cantab.net>

* formatting changes

* Add some better tracing to permission denied for read issues/pulls

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add Trace logging on permission denied

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove isTrace() check from deferred func

* Adjust repo and allow logging of team

* use FormatInt instead of Itoa

* Add blank line

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update access.go
2019-04-22 23:40:51 +03:00
Filip Navara b83114f140 Fix one performance/correctness regression in #6478 found on Rails repository. (#6686)
* Fix flaw in the commit history lookup that caused unnecessary traversal
when the repository contains a lot of merge commits.

Also return the merge commit as the changed one if the file or
directory was changed as part of the merge, eg. through conflict
resolution.

Signed-off-by: Filip Navara <filip.navara@gmail.com>

* Perform history simplification. If a file is present on multiple parents
in a merge commit follow only the first parent.
2019-04-21 16:49:06 +08:00
techknowlogick 04ff3dd510 Backport 1.8.0 changelog (#6697) 2019-04-21 10:43:49 +08:00
Mario Lubenka bc86134759 Show "delete branch" button on closed pull requests (#6570) (#6601)
* Show button to delete a pull request branch after a pull request has been closed (#6570)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update routers/repo/pull.go

Co-Authored-By: saitho <mario.lubenka@googlemail.com>
2019-04-20 23:50:34 +03:00
GiteaBot b1bb700665 [skip ci] Updated translations via Crowdin 2019-04-20 11:49:59 +00:00
zeripath 3d5d2fa9d8
Unfortunately MemProvider Init does not actually Init properly (#6692)
* Unfortunately MemProvider Init does not actually Init properly

Worse all of its members are private and you cannot update them.
Simple fix copy it in to modules session.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix misspelling
2019-04-20 12:47:17 +01:00
zeripath 6cb127d497
Fix reversion caused by 6314 (#6685)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-04-20 08:59:34 +01:00
zeripath b33f7f792b
Prevent creating empty sessions (#6677)
* Prevent creating empty sessions

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update modules/setting/session.go

* Remove unnecessary option

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add destory to list of ignored misspellings

* rename cookie.go -> virtual.go

* Delete old file

* Add test to ensure that sessions are not created without being logged in

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix tests

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update integrations/create_no_session_test.go
2019-04-20 07:44:50 +01:00
GiteaBot b74dc970e9 [skip ci] Updated translations via Crowdin 2019-04-20 04:17:31 +00:00
Mario Lubenka fcbac38d6f Unifies pagination template usage (#6531) (#6533) 2019-04-20 00:15:19 -04:00