Skip to content

Commit 33d6c3c

Browse files
committed
fix: add 'skipped_not_requested' to GitCommitStepStatus for non-commit actions
When the action is 'push' or 'create_pr', the commit step was hardcoded to 'skipped_no_changes' which incorrectly implies the system tried to commit but found nothing. Added 'skipped_not_requested' variant to GitCommitStepStatus (matching the pattern used by push, PR, and branch step schemas) and use it when the commit phase is not part of the action.
1 parent 4ebb3d1 commit 33d6c3c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

apps/server/src/git/Layers/GitManager.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => {
13881388
action: "push",
13891389
});
13901390

1391-
expect(result.commit.status).toBe("skipped_no_changes");
1391+
expect(result.commit.status).toBe("skipped_not_requested");
13921392
expect(result.push.status).toBe("pushed");
13931393
expect(result.pr.status).toBe("skipped_not_requested");
13941394
expect(
@@ -1432,7 +1432,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => {
14321432
action: "create_pr",
14331433
});
14341434

1435-
expect(result.commit.status).toBe("skipped_no_changes");
1435+
expect(result.commit.status).toBe("skipped_not_requested");
14361436
expect(result.push.status).toBe("pushed");
14371437
expect(result.push.setUpstream).toBe(true);
14381438
expect(result.pr.status).toBe("created");
@@ -2727,7 +2727,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => {
27272727
},
27282728
);
27292729

2730-
expect(result.commit.status).toBe("skipped_no_changes");
2730+
expect(result.commit.status).toBe("skipped_not_requested");
27312731
expect(result.push.status).toBe("skipped_not_requested");
27322732
expect(result.pr.status).toBe("created");
27332733
expect(

apps/server/src/git/Layers/GitManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ export const makeGitManager = Effect.fn("makeGitManager")(function* () {
15921592
),
15931593
),
15941594
)
1595-
: { status: "skipped_no_changes" as const };
1595+
: { status: "skipped_not_requested" as const };
15961596

15971597
const push = wantsPush
15981598
? yield* progress

packages/contracts/src/git.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export const GitActionProgressKind = Schema.Literals([
2727
export type GitActionProgressKind = typeof GitActionProgressKind.Type;
2828
export const GitActionProgressStream = Schema.Literals(["stdout", "stderr"]);
2929
export type GitActionProgressStream = typeof GitActionProgressStream.Type;
30-
const GitCommitStepStatus = Schema.Literals(["created", "skipped_no_changes"]);
30+
const GitCommitStepStatus = Schema.Literals([
31+
"created",
32+
"skipped_no_changes",
33+
"skipped_not_requested",
34+
]);
3135
const GitPushStepStatus = Schema.Literals([
3236
"pushed",
3337
"skipped_not_requested",

0 commit comments

Comments
 (0)