File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,11 +238,13 @@ def set_docs_to_build(build_all):
238238 doc_pattern = re .compile (
239239 r"^(?:.github/workflows/|docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$"
240240 )
241+ github_workspace = os .environ .get ("GITHUB_WORKSPACE" ) or ""
242+ github_workspace = github_workspace and github_workspace + "/"
241243 for p in changed_files :
242244 if (
243245 p .endswith (".c" )
244246 and not subprocess .run (
245- f"git diff -U0 { os . environ . get ( ' BASE_SHA' ) } ...{ os . environ . get ( ' HEAD_SHA' ) } { p } | grep -o -m 1 '^[+-]\/\/|'" ,
247+ f"git diff -U0 $ BASE_SHA...$ HEAD_SHA { github_workspace + p } | grep -o -m 1 '^[+-]\/\/|'" ,
246248 capture_output = True ,
247249 shell = True ,
248250 ).stdout
You can’t perform that action at this time.
0 commit comments