We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f18a9d commit 3040818Copy full SHA for 3040818
1 file changed
packages/cli/src/actions/ci/github.ts
@@ -32,6 +32,14 @@ export async function commitAndPush(
32
): Promise<string> {
33
await configGit()
34
35
+ // Check if there are changes to commit before proceeding
36
+ const status = await $`git status --porcelain ${path}`
37
+ if (!status.stdout.trim()) {
38
+ // No changes, skip commit and push, return current HEAD
39
+ const hash = await $`git rev-parse HEAD`
40
+ return hash.stdout.trim()
41
+ }
42
+
43
await $`git pull`
44
await $`git add ${path}`
45
await $`git commit -m ${message}`
0 commit comments