Removed sensitive info.
This commit is contained in:
parent
4823bad19f
commit
fabe05ba54
|
@ -39,7 +39,7 @@ public class GenerateRepositories {
|
||||||
optionalCourse.ifPresent(course -> {
|
optionalCourse.ifPresent(course -> {
|
||||||
course.setGithubOrganizationName("InitializerTesting");
|
course.setGithubOrganizationName("InitializerTesting");
|
||||||
try {
|
try {
|
||||||
GithubManager manager = new GithubManager("andrewlalis", "scrubstub43");
|
GithubManager manager = new GithubManager(course.getApiKey());
|
||||||
manager.generateStudentTeamRepository(course.getStudentTeams().get(0));
|
manager.generateStudentTeamRepository(course.getStudentTeams().get(0));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -38,6 +38,12 @@ public class Course extends BasicEntity {
|
||||||
@Column
|
@Column
|
||||||
private String githubOrganizationName;
|
private String githubOrganizationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The API key that will be used for Github interaction with this organization.
|
||||||
|
*/
|
||||||
|
@Column
|
||||||
|
private String apiKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of assignments this course contains.
|
* The list of assignments this course contains.
|
||||||
*/
|
*/
|
||||||
|
@ -142,6 +148,14 @@ public class Course extends BasicEntity {
|
||||||
this.githubOrganizationName = name;
|
this.githubOrganizationName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getApiKey() {
|
||||||
|
return this.apiKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiKey(String key) {
|
||||||
|
this.apiKey = key;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Assignment> getAssignments() {
|
public List<Assignment> getAssignments() {
|
||||||
return assignments;
|
return assignments;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,18 +36,8 @@ public class StudentTeamImporter {
|
||||||
|
|
||||||
List<StudentRecordEntry> studentEntries = extractStudentsFromRecords(records);
|
List<StudentRecordEntry> studentEntries = extractStudentsFromRecords(records);
|
||||||
|
|
||||||
System.out.println("<<< Entries (" + studentEntries.size() + ") >>>");
|
|
||||||
for (StudentRecordEntry entry : studentEntries) {
|
|
||||||
System.out.println(entry.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
List<StudentTeam> studentTeams = generateTeamsFromStudentEntries(studentEntries, 0);
|
List<StudentTeam> studentTeams = generateTeamsFromStudentEntries(studentEntries, 0);
|
||||||
|
|
||||||
System.out.println("<<< Teams (" + studentTeams.size() + ") >>>");
|
|
||||||
for (StudentTeam team : studentTeams) {
|
|
||||||
System.out.println("Team: " + team);
|
|
||||||
}
|
|
||||||
|
|
||||||
return studentTeams;
|
return studentTeams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,17 @@
|
||||||
</p>
|
</p>
|
||||||
<form action="#" th:action="@{/courses}" th:object="${course}" method="post">
|
<form action="#" th:action="@{/courses}" th:object="${course}" method="post">
|
||||||
<label for="course_name_input">Name:</label>
|
<label for="course_name_input">Name:</label>
|
||||||
<input id="course_name_input" type="text" th:field="*{name}"/>
|
<input id="course_name_input" type="text" th:field="*{name}" required/>
|
||||||
|
|
||||||
<label for="course_code_input">Code:</label>
|
<label for="course_code_input">Code:</label>
|
||||||
<input id="course_code_input" type="text" th:field="*{code}"/>
|
<input id="course_code_input" type="text" th:field="*{code}" required/>
|
||||||
|
|
||||||
<label for="course_github_organization_name_input">Github Organization:</label>
|
<label for="course_github_organization_name_input">Github Organization:</label>
|
||||||
<input id="course_github_organization_name_input" type="text" th:field="*{githubOrganizationName}"/>
|
<input id="course_github_organization_name_input" type="text" th:field="*{githubOrganizationName}" required/>
|
||||||
|
|
||||||
|
<label for="course_github_api_key_input">Github API Key:</label>
|
||||||
|
<input id="course_github_api_key_input" type="text" th:field="*{apiKey}" required/>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue