mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 21:22:51 +00:00
fix(upstream): preserve selected refs in companion commands (#591)
* fix(upstream): preserve selected refs in companion commands * fix(upstream): quote companion command arguments * docs(changelog): record fix for #591
This commit is contained in:
1 parent
239dad775b
commit
5a29fdc711
4 files changed
+76
-5
No files matched your search
@@ -15,6 +15,7 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
@@ -189,7 +190,7 @@ def main() -> int:
|
||||
# answers "which upstream commits deserve review". Point at the companion.
|
||||
print(
|
||||
f"\nFor commit-level triage of upstream commits, run: "
|
||||
f"python3 tools/upstream_triage.py --remote {remote}"
|
||||
f"python3 tools/upstream_triage.py --remote {shlex.quote(remote)} --branch {shlex.quote(args.branch)}"
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ the upstream ref is unavailable, so a scheduled job degrades gracefully.
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -149,7 +150,7 @@ def main() -> int:
|
||||
behind = rev_list(f"HEAD..{ref}")
|
||||
if not behind:
|
||||
print(f"Up to date with `{ref}`. Nothing to review. :white_check_mark:")
|
||||
_print_crossref(ref)
|
||||
_print_crossref(args.remote, args.branch)
|
||||
return 0
|
||||
|
||||
fork_only = rev_list(f"{ref}..HEAD")
|
||||
@@ -235,15 +236,15 @@ def main() -> int:
|
||||
lines.append("_None._")
|
||||
|
||||
print("\n".join(lines))
|
||||
_print_crossref(ref)
|
||||
_print_crossref(args.remote, args.branch)
|
||||
return 0
|
||||
|
||||
|
||||
def _print_crossref(ref: str) -> None:
|
||||
def _print_crossref(remote: str, branch: str) -> None:
|
||||
print()
|
||||
print(
|
||||
"_For personalized-file version stamps (which methodology files changed), "
|
||||
f"run `python tools/check_upstream_updates.py --remote {ref.split('/')[0]}`._"
|
||||
f"run `python tools/check_upstream_updates.py --remote {shlex.quote(remote)} --branch {shlex.quote(branch)}`._"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user