guards: skip a commit the sync hasn't fetched yet, quietly (race, not error)
The bridge reads PR/default heads from GitHub after the sync's fetch; a push in between isn't in the clone until the next cycle. Both guards logged a CalledProcessError for it (windy-pro main 40 s after the fetch). Now None = nothing posted this cycle; the next one scans it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,7 +145,7 @@ def scan_line(path: str, text: str) -> list[tuple[str, str]]:
|
||||
|
||||
def check(repo: str, sha: str, default_branch: str, is_default_head: bool):
|
||||
bare = cg.WORK / f"{repo}.git"
|
||||
if not bare.is_dir():
|
||||
if not bare.is_dir() or not cg.fetched(bare, sha): # pushed after the fetch: next cycle
|
||||
return None
|
||||
allow = cg.load_allow(ALLOW_FILE)
|
||||
rules = hashlib.sha256((PREFILTER + INCLUDE.pattern + EXACT_PY.pattern + EXACT_NPM.pattern).encode()).hexdigest()[:8]
|
||||
|
||||
Reference in New Issue
Block a user