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