Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8d677bb1
Commit
8d677bb1
authored
Jan 08, 2018
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into explore-dispatcher-refactor
parents
cc67e914
bd50ecba
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
12 deletions
+34
-12
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-3
app/assets/javascripts/pages/dashboard/todos/index/index.js
app/assets/javascripts/pages/dashboard/todos/index/index.js
+3
-0
app/assets/javascripts/pages/dashboard/todos/index/todos.js
app/assets/javascripts/pages/dashboard/todos/index/todos.js
+3
-3
lib/gitlab/gitaly_client/repository_service.rb
lib/gitlab/gitaly_client/repository_service.rb
+5
-2
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+1
-1
spec/javascripts/todos_spec.js
spec/javascripts/todos_spec.js
+1
-1
spec/lib/gitlab/shell_spec.rb
spec/lib/gitlab/shell_spec.rb
+18
-2
No files found.
app/assets/javascripts/dispatcher.js
View file @
8d677bb1
...
...
@@ -56,7 +56,6 @@ import GfmAutoComplete from './gfm_auto_complete';
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
SigninTabsMemoizer
from
'
./signin_tabs_memoizer
'
;
import
Star
from
'
./star
'
;
import
Todos
from
'
./todos
'
;
import
TreeView
from
'
./tree
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
UsernameValidator
from
'
./username_validator
'
;
...
...
@@ -111,6 +110,7 @@ import Activities from './activities';
}
const
fail
=
()
=>
Flash
(
'
Error loading dynamic module
'
);
const
callDefault
=
m
=>
m
.
default
();
path
=
page
.
split
(
'
:
'
);
shortcut_handler
=
null
;
...
...
@@ -212,7 +212,7 @@ import Activities from './activities';
projectSelect
();
break
;
case
'
dashboard:todos:index
'
:
new
Todos
(
);
import
(
'
./pages/dashboard/todos/index
'
).
then
(
callDefault
).
catch
(
fail
);
break
;
case
'
explore:projects:index
'
:
case
'
explore:projects:trending
'
:
...
...
@@ -540,7 +540,7 @@ import Activities from './activities';
new
CILintEditor
();
break
;
case
'
users:show
'
:
import
(
'
./pages/users/show
'
).
then
(
m
=>
m
.
default
()
).
catch
(
fail
);
import
(
'
./pages/users/show
'
).
then
(
callDefault
).
catch
(
fail
);
break
;
case
'
admin:conversational_development_index:show
'
:
new
UserCallout
();
...
...
app/assets/javascripts/pages/dashboard/todos/index/index.js
0 → 100644
View file @
8d677bb1
import
Todos
from
'
./todos
'
;
export
default
()
=>
new
Todos
();
app/assets/javascripts/todos.js
→
app/assets/javascripts/
pages/dashboard/todos/index/
todos.js
View file @
8d677bb1
/* eslint-disable class-methods-use-this, no-unneeded-ternary, quote-props */
import
{
visitUrl
}
from
'
.
/lib/utils/url_utility
'
;
import
UsersSelect
from
'
.
/users_select
'
;
import
{
isMetaClick
}
from
'
.
/lib/utils/common_utils
'
;
import
{
visitUrl
}
from
'
~
/lib/utils/url_utility
'
;
import
UsersSelect
from
'
~
/users_select
'
;
import
{
isMetaClick
}
from
'
~
/lib/utils/common_utils
'
;
export
default
class
Todos
{
constructor
()
{
...
...
lib/gitlab/gitaly_client/repository_service.rb
View file @
8d677bb1
...
...
@@ -43,8 +43,11 @@ module Gitlab
GitalyClient
.
call
(
@storage
,
:repository_service
,
:apply_gitattributes
,
request
)
end
def
fetch_remote
(
remote
,
ssh_auth:
nil
,
forced:
false
,
no_tags:
false
)
request
=
Gitaly
::
FetchRemoteRequest
.
new
(
repository:
@gitaly_repo
,
remote:
remote
,
force:
forced
,
no_tags:
no_tags
)
def
fetch_remote
(
remote
,
ssh_auth
:,
forced
:,
no_tags
:,
timeout
:)
request
=
Gitaly
::
FetchRemoteRequest
.
new
(
repository:
@gitaly_repo
,
remote:
remote
,
force:
forced
,
no_tags:
no_tags
,
timeout:
timeout
)
if
ssh_auth
&
.
ssh_import?
if
ssh_auth
.
ssh_key_auth?
&&
ssh_auth
.
ssh_private_key
.
present?
...
...
lib/gitlab/shell.rb
View file @
8d677bb1
...
...
@@ -128,7 +128,7 @@ module Gitlab
def
fetch_remote
(
repository
,
remote
,
ssh_auth:
nil
,
forced:
false
,
no_tags:
false
)
gitaly_migrate
(
:fetch_remote
)
do
|
is_enabled
|
if
is_enabled
repository
.
gitaly_repository_client
.
fetch_remote
(
remote
,
ssh_auth:
ssh_auth
,
forced:
forced
,
no_tags:
no_tags
)
repository
.
gitaly_repository_client
.
fetch_remote
(
remote
,
ssh_auth:
ssh_auth
,
forced:
forced
,
no_tags:
no_tags
,
timeout:
git_timeout
)
else
storage_path
=
Gitlab
.
config
.
repositories
.
storages
[
repository
.
storage
][
"path"
]
local_fetch_remote
(
storage_path
,
repository
.
relative_path
,
remote
,
ssh_auth:
ssh_auth
,
forced:
forced
,
no_tags:
no_tags
)
...
...
spec/javascripts/todos_spec.js
View file @
8d677bb1
import
*
as
urlUtils
from
'
~/lib/utils/url_utility
'
;
import
Todos
from
'
~/todos
'
;
import
Todos
from
'
~/
pages/dashboard/todos/index/
todos
'
;
import
'
~/lib/utils/common_utils
'
;
describe
(
'
Todos
'
,
()
=>
{
...
...
spec/lib/gitlab/shell_spec.rb
View file @
8d677bb1
...
...
@@ -4,6 +4,7 @@ require 'stringio'
describe
Gitlab
::
Shell
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
let
(
:gitlab_shell
)
{
described_class
.
new
}
let
(
:popen_vars
)
{
{
'GIT_TERMINAL_PROMPT'
=>
ENV
[
'GIT_TERMINAL_PROMPT'
]
}
}
let
(
:gitlab_projects
)
{
double
(
'gitlab_projects'
)
}
...
...
@@ -201,8 +202,6 @@ describe Gitlab::Shell do
end
shared_examples
'fetch_remote'
do
|
gitaly_on
|
let
(
:repository
)
{
project
.
repository
}
def
fetch_remote
(
ssh_auth
=
nil
)
gitlab_shell
.
fetch_remote
(
repository
.
raw_repository
,
'remote-name'
,
ssh_auth:
ssh_auth
)
end
...
...
@@ -325,6 +324,23 @@ describe Gitlab::Shell do
describe
'#fetch_remote gitaly'
do
it_should_behave_like
'fetch_remote'
,
true
context
'gitaly call'
do
let
(
:remote_name
)
{
'remote-name'
}
let
(
:ssh_auth
)
{
double
(
:ssh_auth
)
}
subject
do
gitlab_shell
.
fetch_remote
(
repository
.
raw_repository
,
remote_name
,
forced:
true
,
no_tags:
true
,
ssh_auth:
ssh_auth
)
end
it
'passes the correct params to the gitaly service'
do
expect
(
repository
.
gitaly_repository_client
).
to
receive
(
:fetch_remote
)
.
with
(
remote_name
,
ssh_auth:
ssh_auth
,
forced:
true
,
no_tags:
true
,
timeout:
timeout
)
subject
end
end
end
describe
'#import_repository'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment