Skip to content

Commit

Permalink
Migration Tweaks (go-gitea#6260)
Browse files Browse the repository at this point in the history
* Adds auto-name if repo name is blank
Adds error checking before sanitization in migration

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Changed err from sanitization to a different variable

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove handleCreatePost and implement separately

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>
  • Loading branch information
jolheiser authored and jeffliu27 committed Jul 18, 2019
1 parent a1fb48a commit 5f47fa1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 +2160,14 @@ $(document).ready(function () {
break;
}
}

var $cloneAddr = $('#clone_addr');
$cloneAddr.change(function() {
var $repoName = $('#repo_name');
if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank
$repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]);
}
});
});

function changeHash(hash) {
Expand Down

0 comments on commit 5f47fa1

Please sign in to comment.