Commit graph

1876 commits

Author SHA1 Message Date
Lauris BH
5dc37b187c
Add reactions to issues/PR and comments (#2856) 2017-12-04 01:14:26 +02:00
Ethan Koenig
ab62da283a Fix avatar URLs (#3069)
* Fix avatar URLs

* import order
2017-12-03 19:55:13 +08:00
Ethan Koenig
a0964775ab Sanitize logs for mirror sync (#3057) 2017-12-03 13:29:41 +08:00
Ethan Koenig
3163abedd6 Fix ref parsing in commit messages (#3067) 2017-12-03 10:20:12 +08:00
Lunny Xiao
35cc5b0402
Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName

* fix tests

* fix tests bug

* some improvements
2017-12-02 15:34:39 +08:00
Ethan Koenig
91f3d77ceb Unit tests for wiki routers (#3022) 2017-11-30 17:52:15 +02:00
Antoine GIRARD
4035ab05fa Fix git lfs path (#3016)
* add suffix .git

* Remove Content-Type on GET methods

* Add migrations to force creation before any further potential migration
2017-11-29 01:35:23 +02:00
Duncan Ogilvie
c80d147fa9 Improve memory usage when reaching diff limits (#2990)
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-29 01:22:24 +02:00
Antoine GIRARD
d99f4ab003 Git LFS lock api (#2938)
* Implement routes

* move to api/sdk and create model

* Implement add + list

* List return 200 empty list no 404

* Add verify lfs lock api

* Add delete and start implementing auth control

* Revert to code.gitea.io/sdk/gitea vendor

* Apply needed check for all lfs locks route

* Add simple tests

* fix lint

* Improve tests

* Add delete test + fix

* Add lfs ascii header

* Various fixes from review + remove useless code + add more corner case testing

* Remove repo link since only id is needed.

Save a little of memory and cpu time.

* Improve tests

* Use TEXT column format for path + test

* fix mispell

* Use NewRequestWithJSON for POST tests

* Clean path

* Improve DB format

* Revert uniquess repoid+path

* (Re)-setup uniqueness + max path length

* Fixed TEXT in place of VARCHAR

* Settle back to maximum VARCHAR(3072)

* Let place for repoid in key

* Let place for repoid in key

* Let place for repoid in key

* Revert back
2017-11-28 22:58:37 +02:00
Ethan Koenig
b7ebaf6d20 Various wiki bug fixes (#2996)
* Update macaron

* Various wiki bug fixes
2017-11-28 17:43:51 +08:00
Ethan Koenig
1028ef2def Don't print SQL in unit tests (#2995)
* Add GITEA_UNIT_TESTS_VERBOSE environment variable to enable printing SQL
2017-11-27 12:29:48 +02:00
Ethan Koenig
716ac1214f Enable admin to search by email (#2888) 2017-11-26 16:40:38 +08:00
Ethan Koenig
0f6dc411df Remove unnecessary IssueList attribute loads (#2936) 2017-11-21 13:28:22 +08:00
Lunny Xiao
10b54df2b2 Add dingtalk webhook (#2777)
* add dingtalk webhook type

* add vendor

* some fixes

* fix name check

* fix name check & improvment
2017-11-21 06:26:43 +02:00
Michael Kuhn
420fc8efc2 Disable add key button if SSH is disabled (#2873) 2017-11-21 11:49:33 +08:00
Lauris BH
bd6f24b4ab
Add deleted_branch table fixture (#2832)
* Add deleted_branch table fixture

* Fix deleted branches tests

* Remove unneeded global variable
2017-11-04 15:31:59 +02:00
Lauris BH
240609432b Issue content should not be updated when closing with comment (#2833) 2017-11-03 17:23:17 +08:00
Guillaume Dube
8798cf4e3b Set session and indexers' data files rel to AppDataPath (#2192)
* Set session and indexers' data files rel to AppDataPath

The setting AppDataPath is now relative to the working directory.
The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions.
The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves.

* fix bug
2017-11-03 10:56:20 +02:00
Morlinest
95637e046f Fix order of comments (#2835) 2017-11-03 11:11:42 +08:00
Ethan Koenig
e6a97b6675 Use api.TrackedTime in API (#2807)
* Use api.TrackedTime in API

* APIFormat() method

* Rename function
2017-11-01 10:25:14 +08:00
cstyles
b0b24a2dbb Use RelAvatarLink() in GetActAvatar() (#2800) 2017-10-31 16:08:23 +08:00
Lauris BH
82fc50f4ee Fix Git LFS object/repo link storage in database and small refactoring (#2803) 2017-10-30 20:11:56 +08:00
Ethan Koenig
513375c429 Make URL scheme unambiguous (#2408)
* Make URL scheme unambiguous

Redirect old routes to new routes

* Fix redirects to new URL scheme, and update template

* Fix branches/_new endpoints, and update integration test
2017-10-30 10:04:25 +08:00
Ethan Koenig
5866eb2321 Code/repo search (#2582)
Indexed search of repository contents (for default branch only)
2017-10-27 09:10:54 +03:00
Morlinest
ddb7f59ef4 Add search mode option to /api/repo/search (#2756)
* Add repo type option to /api/repo/search

* Add tests and fix result of collaborative filter in specific condition

* Fix/optimize search & tests

* Improve integration tests

* Fix lint errors

* Fix unit tests

* Change and improve internal implementation of repo search

* Use NonexistentID

* Make search api more general

* Change mirror and fork search behaviour

* Fix tests & typo in comment
2017-10-27 00:16:13 +03:00
Lauris BH
6a107e57f6 Add checks for commits with missing author and time (#2771)
* Add checks for commits with missing author and time

* Fix validate commits with emails if it has no Author
2017-10-26 15:45:14 +08:00
Gibheer
bc84110989 don't check minimum key size when disabled (#1754)
* cleanup old comments for ed25519

These comments were added when x/crypto/ed25519 could not yet handle
ed25519. It does now, so it should be removed.
Also the key type is now replaced with the proper constant.

* move the minimum key size config before the check

This moves the actual config lookup before any check is done. This
avoids problems with calling to ssh-keygen which doesn't support the
expected output format and returning an error, when the check is disabled.
2017-10-26 09:49:41 +08:00
Lauris BH
eca05b09aa Add commit count caching (#2774)
* Add commit count caching

* Small refactoring

* Add different key prefix for refs and commits

* Add configuratuion option to allow to change caching time or disable it
2017-10-26 09:37:33 +08:00
Bwko
3ab580c8d6 Add branch overiew page (#2108)
* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
2017-10-26 08:49:16 +08:00
Lunny Xiao
796be03e9b fix discord hook bug (#2778) 2017-10-25 13:13:45 +08:00
Lunny Xiao
6eeadb2082 Hide unactive on explore users and some refactors (#2741)
* hide unactive on explore users and some refactors

* fix test for removed Organizations

* fix test for removed Organizations

* fix imports

* fix logic bug

* refactor the toConds

* Rename TestOrganizations to TestSearchUsers and add tests for users

* fix other tests

* fix other tests

* fix watchers tests

* fix comments and remove unused code
2017-10-24 20:36:19 +03:00
harry
81d1e54a49 Use identicon image for default gravatar. (#2767)
* Use identicon image for default gravatar.

* Fixed tests.
2017-10-23 03:50:07 -05:00
Lunny Xiao
985a39590b Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate

* fix typo

* add default value on app.ini comment
2017-10-21 14:26:23 +08:00
Jonas Bröms
847272a70d Only update mirror last update after successful sync (#2730) 2017-10-18 21:50:41 +03:00
Morlinest
ccd3577970 Fix repository search function (#2689)
* Fix and remove FIXME

* Respect membership visibility

* Fix/rewrite searchRepositoryByName function

* Add unit tests

* Add integration tests

* Remove Searcher completely

* Remove trailing space
2017-10-17 23:20:22 +08:00
Lauris BH
c7f4f07765 Integration test for activity page (#2704)
* Integration test for activity page

* Small code refactoring for acitvity page

* Move activity stats calculation logic to model
2017-10-16 00:54:53 +03:00
Lauris BH
f3833b7ce4 Create new branch from branch selection dropdown (#2130)
* Create new branch from branch selection dropdown and rewrite it to VueJS

* Make updateLocalCopyToCommit as not exported

* Move branch name validation to model

* Fix possible race condition
2017-10-15 22:59:24 +03:00
Lauris BH
1ec4dc6c1d Fix so that user can still fork his own repository to owned organizations (#2699)
* Fix so that user can still fork his own repository to his organizations

* Fix to only use owned organizations

* Add integration test for forking own repository to owned organization
2017-10-15 18:06:07 +03:00
Lauris BH
f42dbdbae5 Add Activity page to repository (#2674)
* Add Activity page to repository

* Add request data for activity

* Add issue data for activity

* Add user unit right checks

* Add releases to activity

* Log repository unit loading error
2017-10-15 02:17:39 +03:00
Lauris BH
8863e74f2a Fix organization watch migration (#2703) 2017-10-14 20:47:05 +03:00
Patrick G
e89bb7ef6a Allow custom SSH user in UI for built-in SSH server (#2617) (#2678)
* Allow custom SSH user in UI for built-in SSH server (#2617)

* Some fixes

* Did make fmt

* Updated according to review

- Renamed config to BUILTIN_SSH_SERVER_USER
- Removed unnecessary default string value for config item

* Updated according to review

* Fixed some minor issues
2017-10-14 18:51:00 +03:00
Lunny Xiao
514006a2e5 Fix orgnization user watch repository (#2670)
* remove orgnization watch repositories

* fix migration

* fix typo and missing change

* remove unused code
2017-10-14 22:37:43 +08:00
Morlinest
dff26e25ca Remove redudant functions and code (#2652)
* Remove redudant functions and code
2017-10-10 22:37:18 +02:00
Morlinest
c2346e4469 Add repository search unit and integration tests (#2575)
* Add more repo search tests

* Fix repo search tests

* Always test returned repos length

* Add test with lower pagesize limit (test more pages)

* Add and fix /api/repo/search integration tests

* Simplify unit tests code

* Simplify and unify integration tests code

* Improve test coverage

* Temporary fix tests due to bugs in current repo search implementation

* Revert removing not nil Searcher

* Add more checks to tests

* Simplify privacy checks in /api/repo tests

* Temporary remove privacy check from repo search tests
2017-10-10 09:23:29 +08:00
David Schneiderbauer
ebac051e72 Rewrite migrations to not depend on future code changes (#2604)
* v38 migration used an outdated version of RepoUnit model (#2602)

* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Fix time tracking migration

* Refactor code

* Fix migration from Gogs

* v38 migration used an outdated version of RepoUnit model (#2602)

* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Fix time tracking migration

* Refactor code

* Fix migration from Gogs

* add error check

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Additiomal fixes for migrations

* Fix timetracking migration

* Add back nil check
2017-10-08 19:08:18 +08:00
Julian Scholle
92123fe82a GPG key email verification no longer case sensitive (#2661) (#2663)
* GPG key email verification no longer case sensitive (#2661)

* case insensitive GPG key email verification now cached (#2661)

Signed-off-by: Julian Scholle <julian.scholle@googlemail.com>
2017-10-06 23:28:21 +03:00
Kazuki Sawada
ffab139c91 table pull_request wasn't updated correctly (#2649)
* Fix: table `pull_request` won't be updated correctly

* Update also status column when manually merged
2017-10-06 00:25:40 +03:00
Ethan Koenig
aa962deec0 Replace deprecated Id method with ID (#2655) 2017-10-05 07:43:04 +03:00
Morlinest
a79af9cf6f Fix index column deletion (#2651) 2017-10-04 14:26:13 +03:00
Ethan Koenig
4b2c8ca533 Use session when creating user (#2638) 2017-10-03 09:29:26 +03:00