Commit Graph

1801 Commits

Author SHA1 Message Date
Morlinest de7a76a995 Fix order of comments (#2835) (#2839) 2017-11-03 13:16:26 +02:00
Antoine GIRARD 357d5a5a3d Backport to v1.2 of PR 2266 2467 2663 (#2788)
* Only check at least one email gpg key (#2266)

* Only require one email (possibly not yet validated)

* Update message error and check validation of commit

* Add integrations tests

* Complete integration for import

* Add pre-check/optimization

* Add some test (not finished)

* Finish

* Fix fixtures

* Fix typo

* Don't guess key ID

* Make repo private to no interfere with other tests (#2467)

* 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-27 12:36:14 +08:00
Lauris BH 9902317679 Add checks for commits with missing author and time (#2771) (#2785)
* Add checks for commits with missing author and time

* Fix validate commits with emails if it has no Author
2017-10-26 22:24:11 +08:00
Paul Tötterman 33e164168f Fix sending mail with a non-latin display name. #2102 (#2559) (#2783)
* Fix sending mail with a non-latin display name. #2102

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>

* Take into account the possibility that setting.MailService.From is in `name <email@address>` format. #2102

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>
2017-10-26 10:44:20 +03:00
Lauris BH 13013e90f3 Fix PR, milestone and label functionality if issue unit is disabled (#2710) (#2714)
* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user

* Fix multi-actions in PR page

* Change error message

* Fix comment update and delete functionality in PR
2017-10-16 16:59:01 +03:00
Lauris BH fb80265b52 Fix so that user can still fork his own repository to owned organizations (#2699) (#2707)
* 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 19:40:33 +03:00
David Schneiderbauer 74399f333f Backport of migration fixes (#2604) (#2677)
* 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

* Fix migration from Gogs

* Refactor code

* add error check

* Additiomal fixes for migrations

* Add back nil check

* replace deprecated .Id with .ID

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

* change string map to interface map

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-10-09 16:08:22 +03:00
Lauris BH 73ad7d2ef3 Fixes 500 error on dashboard when using MSSQL (#2504) (#2662)
MSSQL rejects the query:
  SELECT "repository"."id" FROM "repository"
  INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND
  "repository".is_mirror=1
  WHERE (
    ("repository".owner_id=2 AND "repository".is_private=0)
        OR team_repo.team_id IN (1)
        )
        GROUP BY "repository".id ORDER BY updated_unix DESC

when the order by term (updated_unix) is not included in the group by
term.
2017-10-05 21:08:40 +03:00
David Schneiderbauer e38e502e20 Fix deletion of unprotected branches (#2630)
* fix deletion of unprotected branches

* fmt fix

* changed internal protected branch api

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-10-02 23:23:41 +03:00
David Schneiderbauer 3cc5b11b0d Backport of 2611 / Fix doubled issue tab introduced in migration v16 (#2622)
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-10-01 09:18:49 +03:00
David Schneiderbauer 4c9bf91a2c 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>
2017-09-25 19:53:55 +03:00
Lauris BH e232c49b10 Sync releases table with tags on push and for mirrors (#2459) (#2554)
* Sync releases table with tags on push and for mirrors

* Code style fixes

* Fix api to return only releases

* Optimize release creation and update
Minimize posibility of race conditions

* Fix release lower tag name updating

* handle tag reference update by addionally comparing commit id
2017-09-21 01:08:22 +03:00
Lauris BH 25e71ad41e Fix adding branch as protected to not allow pushing to it (#2556)
* Fix adding branch as protected to not allow pushing to it

* Fix can_push value to false in protected_branch (#2560)

* Fix integration test
2017-09-20 20:14:09 +03:00
Ethan Koenig f014e42a06 Backport: Fix lint, fmt and integration testing errors (#2553)
* Fix lint errors

* Fix fmt errors (#2544)

* Hotfix for integration testing (#2473)

* Hotfix for integration testing
2017-09-20 19:30:20 +03:00
Jonas Franz 91788e0200 Restricting access to fork functioanlity to users with Code access (#2542)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2017-09-19 01:12:29 +02:00
Lauris BH 002fa73460 Fix migration from pre-v15 to 1.2.0 (#2460) (#2465) 2017-09-05 21:03:30 +08:00
Lauris BH 0c910afe11 Fix releases to be counted from database not tags (#2389) (#2424) 2017-08-30 09:31:32 +08:00
Lunny Xiao 1cbe502cc2 fix duplicated feed (#2370) 2017-08-28 19:16:25 +02:00
Lunny Xiao 0938a2dca3 Fix missing collabrative repos (#2367) (#2382)
* fix missing collabrative repos

* fix bug of collabrative

* fix SQL quotes
2017-08-25 10:25:37 +08:00
Lunny Xiao 64b7068846 Add more test for login links and fix a bug on action retrieve (#2361)
* add more test for login links and fix a bug on action retrieve
2017-08-23 12:53:35 +03:00
Ethan Koenig fd6e91077a Fix SQL condition bug in GetFeeds(..) (#2360) 2017-08-23 08:51:58 +03:00
Bwko 1a5fe4326f Add collaborative repositories to the dashboard (#2205)
* Add collaborative repositories to the dashboard

Remove some unused code from the Dashboard func

* fix some bug and some refactor

* fix tests
2017-08-23 09:30:54 +08:00
Lunny Xiao 2c6a0fdca8 update latest xorm version to vendor (#2353) 2017-08-22 14:39:52 +03:00
Ethan Koenig 7907786040 Trigger sync webhooks on UI commit (#2302)
* Trigger sync webhooks on UI commit

* Also fix UI upload/delete
2017-08-17 15:22:08 +08:00
Lunny Xiao f960e19c59 Only update needed columns when update user (#2296)
* only update needed columns when update user

* fix missing update_unix column
2017-08-12 22:18:44 +08:00
Lunny Xiao 921d90fd8b fix 500 error when view an issue which's milestone deleted (#2297) 2017-08-12 10:15:30 +08:00
G 34df9deff1 Convert xorm literal queries to method calls (#2253) 2017-08-04 12:42:51 +08:00
Ethan Koenig 7e0654bd9e Fix counts on issues dashboard (#2215)
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
2017-08-03 13:09:16 +08:00
Ethan Koenig f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 2017-08-02 11:46:54 +03:00
G 66e8262530 Replace calls to xorm UseBool with Where (#2237) 2017-08-01 13:47:31 +08:00
Ethan Koenig fd45a032a7 Fix bare-repo bugs (#2199)
* Fix bare-repo bugs

* Integration tests

* Unused import
2017-07-27 12:23:38 +03:00
Ethan Koenig a27863b6d1 Fix issue updated_unix bug (#2204) 2017-07-27 09:20:38 +08:00
Ethan Koenig 5f37944dff Fix unclosed session bug (#2214) 2017-07-26 17:30:47 +08:00
Lauris BH 1d032f5220 Fix compiling without sqlite and gcc (#2177) 2017-07-26 15:27:30 +08:00
Ethan Koenig 48898e5d0b Fix PR nil-dereference bug (#2195)
* Fix PR nil-dereference bug

* Revert to original error format
2017-07-26 15:16:45 +08:00
Lauris BH dde0052ca2 Fix key usage time update if the key is used in parallel for multiple operations (#2185) 2017-07-20 11:15:10 +08:00
Lauris BH f33e6ae09e Remove unit types commits and settings (#2161)
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
2017-07-17 10:04:43 +08:00
Lauris BH b639fa1648 Ignore invalid issue numbers in commit messages. Fixes #2022 (#2150) 2017-07-12 22:35:47 -05:00
Ethan Koenig 858324c21a Fix username rendering bug (#2122)
* Fix username rendering bug

* XSS integration test

* Migration to unescape user full names
2017-07-12 17:58:52 +03:00
Antoine GIRARD 30787e48f2 Improve org error handling (#2117)
* Improve ErrOrgNotExist type
Return new error type
Use good error check
Use new method to check error
Update tests

* Fix unchanged method name report
2017-07-06 21:30:19 +08:00
Ethan Koenig a52cd59727 Fix unchecked error bug (#2110) 2017-07-04 09:30:41 +08:00
Lauris BH f189ccd2d6 Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
2017-07-02 21:50:57 +08:00
Ethan Koenig eae9154811 Fix SQL bug in models.PullRequests 2017-07-01 14:08:43 +03:00
Lauris BH 12cb6cd3c9 Merge pull request #2087 from Bwko/fix_error_exit
Fix exit status 1 not handled @ getMergeCommit (#2087)
2017-06-30 15:46:49 +03:00
Bwko b36849dc1f
Fix exit status 1 not handled @ getMergeCommit 2017-06-30 12:35:26 +02:00
Andrey Nering 935b40fd8e Merge pull request #2083 from ethantkoenig/check_err/org_avatar
Don't ignore gravatar error
2017-06-29 21:30:05 -03:00
Ethan Koenig 05e3726415 Use default avatar on error 2017-06-29 12:10:33 -04:00
Lauris BH 783b1967e2 Fix release display and correct paging (#2080) 2017-06-29 23:11:38 +08:00
Lunny Xiao 33f3165296 remove unnecessary blank lines and wrong error log 2017-06-28 19:00:08 +02:00
iszla 3f9016430f Pagination on releases page (#2035)
* Added count to GetReleasesByRepoID so pagination will work

* Separated it out to a new function, can then also leave the API part unaffected

* Remove extra whitespace added in untouched function

* Added comment and corrected name in error handler

* Account for if the user is owner or not in the count

* Also check if repo is draft

* revert back to the correct count in the ReleasesToDisplay loop

* Fixed lint error regarding else with return statement

* Use Cond struct instead of string, corrected name in error handler

* Removed unused return variable names
2017-06-28 22:47:00 +08:00