Skip to content

Instantly share code, notes, and snippets.

@tfluehr
tfluehr / checkStatus.js
Created August 2, 2023 19:53
changesets status check for ci/cd
const { execSync } = require("child_process");
// get the reference to a common ancestor in this branch vs the origin/main branch
const ref = execSync(`git merge-base main HEAD`);
// get the list of files changed since the common ancestor
let fileList = execSync(`git diff --name-only ${ref}`).toString().split('\n');
// used to test the script locally
// fileList.push('.changeset/odd-wombats-vanish.md');