File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 22
33/** Update the required checks based on the current branch. */
44
5+ import * as fs from "fs" ;
56import { parseArgs } from "node:util" ;
67
78import * as githubUtils from "@actions/github/lib/utils" ;
89import { type Octokit } from "@octokit/core" ;
910import { type PaginateInterface } from "@octokit/plugin-paginate-rest" ;
1011import { type Api } from "@octokit/plugin-rest-endpoint-methods" ;
12+ import * as yaml from "yaml" ;
1113
1214import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config" ;
1315
16+ /** Represents a configuration of which checks should not be set up as required checks. */
17+ interface Exclusions {
18+ /** A list of strings that, if contained in a check name, are excluded. */
19+ contains : string [ ] ;
20+ /** A list of check names that are excluded if their name is an exact match. */
21+ is : string [ ] ;
22+ }
23+
24+ /** Loads the configuration for which checks to exclude. */
25+ function loadExclusions ( ) : Exclusions {
26+ return yaml . parse ( fs . readFileSync ( "excluded.yml" , "utf-8" ) ) as Exclusions ;
27+ }
28+
1429/** The type of the Octokit client. */
1530type ApiClient = Octokit & Api & { paginate : PaginateInterface } ;
1631
You can’t perform that action at this time.
0 commit comments