Commit Graph

29 Commits

Author SHA1 Message Date
carlad
2974dccd3b Merge branch 'master' into cd-v3-parity 2015-11-25 18:18:56 +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
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
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
Konstantin Haase
3904d9e362 Auto-merged master into rkh-active-broadcasts on deployment. 2015-10-13 13:42:48 +02:00
Konstantin Haase
d7c9a367e9 v3: branches - add default_branch (boolean) property 2015-10-08 18:44:40 +02:00
Konstantin Haase
0eb564388c v3: broadcasts - filter inactive broadcasts 2015-10-08 18:43:22 +02:00
Konstantin Haase
e03f79513a reinstate nginx, use it in development, add smare concurrency settings 2015-10-08 13:57:49 +02:00
carlad
4a0932df1e prefix ids with correct tables when ordering 2015-09-15 11:45:16 +02:00
Konstantin Haase
2891dd640a v3: use cached_matrix_ids for build.jobs if only job ids are being loaded 2015-09-03 15:03:12 +02:00
carlad
211637e247 v3 make specs use v3 models, update representations of build and job, make some indentation pretty 2015-09-02 16:21:41 +02:00
carlad
1a3d42da21 v3 add _type_disabled to ovveride activerecord setting wrong class on job 2015-08-26 16:33:16 +02:00
Konstantin Haase
2f19ba3357 API v3: don't load all builds when eagerloading repository.last_build 2015-05-05 17:01:03 +02:00
Konstantin Haase
61ae7e669e v3: allow expanding build.commit 2015-04-30 17:08:52 +02:00
Konstantin Haase
21aa667b9c v3: add account permissions 2015-04-29 14:14:21 +02:00
Konstantin Haase
1b19b57109 v3: add accounts api 2015-04-17 13:34:29 +02:00
Konstantin Haase
3680fcf389 v3: add subscription model 2015-04-17 12:16:11 +02:00
Konstantin Haase
d9f5e1e736 make user and org lookup by login case insensitive 2015-04-14 16:07:23 +02:00
Konstantin Haase
a3a9f1282a v3: add ?include=, detect circular dependencies in renderer 2015-03-09 16:56:02 +01:00
Konstantin Haase
05c20422cc v3: github_oauth_token is encrypted 2015-03-06 16:07:45 +01:00
Konstantin Haase
de5908dd43 v3: implement enable/disable 2015-03-06 15:35:47 +01:00
Konstantin Haase
8123f99b8a v3: limit branch.builds to pushes 2015-02-24 06:46:32 +01:00
Konstantin Haase
c968bbaab1 v3: use branches table for default_branch, eager load on /repos endpoint to avoid N+1 queries 2015-02-23 22:54:28 +01:00
Konstantin Haase
0a485d2137 make sure access control is using the non-core user model 2015-02-23 17:09:14 +01:00
Konstantin Haase
5f2dc47e07 no longer use models from travis-core in queries 2015-02-23 16:50:51 +01:00