Skip to content

Commit 14b2bb4

Browse files
committed
Match the exact string
Fixes: Checking branch 3.13 From https://github.com/python/cpython * [new branch] 3.13 -> 3.13 1 1 10000 python/cpython#136930 gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) Backport to 3.13 missing 2 1 10000 python/cpython#136890 Fix typos in Doc/extending/extending.rst and Doc/library/shelve.rst (GH-136890) Backport to 3.13 missing 3 1 10000 python/cpython#136709 gh-136710: Fix bad indentation in `os.chdir` docstring (GH-136709) Backport to 3.13 missing 4 1 10000 python/cpython#136519 Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (#136519) fatal: command line, 'Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (#136519)': Invalid preceding regular expression Traceback (most recent call last): File "/home/runner/work/dashboard/dashboard/github-tools/needs_backport.py", line 214, in <module> main() ~~~~^^ File "/home/runner/work/dashboard/dashboard/github-tools/needs_backport.py", line 170, in main candidates = check_prs( api, args.repo_path, branch, args.start, args.number, args.sort ) File "/home/runner/work/dashboard/dashboard/github-tools/needs_backport.py", line 109, in check_prs if is_commit_title_in_branch(repo_path, title, branch_to_check): ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/dashboard/dashboard/github-tools/needs_backport.py", line 60, in is_commit_title_in_branch output = subprocess.check_output( ~~~~~~~~~~~~~~~~~~~~~~~^ ["git", "log", "--grep", title, branch], cwd=repo_path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ).decode("utf-8") ^ File "/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/subprocess.py", line 472, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **kwargs).stdout ^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['git', 'log', '--grep', 'Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (#136519)', '3.13']' returned non-zero exit status 128.
1 parent 5887eb5 commit 14b2bb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

needs_backport.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ def get_title_of_commit(repo_path: str, commit_sha: str) -> str:
5656

5757
@cache
5858
def is_commit_title_in_branch(repo_path: str, title: str, branch: str) -> bool:
59-
# TODO make sure title is escaped for grep
6059
output = subprocess.check_output(
61-
["git", "log", "--grep", title, branch], cwd=repo_path
60+
["git", "log", "--grep", title, "--fixed-strings", branch], cwd=repo_path
6261
).decode("utf-8")
6362
return output != ""
6463

0 commit comments

Comments
 (0)