diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/courses/entity/student_teams/GenerateRepositories.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/courses/entity/student_teams/GenerateRepositories.java
index a0818a4..07717c5 100644
--- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/courses/entity/student_teams/GenerateRepositories.java
+++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/courses/entity/student_teams/GenerateRepositories.java
@@ -39,7 +39,7 @@ public class GenerateRepositories {
optionalCourse.ifPresent(course -> {
course.setGithubOrganizationName("InitializerTesting");
try {
- GithubManager manager = new GithubManager("andrewlalis", "scrubstub43");
+ GithubManager manager = new GithubManager(course.getApiKey());
manager.generateStudentTeamRepository(course.getStudentTeams().get(0));
} catch (IOException e) {
e.printStackTrace();
diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/Course.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/Course.java
index 97a62f3..8c33111 100644
--- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/Course.java
+++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/Course.java
@@ -38,6 +38,12 @@ public class Course extends BasicEntity {
@Column
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.
*/
@@ -142,6 +148,14 @@ public class Course extends BasicEntity {
this.githubOrganizationName = name;
}
+ public String getApiKey() {
+ return this.apiKey;
+ }
+
+ public void setApiKey(String key) {
+ this.apiKey = key;
+ }
+
public List