Skip to content

Commit 992e343

Browse files
committed
Test and fix
1 parent b904481 commit 992e343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/update_pytorch_pin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def get_commit_hash_for_nightly(date_str):
5252
Commit hash string
5353
"""
5454
api_url = "https://api.github.com/repos/pytorch/pytorch/commits"
55-
params = f"?sha=nightly&per_page=100"
55+
params = f"?sha=nightly&per_page=50"
5656
url = api_url + params
5757

5858
req = urllib.request.Request(url)
@@ -73,7 +73,7 @@ def get_commit_hash_for_nightly(date_str):
7373
commit_msg = commit.get("commit", {}).get("message", "")
7474
# Check if the first line of commit message matches
7575
first_line = commit_msg.split("\n")[0].strip()
76-
if first_line == target_title or first_line.startswith(f"{date_str} nightly"):
76+
if first_line.startswith(f"{date_str} nightly"):
7777
return extract_hash_from_title(first_line)
7878

7979
raise ValueError(

0 commit comments

Comments
 (0)