Commit Graph

1888 Commits

Author SHA1 Message Date
Konstantin Haase
afb6fe286b v3: SQL "NOT IN ()" never matches 2015-11-26 18:17:19 +01:00
carlad
24d5efda95 v3 update spec for services/repositories 2015-11-26 17:39:03 +01:00
carlad
2b8d7e420b Update README.md 2015-11-26 16:48:10 +01:00
carlad
8d3acfe9bb v3 fix existing specs for un/star endpoints and starred filter 2015-11-26 14:00:42 +01:00
carlad
086932df11 v3 merge with master to fix default_branch spec error, fix services/repository spec 2015-11-25 19:17:33 +01:00
carlad
2974dccd3b Merge branch 'master' into cd-v3-parity 2015-11-25 18:18:56 +01:00
Piotr Sarnacki
cf5915a06b Bump travis-core 2015-11-25 18:11:43 +01:00
carlad
c2168d62f1 v3 update specs to accomodate starred, unstar and star 2015-11-25 18:08:53 +01:00
carlad
937cc0267a v3 fix filtering by unstarred and n+1 query 2015-11-25 16:30:42 +01:00
carlad
baa1881bf7 v3 change name of starred_repository to star 2015-11-24 18:59:16 +01:00
carlad
d3b13e8d7c v3 fix relation of starred_repository to repostiory model 2015-11-24 18:15:17 +01:00
carlad
af3087446c v3 adjust repo model, query and service for filtering by starred - not working 2015-11-24 18:03:15 +01:00
Piotr Sarnacki
7eb2617e48 Add branch_is_default info to commits 2015-11-24 16:07:23 +01:00
Piotr Sarnacki
dbea2f3760 Revert "v3: in access control object, avoid firing multiple permissions queries (even though they are cache hits)"
This reverts commit 4a3357a488.
2015-11-24 15:09:58 +01:00
Piotr Sarnacki
81e11da856 Fix error when default branch tries to be autosaved
For some reason when branch from V2 models is being saved, it tries to
also update relationships for V3 models, at least in tests. This fails,
because default_branch association on the V3 Repository model has a
primary key set to [:id, :default_branch]. In theory we use composite
keys plugin, but it seems that it doesn't cover that case and because of
that AR fails with an error "[:id, :default_branch] is not a Symbol"
when it tries to call Model#send with primary_key as an argument.

This commit fixes the issue by overriding the send method on the
Repository model to not fail when AR does
repository.send([:id, :default_branch_name]), when it needs to fetch
a primary key.

This is hacky, but I haven't found a nicer way to get around it.
2015-11-24 15:09:58 +01:00
carlad
02f5035100 comment out 2015-11-24 12:31:50 +01:00
carlad
4095090992 Merge branch 'master' into cd-v3-parity 2015-11-24 11:54:49 +01:00
Piotr Sarnacki
a31a6cb92b Bump travis-core 2015-11-23 15:52:18 +01:00
carlad
9793010e28 v3 add filter for d=starred repos - not working yet 2015-11-20 19:02:39 +01:00
carlad
77aabcb78f Merge branch 'master' into cd-v3-parity 2015-11-20 17:24:34 +01:00
carlad
fb483689e9 V3 start implementing filter for starred repos 2015-11-20 17:23:59 +01:00
Konstantin Haase
4a3357a488 v3: in access control object, avoid firing multiple permissions queries (even though they are cache hits) 2015-11-20 16:24:26 +01:00
Konstantin Haase
8f0b35a0f1 User-Agent-Tracker: check if comment is there 2015-11-20 14:20:02 +01:00
Konstantin Haase
efb91d0a38 move user-agent filter for /auth/github to redis 2015-11-20 13:53:35 +01:00
carlad
02d3fad23f v3 refator un/star endpoints 2015-11-20 13:20:03 +01:00
Konstantin Haase
b138fbcdeb check user agent 2015-11-19 19:59:22 +01:00
Konstantin Haase
8f5a34c7b6 disable /auth/github 2015-11-19 19:37:51 +01:00
Konstantin Haase
4f9cb29775 also add a throttle 2015-11-19 19:29:07 +01:00
Konstantin Haase
28ff2f6848 aggressive blocking on /auth/github 2015-11-19 19:24:18 +01:00
carlad
95ad9a6b56 v3 add starred to standard representation for repo 2015-11-19 19:17:46 +01:00
carlad
c20f99d210 add check_access to repo for un/star services 2015-11-19 19:07:24 +01:00
carlad
0f4a29c31c refactor un/star querys from service to query 2015-11-19 19:02:12 +01:00
carlad
2420784a87 fix syntax of db queries, add output 2015-11-19 17:26:30 +01:00
Steffen
18ea7853bf Merge branch 'master' into addCron 2015-11-19 13:39:50 +01:00
Steffen Kötte
f356beaccf add time and disable_by_push options for cron 2015-11-19 13:39:13 +01:00
carlad
16687f16d7 refining work on star/unstar endpoints 2015-11-18 18:47:59 +01:00
carlad
714e40beca more initial work on star/unstar endpoints 2015-11-18 17:43:35 +01:00
carlad
c96e8e2ff1 initial work on star and unstar endpoints 2015-11-16 18:14:31 +01:00
Steffen Kötte
75449baacd fix and add tests for crons 2015-11-16 15:52:05 +01:00
Steffen Kötte
aca632ed15 use branch for storing cron 2015-11-16 14:24:11 +01:00
Konstantin Haase
480aac2171 Merge pull request #209 from travis-ci/cd-v3-parity
v3 Add user/:id/sync endpoint
2015-11-10 12:30:27 +01:00
Steffen Kötte
0a91a69d0d remove debug code 2015-11-09 16:59:10 +01:00
Lennard Wolf
e8ab7c0be6 add test for /repo/{repo.id}/crons/create endpoint 2015-11-09 16:55:53 +01:00
Lennard Wolf
b1408583dd fix test for /repo/{repo.id}/crons endpoint 2015-11-09 16:25:03 +01:00
Lennard Wolf
0e1b266e9b add test for /repo/{repo.id}/crons endpoint 2015-11-09 16:23:01 +01:00
Lennard Wolf
b3eb2f3398 add test for /cron/{cron.id}/delete endpoint 2015-11-09 16:04:41 +01:00
Lennard Wolf
f5f4b3b0b1 add test for /cron/{cron.id} endpoint 2015-11-09 14:50:44 +01:00
Lennard Wolf
a2a4737099 Fixed tests broken by cron 2015-11-09 14:03:30 +01:00
Steffen Kötte
c6556977fa Change create and delete to POST 2015-11-09 13:42:01 +01:00
Steffen Kötte
d1dd965b32 fix permissions 2015-11-09 12:51:07 +01:00