Skip to content

Commit

Permalink
Add response map function
Browse files Browse the repository at this point in the history
  • Loading branch information
tchssk committed Sep 21, 2022
1 parent 6b830fd commit 88c313b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ export class FieldFactory {
repo: context.repo.repo,
run_id: context.runId,
},
(response, done) => {
if (response.data.find(job => this.isCurrentJobName(job.name))) {
done();
}
return response.data;
},
);
const currentJob = jobs.find(job => this.isCurrentJobName(job.name));
if (currentJob === undefined) {
Expand Down Expand Up @@ -148,6 +154,12 @@ export class FieldFactory {
repo: context.repo.repo,
run_id: context.runId,
},
(response, done) => {
if (response.data.find(job => this.isCurrentJobName(job.name))) {
done();
}
return response.data;
},
);
const currentJob = jobs.find(job => this.isCurrentJobName(job.name));
if (currentJob === undefined) {
Expand Down

0 comments on commit 88c313b

Please sign in to comment.