Skip to content

Commit 334c967

Browse files
committed
feat: track UpdatedRef and newIdxFiles in Action
1 parent 0028743 commit 334c967

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/proxy/actions/Action.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getProxyUrl } from "../../config";
2-
import { Step } from "./Step";
1+
import { getProxyUrl } from '../../config';
2+
import { Step } from './Step';
33

44
/**
55
* Represents a commit.
@@ -14,6 +14,14 @@ export interface Commit {
1414
commitTS?: string; // TODO: Normalize this to commitTimestamp
1515
commitTimestamp?: string;
1616
}
17+
/**
18+
* Represents an UpdatedRef in the action.
19+
*/
20+
export interface UpdatedRef {
21+
ref: string;
22+
oldOid: string;
23+
newOid: string;
24+
}
1725

1826
/**
1927
* Class representing a Push.
@@ -48,6 +56,8 @@ class Action {
4856
attestation?: string;
4957
lastStep?: Step;
5058
proxyGitPath?: string;
59+
updatedRefs?: UpdatedRef[];
60+
newIdxFiles?: string[];
5161

5262
/**
5363
* Create an action.
@@ -62,15 +72,15 @@ class Action {
6272
this.type = type;
6373
this.method = method;
6474
this.timestamp = timestamp;
65-
this.project = repo.split("/")[0];
66-
this.repoName = repo.split("/")[1];
75+
this.project = repo.split('/')[0];
76+
this.repoName = repo.split('/')[1];
6777
this.url = `${getProxyUrl()}/${repo}`;
6878
this.repo = repo;
6979
}
7080

7181
/**
7282
* Add a step to the action.
73-
* @param {Step} step
83+
* @param {Step} step
7484
*/
7585
addStep(step: Step): void {
7686
this.steps.push(step);

0 commit comments

Comments
 (0)