async function create_new_repo()

in htdocs/js/boxer.js [675:709]


async function create_new_repo(project, name, priv, title, commit, dev) {
    blurbg(true);
    let rv = await POST("api/repository.json" , {
        action: 'create' ,
        repository: name,
        private: priv,
        title: title,
        commit: commit,
        issue: dev
    });
    blurbg(false);
    if (rv.okay == true) {
        let canvas = document.getElementById('main');
        let repo_url_gitbox = "https://gitbox.apache.org/repos/" + ( priv ? "private/" + project : "asf") + "/" + name;
        let repo_url_github= "https://github.com/apache/" + name;
        canvas.innerText = 'Your repository has been created and will be available for use within a few minutes.';
        canvas.appendChild(br());
        canvas.appendChild(document.createTextNode("Your project is available on gitbox at: "));
        let gburl = document.createElement('a');
        gburl.setAttribute("href" ,repo_url_gitbox);
        gburl.innerText = repo_url_gitbox;
        canvas.appendChild(gburl);
        canvas.appendChild(br());
        canvas.appendChild(document.createTextNode("Your project is available on GitHub at: "));
        let ghurl = document.createElement('a');
        ghurl.setAttribute("href" ,repo_url_github);
        ghurl.innerText = repo_url_github;
        canvas.appendChild(ghurl);
        canvas.appendChild(br());
        canvas.appendChild(document.createTextNode("User permissions should be set up within the next five minutes. If not, please let us know at: users@infra.apache.org"));

    } else {
        alert(rv.message);
    }
}