[llvm] [workflows] Add a job for requesting a release note on release branch PRs (PR #91826)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 16:38:12 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 30aa49cbc2ece32bebcb06cc9e64f1daeb1dbbcb...bf1703f3d4d3b111fa1c999a87060cfc991a4eb9 llvm/utils/git/github-automation.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- github-automation.py 2024-05-10 23:32:07.000000 +0000
+++ github-automation.py 2024-05-10 23:37:49.053661 +0000
@@ -635,24 +635,24 @@
print("Do not understand input:")
print(sys.stdin.readlines())
return False
-def request_release_note(token:str, repo_name:str, pr_number:int):
+def request_release_note(token: str, repo_name: str, pr_number: int):
repo = github.Github(token).get_repo(repo_name)
pr = repo.get_issue(pr_number).as_pull_request()
submitter = pr.user.login
- if submitter == 'llvmbot':
+ if submitter == "llvmbot":
m = re.search("Requested by: @(.+)$", pr.body)
if not m:
submitter = None
print("Warning could not determine user who requested backport.")
submitter = m.group(1)
- mention = ''
+ mention = ""
if submitter:
- mention = f'@{submitter}'
+ mention = f"@{submitter}"
comment = f"{mention} (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. "
pr.as_issue().create_comment(comment)
``````````
</details>
https://github.com/llvm/llvm-project/pull/91826
More information about the llvm-commits
mailing list