-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
634 fork and unmirror repository #1030
Conversation
end | ||
|
||
# executes a pull/clone job | ||
def remote_send(method) | ||
def remote_send(method, remote_type=nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/MethodLength: Method has too many lines. [17/10]
Style/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment.
9d5f197
to
8a41c94
Compare
|
||
before_validation ->{ detect_source_type } | ||
after_create ->{ async_remote :clone }, if: :mirror? | ||
before_validation ->{ detect_source_type if new_record? } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/SpaceBeforeBlockBraces: Space missing to the left of {.
d01d2c2
to
583aae2
Compare
|
||
before_validation ->{ detect_source_type } | ||
after_create ->{ async_remote :clone }, if: :mirror? | ||
before_validation ->() do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Lambda: Use the lambda
method for multi-line lambdas.
2fcf7ca
to
2324b05
Compare
2324b05
to
4dc9d14
Compare
@@ -12,7 +12,8 @@ def create | |||
end | |||
|
|||
def update | |||
params[:repository].except!(:source_address, :source_type, :name) | |||
resource.convert_to_local! if params[:un_mirror] | |||
params[:repository].except!(:source_address, :source_type, :remote_type, :name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [83/80]
54a4b3d
to
7ca499c
Compare
let(:repository) { create :repository, | ||
source_address: 'http://some_source_address.example.com', | ||
source_type: 'git', | ||
remote_type: 'mirror' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the factory
30dcf0f
to
b046e9a
Compare
👍 |
Please rebase Staging in it to make it mergeable before closing this pull request |
bf6bd9a
to
5db1056
Compare
Done, but there were merge conflicts in the |
5db1056
to
b3d49d7
Compare
👍 |
634 fork and unmirror repository
Shall fix both issues of #634 (and #351): Allowing to fork a repository and converting a mirror to a local repository.
This also improves the javascript in the new repository view as it now updates everytime the source address is changed (key press, click, cut, paste) and not only when its input field loses focus.