File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,10 +117,12 @@ jobs:
117117 import os
118118 import pathlib
119119 import subprocess
120+ import re
120121
121122 pr_number = os.environ["PR_NUMBER"]
122123 codex_output_path = pathlib.Path(os.environ["CODEX_OUTPUT_PATH"])
123124 changed_files_path = pathlib.Path(".tmp/pr-labels/changed-files.txt")
125+ changes_diff_path = pathlib.Path(".tmp/pr-labels/changes.diff")
124126
125127 changed_files = []
126128 if changed_files_path.exists():
@@ -137,6 +139,20 @@ jobs:
137139 desired.add("documentation")
138140 if "uv.lock" in changed_files:
139141 desired.add("dependencies")
142+ if changes_diff_path.exists():
143+ diff_text = changes_diff_path.read_text()
144+ current_file = None
145+ for line in diff_text.splitlines():
146+ if line.startswith("+++ b/"):
147+ current_file = line[len("+++ b/") :].strip()
148+ continue
149+ if not current_file or not current_file.startswith(".github/workflows/"):
150+ continue
151+ if not line.startswith(("+", "-")):
152+ continue
153+ if re.search(r"uses:\s*(?!\./)(?!\.\/)[^@\s]+/[^@\s]+@", line):
154+ desired.add("dependencies")
155+ break
140156
141157 allowed = {
142158 "documentation",
You can’t perform that action at this time.
0 commit comments