File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CodeRabbit Feedback Reminder
2+ on :
3+ pull_request_review_comment :
4+ types : [created]
5+ permissions :
6+ pull-requests : write
7+ jobs :
8+ add-reaction-encouragement :
9+ runs-on : ubuntu-latest
10+ if : github.event.comment.user.login == 'coderabbitai[bot]'
11+ steps :
12+ - uses : actions/github-script@v8
13+ with :
14+ github-token : ${{ secrets.GITHUB_TOKEN }}
15+ script : |
16+ const comment = context.payload.comment;
17+ const originalBody = comment.body;
18+ const feedbackMessage = "\n\n<sub>👋 Leave emoji reaction (👍/👎) to track effectiveness of CodeRabbit.</sub>";
19+
20+ // Only add the message if it's not already there
21+ if (!originalBody.includes(feedbackMessage)) {
22+ await github.rest.pulls.updateReviewComment({
23+ owner: context.repo.owner,
24+ repo: context.repo.repo,
25+ comment_id: comment.id,
26+ body: originalBody + feedbackMessage
27+ });
28+ }
You can’t perform that action at this time.
0 commit comments