mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
chore: 更改changelog生成时检查coauthor的逻辑 (#7589)
This commit is contained in:
@@ -254,13 +254,15 @@ def main(tag_name=None, latest=None):
|
||||
continue
|
||||
git_addition_command = rf'git log {commit_hash} --no-walk --pretty=format:"%b"'
|
||||
addition = call_command(git_addition_command)
|
||||
coauthors = []
|
||||
coauthors = set()
|
||||
for coauthor in re.findall(r"Co-authored-by: (.*) <(?:.*)>", addition):
|
||||
if coauthor in contributors:
|
||||
coauthors.append(contributors[coauthor])
|
||||
coauthors.add(contributors[coauthor])
|
||||
elif coauthor in contributors.values():
|
||||
coauthors.add(coauthor)
|
||||
else:
|
||||
print(f"Cannot get coauthor: {coauthor}.")
|
||||
raw_commits_info[commit_hash]["coauthors"] = coauthors
|
||||
raw_commits_info[commit_hash]["coauthors"] = list(coauthors)
|
||||
|
||||
git_skip_command = rf'git log {latest}..HEAD --pretty=format:"%H%n" --grep="\[skip changelog\]"'
|
||||
raw_gitlogs = call_command(git_skip_command)
|
||||
|
||||
Reference in New Issue
Block a user