@@ -4,6 +4,11 @@ import { parse } from "yaml";
44
55const WORKFLOW = ".github/workflows/dependency-guard.yml" ;
66const CODEOWNERS = ".github/CODEOWNERS" ;
7+ const BACKFILL_EXCLUDED_WORKFLOWS = [
8+ [ ".github/workflows/auto-response.yml" , "auto-response" ] ,
9+ [ ".github/workflows/clawsweeper-dispatch.yml" , "dispatch" ] ,
10+ [ ".github/workflows/real-behavior-proof.yml" , "real-behavior-proof" ] ,
11+ ] ;
712
813type WorkflowStep = {
914 name ?: string ;
@@ -33,6 +38,10 @@ function readWorkflow(): Workflow {
3338 return parse ( readFileSync ( WORKFLOW , "utf8" ) ) as Workflow ;
3439}
3540
41+ function readWorkflowFile ( path : string ) : Workflow {
42+ return parse ( readFileSync ( path , "utf8" ) ) as Workflow ;
43+ }
44+
3645describe ( "dependency guard workflow" , ( ) => {
3746 it ( "uses the dependency guard check name" , ( ) => {
3847 const parsed = readWorkflow ( ) ;
@@ -57,6 +66,16 @@ describe("dependency guard workflow", () => {
5766 expect ( job ?. if ) . toContain ( "github.event.label.name == 'dependency-guard-backfill'" ) ;
5867 } ) ;
5968
69+ it ( "keeps the temporary backfill label from waking unrelated PR automation" , ( ) => {
70+ for ( const [ workflowFile , jobName ] of BACKFILL_EXCLUDED_WORKFLOWS ) {
71+ const job = readWorkflowFile ( workflowFile ) . jobs ?. [ jobName ] ;
72+
73+ expect ( job ?. if ) . toContain ( "github.event.action == 'labeled'" ) ;
74+ expect ( job ?. if ) . toContain ( "github.event.action == 'unlabeled'" ) ;
75+ expect ( job ?. if ) . toContain ( "github.event.label.name == 'dependency-guard-backfill'" ) ;
76+ }
77+ } ) ;
78+
6079 it ( "uses a metadata-only pull_request_target workflow with minimal write permissions" , ( ) => {
6180 const workflow = readFileSync ( WORKFLOW , "utf8" ) ;
6281 const parsed = readWorkflow ( ) ;
0 commit comments