Skip to content

Commit eb879ac

Browse files
[CI] Make premerge upload/write comments (#166609)
This only does this for Linux currently as the issue-write workflow currently does not support writing out multiple comments. This gets the ball rolling as the failures that most people see are common to both platforms. Ensuring we have coverage on Windows for comments will be done in a future patch.
1 parent a9a4515 commit eb879ac

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.ci/premerge_advisor_explain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def get_comment(
3939
) -> dict[str, str]:
4040
repo = github.Github(github_token).get_repo("llvm/llvm-project")
4141
pr = repo.get_issue(pr_number).as_pull_request()
42+
body = COMMENT_TAG.format(platform=platform.system()) + "\n" + body
4243
comment = {"body": body}
4344
comment_id = get_comment_id(platform.system(), pr)
4445
if comment_id:
@@ -128,7 +129,7 @@ def main(
128129
),
129130
)
130131
]
131-
with open("comment", "w") as comment_file_handle:
132+
with open("comments", "w") as comment_file_handle:
132133
json.dump(comments, comment_file_handle)
133134
else:
134135
print(advisor_response.reason)

.github/workflows/premerge.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ jobs:
119119
path: artifacts/
120120
retention-days: 5
121121
include-hidden-files: 'true'
122+
- name: Upload Comment
123+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
124+
if: ${{ always() && !startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') }}
125+
continue-on-error: true
126+
with:
127+
name: workflow-args
128+
path: |
129+
comments
122130
123131
premerge-checks-windows:
124132
name: Build and Test Windows

0 commit comments

Comments
 (0)