File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ def initialize(params)
55
66 if id = params [ :repository_id ] || params [ :id ]
77 details = "with id=#{ params [ :repository_id ] || params [ :id ] } "
8+ elsif params [ :github_id ]
9+ details = "with github_id=#{ params [ :github_id ] } "
810 elsif params [ :vcs_id ]
911 details = "with vcs_id=#{ params [ :vcs_id ] } "
1012 elsif params . key? ( :slug )
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ class Repository < Travis::Model
3939 scope :by_params , -> ( params ) {
4040 if id = params [ :repository_id ] || params [ :id ]
4141 where ( id : id )
42+ elsif params [ :github_id ]
43+ where ( 'vcs_id = :id OR github_id = :id_i' , id : params [ :github_id ] . to_s , id_i : params [ :github_id ] . to_i )
4244 elsif params [ :vcs_id ] && params [ 'vcs_type' ]
4345 where ( vcs_id : params [ :vcs_id ] , vcs_type : params [ 'vcs_type' ] )
4446 elsif params [ :vcs_id ]
You can’t perform that action at this time.
0 commit comments