Skip to content

Commit 2a8037f

Browse files
jolheisertechknowlogick
authored andcommitted
Migration Tweaks (#6260)
* Adds auto-name if repo name is blank Adds error checking before sanitization in migration Signed-off-by: jolheiser <[email protected]> * Changed err from sanitization to a different variable Signed-off-by: jolheiser <[email protected]> * Remove handleCreatePost and implement separately Signed-off-by: jolheiser <[email protected]> * Make fmt Signed-off-by: jolheiser <[email protected]>
1 parent 160e7ed commit 2a8037f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

public/js/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,14 @@ $(document).ready(function () {
21602160
break;
21612161
}
21622162
}
2163+
2164+
var $cloneAddr = $('#clone_addr');
2165+
$cloneAddr.change(function() {
2166+
var $repoName = $('#repo_name');
2167+
if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank
2168+
$repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]);
2169+
}
2170+
});
21632171
});
21642172

21652173
function changeHash(hash) {

0 commit comments

Comments
 (0)