Skip to content

Commit a71b0c6

Browse files
committed
Replace __dirname in sync.ts
1 parent 0a44f18 commit a71b0c6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎pr-checks/sync.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import * as yaml from "yaml";
77

88
import { BuiltInLanguage } from "../src/languages";
99

10+
import { PR_CHECKS_DIR, REPO_ROOT } from "./config";
11+
1012
/**
1113
* Returns a `uses` value for `action` pinned to a commit SHA, with the
1214
* human-readable version recorded in a trailing comment.
@@ -312,9 +314,8 @@ const languageSetups: LanguageSetups = {
312314
// See https://github.com/github/codeql-action/pull/3423
313315
const YQ_VERSION = "v4.50.1";
314316

315-
const THIS_DIR = __dirname;
316-
const CHECKS_DIR = path.join(THIS_DIR, "checks");
317-
const OUTPUT_DIR = path.join(THIS_DIR, "..", ".github", "workflows");
317+
const CHECKS_DIR = path.join(PR_CHECKS_DIR, "checks");
318+
const OUTPUT_DIR = path.join(REPO_ROOT, ".github", "workflows");
318319

319320
/**
320321
* Loads and parses a YAML file.

0 commit comments

Comments
 (0)