diff --git a/src/fields.ts b/src/fields.ts index d8e2ce77..d0584a35 100644 --- a/src/fields.ts +++ b/src/fields.ts @@ -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) { @@ -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) {