1 | package edu.ucsb.cs156.frontiers.jobs; | |
2 | ||
3 | import edu.ucsb.cs156.frontiers.entities.Course; | |
4 | import edu.ucsb.cs156.frontiers.entities.RosterStudent; | |
5 | import edu.ucsb.cs156.frontiers.enums.OrgStatus; | |
6 | import edu.ucsb.cs156.frontiers.enums.RepositoryPermissions; | |
7 | import edu.ucsb.cs156.frontiers.services.RepositoryService; | |
8 | import edu.ucsb.cs156.frontiers.services.jobs.JobContext; | |
9 | import edu.ucsb.cs156.frontiers.services.jobs.JobContextConsumer; | |
10 | import lombok.Builder; | |
11 | ||
12 | @Builder | |
13 | public class CreateStudentRepositoriesJob implements JobContextConsumer { | |
14 | Course course; | |
15 | RepositoryService repositoryService; | |
16 | String repositoryPrefix; | |
17 | Boolean isPrivate; | |
18 | RepositoryPermissions permissions; | |
19 | ||
20 | @Override | |
21 | public void accept(JobContext ctx) throws Exception { | |
22 | ctx.log("Processing..."); | |
23 | for (RosterStudent student : course.getRosterStudents()) { | |
24 |
1
1. accept : negated conditional → KILLED |
if (student.getGithubLogin() != null |
25 |
1
1. accept : negated conditional → KILLED |
&& (student.getOrgStatus() == OrgStatus.MEMBER |
26 |
1
1. accept : negated conditional → KILLED |
|| student.getOrgStatus() == OrgStatus.OWNER)) { |
27 |
1
1. accept : removed call to edu/ucsb/cs156/frontiers/services/RepositoryService::createStudentRepository → KILLED |
repositoryService.createStudentRepository( |
28 | course, student, repositoryPrefix, isPrivate, permissions); | |
29 | } | |
30 | } | |
31 | ctx.log("Done"); | |
32 | } | |
33 | } | |
Mutations | ||
24 |
1.1 |
|
25 |
1.1 |
|
26 |
1.1 |
|
27 |
1.1 |