File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1+ import path from "path" ;
2+
13/** The oldest supported major version of the CodeQL Action. */
24export const OLDEST_SUPPORTED_MAJOR_VERSION = 3 ;
5+
6+ /** The `pr-checks` directory. */
7+ export const PR_CHECKS_DIR = __dirname ;
8+
9+ /** The path of the file configuring which checks shouldn't be required. */
10+ export const PR_CHECK_EXCLUDED_FILE = path . join ( PR_CHECKS_DIR , "excluded.yml" ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ import { type PaginateInterface } from "@octokit/plugin-paginate-rest";
1111import { type Api } from "@octokit/plugin-rest-endpoint-methods" ;
1212import * as yaml from "yaml" ;
1313
14- import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config" ;
14+ import {
15+ OLDEST_SUPPORTED_MAJOR_VERSION ,
16+ PR_CHECK_EXCLUDED_FILE ,
17+ } from "./config" ;
1518
1619/** Represents the command-line options. */
1720interface Options {
@@ -39,7 +42,9 @@ export interface Exclusions {
3942
4043/** Loads the configuration for which checks to exclude. */
4144function loadExclusions ( ) : Exclusions {
42- return yaml . parse ( fs . readFileSync ( "excluded.yml" , "utf-8" ) ) as Exclusions ;
45+ return yaml . parse (
46+ fs . readFileSync ( PR_CHECK_EXCLUDED_FILE , "utf-8" ) ,
47+ ) as Exclusions ;
4348}
4449
4550/** The type of the Octokit client. */
You can’t perform that action at this time.
0 commit comments