Skip to content

Commit

Permalink
Add files then check cached diff to get untracked files
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Nov 7, 2022
1 parent 380d473 commit 45100d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ci/pr-bot/shared/persistentState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ async function commitStateToRepo() {
}
// Print changes for observability
await exec.exec("git status", [], {ignoreReturnCode: true});
const changes = await exec.exec("git diff --quiet origin/pr-bot-state state", [], {ignoreReturnCode: true});
await exec.exec("git add state/*");
const changes = await exec.exec("git diff --quiet --cached origin/pr-bot-state state", [], {ignoreReturnCode: true});
if (changes == 1) {
await exec.exec("git add state/*");
await exec.exec(`git commit -m "Updating config from bot" --allow-empty`);
await exec.exec("git push origin pr-bot-state");
} else {
Expand Down

0 comments on commit 45100d7

Please sign in to comment.