Skip to content

Instantly share code, notes, and snippets.

@lodestone
Created March 7, 2015 14:46
Show Gist options
  • Save lodestone/a5152f5e870e4f9212e0 to your computer and use it in GitHub Desktop.
Save lodestone/a5152f5e870e4f9212e0 to your computer and use it in GitHub Desktop.
Import a Github repo into Gitlab
// 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