Skip to content

Instantly share code, notes, and snippets.

@pwfcurry
Created June 3, 2021 11:37
Show Gist options
  • Save pwfcurry/e84fc777e3abbdbec8f4a0e8bd0e8d87 to your computer and use it in GitHub Desktop.
Save pwfcurry/e84fc777e3abbdbec8f4a0e8bd0e8d87 to your computer and use it in GitHub Desktop.
Combine and print paginated semaphore workflow results
const fs = require("fs");
const pageCount = 69; // replace with actual page count
const workflows = [];
for (let i = 1; i < pageCount + 1; i++) {
const file = fs.readFileSync(`./sem_workflows_page_${i}.json`);
const page = JSON.parse(String(file));
page.forEach((w) => workflows.push(w));
}
workflows.forEach((workflow) => {
const date = new Date(workflow.created_at.seconds * 1000);
const branch = workflow.branch_name;
console.log(`${date.toISOString()} ${branch}`);
});
@pwfcurry
Copy link
Author

pwfcurry commented Jun 3, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment