Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
perezale committed Aug 21, 2024
1 parent 376f2ea commit a42ab7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/policies/policy-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
private _status: STATUS;

private _conclusion: CONCLUSION;

private _firstRunId:number = -1;

constructor(checkName: string) {
this.octokit = getOctokit(inputs.GITHUB_TOKEN);
Expand All @@ -89,6 +91,8 @@

const firstRun = await this.loadFirstRun(context.repo.owner, context.repo.repo);
core.info(`First run found: ${firstRun?.id}`);
this._firstRunId = firstRun?.id || -1;


this._status = STATUS.INITIALIZED;
return result.data;
Expand All @@ -105,8 +109,6 @@
get raw(): any {
return this._raw;
}

private _firstRunId:number = -1;

get url(): string {
return `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${this._firstRunId}/job/${this.raw.id}`;
Expand Down Expand Up @@ -172,8 +174,6 @@
head_sha: sha,
workflow_id: workflowRun.data.workflow_id
});

core.info(JSON.stringify(runs));

// Filter by the given SHA
const filteredRuns = runs.data.workflow_runs.filter(
Expand Down

0 comments on commit a42ab7e

Please sign in to comment.