Skip to content

Commit

Permalink
Revert problem with non-iterable data.jobs sometimes.
Browse files Browse the repository at this point in the history
The data.jobs is apparently deprecated but getting rid of it
causes data not iterable sometimes. Before investigation we want to
revert that to stop failures from happening
  • Loading branch information
potiuk committed Nov 1, 2020
1 parent f06d03c commit 169f169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ function jobsMatchingNames(repositoryInfo, runId, jobNameRegexps, checkIfFailed)
try {
for (var _b = __asyncValues(repositoryInfo.octokit.paginate.iterator(listJobs)), _c; _c = yield _b.next(), !_c.done;) {
const item = _c.value;
for (const job of item.data) {
for (const job of item.data.jobs) {
core.info(` The job name: ${job.name}, Conclusion: ${job.conclusion}`);
const [jobMatched, jobMatches] = matchInArray(job.name, jobNameRegexps);
if (jobMatched) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ async function jobsMatchingNames(
const allMatches: string[] = []
let matched = false
for await (const item of repositoryInfo.octokit.paginate.iterator(listJobs)) {
for (const job of item.data) {
for (const job of item.data.jobs) {
core.info(` The job name: ${job.name}, Conclusion: ${job.conclusion}`)
const [jobMatched, jobMatches] = matchInArray(job.name, jobNameRegexps)
if (jobMatched) {
Expand Down

0 comments on commit 169f169

Please sign in to comment.