Skip to content

Commit

Permalink
更新检查新提交的脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
wling-art committed Feb 15, 2024
1 parent 32b7cb1 commit ed63a1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/check_for_new_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def check_for_new_commits():
local_commit = ""
remote_commit = origin.refs.main.commit

if local_commit != remote_commit:
if local_commit != remote_commit.hexsha:
print("New commits found in the remote repository!")
print("Local commit:", local_commit)
print("Remote commit:", remote_commit)
with open("commit", "w", encoding="utf-8") as f:
f.write(remote_commit)
with open("commit.txt", "w", encoding="utf-8") as f:
f.write(remote_commit.hexsha)
with open("new_commits.txt", "w") as f:
f.write("true")
else:
Expand Down

0 comments on commit ed63a1a

Please sign in to comment.