Changed repo defaults to private in anticipation of first release.
This commit is contained in:
parent
a55fab8d47
commit
b59634f8ed
|
@ -1,6 +1,5 @@
|
||||||
package nl.andrewlalis;
|
package nl.andrewlalis;
|
||||||
|
|
||||||
import nl.andrewlalis.model.Organization;
|
|
||||||
import nl.andrewlalis.ui.control.command.CommandExecutor;
|
import nl.andrewlalis.ui.control.command.CommandExecutor;
|
||||||
import nl.andrewlalis.ui.control.command.executables.*;
|
import nl.andrewlalis.ui.control.command.executables.*;
|
||||||
import nl.andrewlalis.ui.view.InitializerApp;
|
import nl.andrewlalis.ui.view.InitializerApp;
|
||||||
|
|
|
@ -6,9 +6,6 @@ import nl.andrewlalis.model.Student;
|
||||||
import nl.andrewlalis.model.StudentTeam;
|
import nl.andrewlalis.model.StudentTeam;
|
||||||
import nl.andrewlalis.model.TATeam;
|
import nl.andrewlalis.model.TATeam;
|
||||||
import nl.andrewlalis.model.TeachingAssistant;
|
import nl.andrewlalis.model.TeachingAssistant;
|
||||||
import nl.andrewlalis.model.error.Error;
|
|
||||||
import nl.andrewlalis.model.error.Severity;
|
|
||||||
import nl.andrewlalis.ui.view.InitializerApp;
|
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPatch;
|
import org.apache.http.client.methods.HttpPatch;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.http.entity.StringEntity;
|
||||||
|
@ -115,7 +112,7 @@ public class GithubManager {
|
||||||
logger.fine("Deleted pre-existing assignments repository.");
|
logger.fine("Deleted pre-existing assignments repository.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.assignmentsRepo = this.createRepository(assignmentsRepoName, team, description, false, true, false);
|
this.assignmentsRepo = this.createRepository(assignmentsRepoName, team, description, false, true, true);
|
||||||
|
|
||||||
if (this.assignmentsRepo == null) {
|
if (this.assignmentsRepo == null) {
|
||||||
logger.severe("Could not create assignments repository.");
|
logger.severe("Could not create assignments repository.");
|
||||||
|
@ -143,7 +140,7 @@ public class GithubManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GHRepository repo = this.createRepository(team.generateUniqueName(prefix), taTeam.getGithubTeam(), team.generateRepoDescription(), false, true, false);
|
GHRepository repo = this.createRepository(team.generateUniqueName(prefix), taTeam.getGithubTeam(), team.generateRepoDescription(), false, true, true);
|
||||||
|
|
||||||
if (repo == null) {
|
if (repo == null) {
|
||||||
logger.severe("Repository for student team " + team.getId() + " could not be created.");
|
logger.severe("Repository for student team " + team.getId() + " could not be created.");
|
||||||
|
|
|
@ -34,6 +34,8 @@ public class InitializerApp extends JFrame {
|
||||||
private JTextField organizationField = new JTextField();
|
private JTextField organizationField = new JTextField();
|
||||||
private JTextField accessTokenField = new JTextField();
|
private JTextField accessTokenField = new JTextField();
|
||||||
|
|
||||||
|
private JCheckBox privateCheckbox = new JCheckBox("Private");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The executor responsible for performing meaningful actions.
|
* The executor responsible for performing meaningful actions.
|
||||||
*/
|
*/
|
||||||
|
@ -113,6 +115,8 @@ public class InitializerApp extends JFrame {
|
||||||
this.organizationField.setText("InitializerTesting");
|
this.organizationField.setText("InitializerTesting");
|
||||||
infoInputPanel.add(generateTextFieldPanel("Access Token", this.accessTokenField));
|
infoInputPanel.add(generateTextFieldPanel("Access Token", this.accessTokenField));
|
||||||
this.accessTokenField.setText("haha get your own");
|
this.accessTokenField.setText("haha get your own");
|
||||||
|
infoInputPanel.add(this.privateCheckbox);
|
||||||
|
this.privateCheckbox.disable();
|
||||||
|
|
||||||
githubManagerPanel.add(infoInputPanel, BorderLayout.NORTH);
|
githubManagerPanel.add(infoInputPanel, BorderLayout.NORTH);
|
||||||
|
|
||||||
|
@ -222,6 +226,14 @@ public class InitializerApp extends JFrame {
|
||||||
return this.accessTokenField.getText().trim();
|
return this.accessTokenField.getText().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether or not the 'private' checkbox is selected.
|
||||||
|
* @return True if the user wishes for repositories to be made private, or false otherwise.
|
||||||
|
*/
|
||||||
|
public boolean isPrivateChecked() {
|
||||||
|
return this.privateCheckbox.isSelected();
|
||||||
|
}
|
||||||
|
|
||||||
public Organization getOrganization() {
|
public Organization getOrganization() {
|
||||||
return this.organization;
|
return this.organization;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue