Created
March 7, 2015 14:46
-
-
Save lodestone/a5152f5e870e4f9212e0 to your computer and use it in GitHub Desktop.
Import a Github repo into Gitlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Currently this works if you change the token and run it through the console. | |
var fun = function() { | |
f=$($("form")[0]); | |
f.children(":input").val(""); | |
f.prepend("<input name='private_token' value='<<<YOUR_PRIVATE_TOKEN>>>'/>"); | |
f.prepend("<input name='name' value='"+$(".js-current-repository").text()+"'/>"); | |
f.prepend("<input name='import_url' value='"+window.location+"'/>"); | |
f.attr("action", "https://gitlab.com/api/v3/projects"); | |
f.attr("method", "post"); | |
f.submit(); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment