Skip to content

Commit

Permalink
added till to status if its initially HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
nleanba committed Mar 5, 2024
1 parent f0338aa commit 75a6e49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/JobsDataBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class JobsDataBase {
);
}

setStatus(job: Job, status: "failed" | "completed") {
setStatus(job: Job, status: "failed" | "completed" | "pending") {
const jobStatus: JobStatus = {
job,
status,
Expand Down
5 changes: 4 additions & 1 deletion src/action_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,16 @@ function run() {
removed = job.files.removed || [];
message =
`committed by action runner ${config.sourceRepository} ${job.id}`;
updateLocalData("source", log); // also done by getModifiedAfter
} else if (job.from) {
const files = getModifiedAfter(job.from, job.till, log);
modified = [...files.added, ...files.modified];
removed = files.removed;
if (files.till && files.till !== "HEAD") {
message =
`committed by action runner ${config.sourceRepository}@${files.till}`;
job.till = files.till;
queue.setStatus(job, "pending"); // updates `till`
} else {
message =
`committed by action runner ${config.sourceRepository}@${job.id}`;
Expand All @@ -128,7 +131,7 @@ function run() {
);
}

updateLocalData("source", log);
log(`\nTotal files: ${modified.length + removed.length}\n`);

// run saxon on modified files
for (const file of modified) {
Expand Down

0 comments on commit 75a6e49

Please sign in to comment.