Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelangarano committed Jan 10, 2024
1 parent bdd028b commit 246b48e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/cypress-cloud/lib/api/types/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CiParams, CiProvider } from "cypress-cloud/lib/ciProvider";
import { Platform, ValidatedCurrentsParameters } from "cypress-cloud/types";
import { GhaEventData } from "../../git";

export type CreateRunPayload = {
ci: {
Expand All @@ -10,7 +11,7 @@ export type CreateRunPayload = {
projectId: string;
recordKey: string;
commit: {
[memoKey: string]: string | null;
[memoKey: string]: string | GhaEventData | null;
};
specs: string[];
group?: string;
Expand Down
7 changes: 5 additions & 2 deletions packages/cypress-cloud/lib/ciProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,14 @@ export function getCommitDefaults(existingInfo: CiProviderData) {
const combined = _.transform(
existingInfo,
(
memo: { [memoKey: string]: string | null },
memo: { [memoKey: string]: string | GhaEventData | null },
value: string | GhaEventData,
key: string
) => {
return (memo[key] = _.defaultTo(value || commitParamsObj[key], null));
return (memo[key] = _.defaultTo(
value || commitParamsObj[key as keyof CiProvider],
null
));
}
);

Expand Down

0 comments on commit 246b48e

Please sign in to comment.