-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llm-pr-writer 0.4.0 : switch to github-script for posting github comment for flexibility #680
Conversation
26a4bc3
to
3eb3dd7
Compare
cc: @chainchad |
@@ -160,10 +161,11 @@ runs: | |||
$(cat chatgpt_output.txt) | |||
</$WORKFLOW_ID>" | |||
|
|||
# post the error report to the PR | |||
# prepare the report message | |||
${{ github.action_path }}/update_pr_comment.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a nice one, didn't know about ${{ github.action_path }}
@@ -9,21 +9,22 @@ set -euo pipefail | |||
# - SKIP_ON_SUCCESS | |||
|
|||
# Fetch the comments on the pull request and filter for comments by github.actor | |||
author_comments=$(gh pr view "$PR_NUMBER" --json comments --jq '.comments | map(select(.author.login == "github-actions" and (.body | contains("## AER Report:"))))') | |||
author_comments=$(gh pr view "$PR_NUMBER" --json comments --jq '( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be renamed to last_author_comment
?
3eb3dd7
to
fe2f15b
Compare
Following the patch in 0.3.1, 0.4.0 switches over to github-action scripts to update specific comment_id instead of deciding to update the last message if it's made by the script, which has low spam reduction effect in bot-busy environments.
To test the effectiveness of the script, here are 4 test cases: