File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,17 @@ const prNumber: number = +process.env.PR_NUMBER!;
88const changes : string [ ] = process . env . CHANGED_FILES ! . split ( ',' ) ;
99
1010/**
11- * Checks if the PR already has the 'triage:accepted:ready' or 'triage:accepted:ready-with-sig' label, meaning the triage checks should be skipped.
12- * Also checks if the PR title starts with '[chore]' which indicates a maintenance PR that should skip checks.
13- * @returns true if the PR has the 'triage:accepted:ready' or 'triage:accepted:ready-with-sig' label or title starts with '[chore]', false otherwise.
11+ * Checks if the PR already has the 'triage:accepted:ready' label, meaning the triage checks should be skipped.
12+ * @returns true if the PR has the 'triage:accepted:ready' assigned to it, false otherwise.
1413 */
1514async function shouldSkipCheck ( ) {
16- const result = await octokit . request ( "GET /repos/{owner}/{repo}/issues/{issue_number}" , {
15+ const result = await octokit . request ( "GET /repos/{owner}/{repo}/issues/{issue_number}/labels " , {
1716 owner : owner ,
1817 repo : repo ,
1918 issue_number : prNumber
2019 } ) ;
2120
22- const hasAcceptedLabel = result . data . labels ?. some ( l =>
23- l . name === "triage:accepted:ready" || l . name === "triage:accepted:ready-with-sig"
24- ) ?? false ;
25- const isChore = result . data . title . toLowerCase ( ) . startsWith ( '[chore]' ) ;
26-
27- return hasAcceptedLabel || isChore ;
21+ return result . data . some ( l => l . name === "triage:accepted:ready" ) ;
2822}
2923
3024function getCommentText ( changesWithoutOwners : string [ ] ) : string {
You can’t perform that action at this time.
0 commit comments