👷 Add electron version info to release_body

This commit is contained in:
绛亽 2024-05-10 16:18:47 +08:00 committed by GitHub
parent 78cf75b34e
commit 49c25a28e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 20 deletions

View file

@ -44,7 +44,7 @@ def get_issue_first_label(issue, docmap):
return label.name
return ""
def generate_header_from_repo(repo_name, tag_name, lastestRelease, action_file, HEADER=''):
def generate_header_from_repo(repo_name, tag_name, lastestRelease, electron_version, action_file, HEADER=''):
thisRelease = tag_name.split("/")[-1]
pat = re.search("v([0-9.]+)", thisRelease)
if not pat:
@ -55,6 +55,7 @@ def generate_header_from_repo(repo_name, tag_name, lastestRelease, action_file,
<a href="https://github.com/{repo_name}/actions/workflows/{action_file}"><img src="https://img.shields.io/github/actions/workflow/status/{repo_name}/{action_file}?logo=github&label={action_file}%20Action" style="cursor:pointer;height: 30px;margin: 3px auto;"/></a>
<a href="https://github.com/{repo_name}/releases/{thisRelease}/"><img src="https://img.shields.io/github/downloads/{repo_name}/{thisRelease}/total?logo=github" style="cursor:pointer;height: 30px;margin: 3px auto;"/></a>
<img alt="GitHub commits difference between two branches/tags/commits" src="https://img.shields.io/github/commits-difference/{repo_name}?base={lastestRelease}&head={thisRelease}&logo=git" style="cursor:pointer;height: 30px;margin: 3px auto;"/>
<img src="https://img.shields.io/badge/Electron {electron_version}-47848F.svg?style=flat&logo=Electron&logoColor=white" alt="Electron">
</p>
{HEADER}'''