Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6ac9524f7 | |||
| 0e96bf5af3 |
@@ -1055,22 +1055,7 @@ jobs:
|
||||
}
|
||||
$modificationAuthor = $modificationAuthor | Sort-Object Key -Unique
|
||||
} else {
|
||||
$isNonResourceFile = (
|
||||
$file -like "*/reports/*" -or
|
||||
$file -like "*/Assignment Report/*" -or
|
||||
$file -like "*/Managed Google Play/*" -or
|
||||
$file -like "*Device Management Settings/settings.json" -or
|
||||
$file -like "*/Apple Push Notification/*" -or
|
||||
$file -like "*Device Configurations/mobileconfig/*" -or
|
||||
$file -like "*.md" -or
|
||||
$file -like "*.gitkeep"
|
||||
)
|
||||
|
||||
if ($isNonResourceFile) {
|
||||
$nonResourceFileCount++
|
||||
} else {
|
||||
throw "Unable to find resourceId in '$file' file name. Pipeline code modification needed."
|
||||
}
|
||||
$modificationAuthor = $null
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,14 @@ def main() -> int:
|
||||
pr = prs[0]
|
||||
pr_id = int(pr.get("pullRequestId"))
|
||||
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch])
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
|
||||
try:
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
|
||||
except RuntimeError as exc:
|
||||
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
|
||||
print(f"Drift branch '{drift_branch}' not found on origin; nothing to reject.")
|
||||
return 0
|
||||
raise
|
||||
diff_paths = _run_diff_name_only(args.repo_root, baseline_branch, drift_branch)
|
||||
changed_paths = {
|
||||
p.strip()
|
||||
|
||||
@@ -512,7 +512,14 @@ def main() -> int:
|
||||
print("##vso[task.setvariable variable=DRIFT_PR_SUPPRESSED;isOutput=true]0")
|
||||
return 0
|
||||
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch])
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
|
||||
try:
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
|
||||
except RuntimeError as exc:
|
||||
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
|
||||
pass # Drift branch may not exist yet; fallback to HEAD below.
|
||||
else:
|
||||
raise
|
||||
baseline_commitish = f"origin/{baseline_branch}" if _ref_has_commit(args.repo_root, f"origin/{baseline_branch}") else baseline_branch
|
||||
drift_commitish = f"origin/{drift_branch}" if _ref_has_commit(args.repo_root, f"origin/{drift_branch}") else "HEAD"
|
||||
if not _workload_config_diff_exists(
|
||||
|
||||
@@ -2498,7 +2498,14 @@ def main() -> int:
|
||||
return 0
|
||||
_debug(f"Active rolling PR detected: pr_id={pr_id}, source={source_ref}, target={target_ref}")
|
||||
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch])
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
|
||||
try:
|
||||
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
|
||||
except RuntimeError as exc:
|
||||
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
|
||||
print(f"Drift branch '{drift_branch}' not found on origin; skipping summary update.")
|
||||
return 0
|
||||
raise
|
||||
diff_output = _run_diff_name_status(args.repo_root, baseline_branch, drift_branch)
|
||||
changes = _parse_changes(diff_output, args.backup_folder, args.reports_subdir)
|
||||
_debug(f"Parsed non-doc/report changes for summary: count={len(changes)}")
|
||||
|
||||
Reference in New Issue
Block a user