Adds more than just a TA dialog #4
|
@ -1,6 +1,5 @@
|
|||
package nl.andrewlalis;
|
||||
|
||||
import nl.andrewlalis.model.Organization;
|
||||
import nl.andrewlalis.ui.control.command.CommandExecutor;
|
||||
import nl.andrewlalis.ui.control.command.executables.*;
|
||||
import nl.andrewlalis.ui.view.InitializerApp;
|
||||
|
|
|
@ -6,9 +6,6 @@ import nl.andrewlalis.model.Student;
|
|||
import nl.andrewlalis.model.StudentTeam;
|
||||
import nl.andrewlalis.model.TATeam;
|
||||
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.client.methods.HttpPatch;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
|
@ -115,7 +112,7 @@ public class GithubManager {
|
|||
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) {
|
||||
logger.severe("Could not create assignments repository.");
|
||||
|
@ -143,7 +140,7 @@ public class GithubManager {
|
|||
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) {
|
||||
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 accessTokenField = new JTextField();
|
||||
|
||||
private JCheckBox privateCheckbox = new JCheckBox("Private");
|
||||
|
||||
/**
|
||||
* The executor responsible for performing meaningful actions.
|
||||
*/
|
||||
|
@ -113,6 +115,8 @@ public class InitializerApp extends JFrame {
|
|||
this.organizationField.setText("InitializerTesting");
|
||||
infoInputPanel.add(generateTextFieldPanel("Access Token", this.accessTokenField));
|
||||
this.accessTokenField.setText("haha get your own");
|
||||
infoInputPanel.add(this.privateCheckbox);
|
||||
this.privateCheckbox.disable();
|
||||
|
||||
githubManagerPanel.add(infoInputPanel, BorderLayout.NORTH);
|
||||
|
||||
|
@ -222,6 +226,14 @@ public class InitializerApp extends JFrame {
|
|||
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() {
|
||||
return this.organization;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue