Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-init repo on license, .gitignore select #12202

Merged
merged 8 commits into from
Jul 23, 2020
9 changes: 9 additions & 0 deletions web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,15 @@ async function initRepository() {
});
}

// Repo Creation
if ($('.repository.new.repo').length > 0) {
$('input[name="gitignores"], input[name="license"]').on('change', () => {
const gitignores = $('input[name="gitignores"]').val();
cipherboy marked this conversation as resolved.
Show resolved Hide resolved
const license = $('input[name="license"]').val();
cipherboy marked this conversation as resolved.
Show resolved Hide resolved
$('input[name="auto_init"]')[0].checked = Boolean(gitignores || license);
cipherboy marked this conversation as resolved.
Show resolved Hide resolved
cipherboy marked this conversation as resolved.
Show resolved Hide resolved
});
}

// Issues
if ($('.repository.view.issue').length > 0) {
// Edit issue title
Expand Down