Skip to content

Commit b2eacb0

Browse files
test comment
1 parent 5fbf32a commit b2eacb0

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

.github/workflows/comment.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Auto Comment on PR
2+
3+
on:
4+
# pull_request:
5+
# types: [*] # Triggers on all pull request events
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
comment:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: trigger pr
14+
uses: peter-evans/create-or-update-comment@v4
15+
with:
16+
issue-number: ${{ github.event.pull_request.number }}
17+
body: |
18+
@coderabbitai full review
19+
- name: trigger pr
20+
uses: peter-evans/create-or-update-comment@v4
21+
with:
22+
issue-number: ${{ github.event.pull_request.number }}
23+
body: |
24+
@coderabbitai sing me a song
25+
- name: Wait 5 min
26+
run: sleep 300
27+
- name: Create comment
28+
uses: peter-evans/create-or-update-comment@v4
29+
with:
30+
issue-number: ${{ github.event.pull_request.number }}
31+
body: |
32+
@coderabbitai
33+
Use the <overall_instructions> to guide the content of the summary. Use the format shown in <example> but do not include or refer to the example's content in the final summary/report.
34+
<overall_instructions>
35+
**Instructions:**
36+
Generate a weekly code review report for the author of this pull request only following scoring parameters. Calculate the scores and compile the results into a table so that the team-wise average score can be easily determined.
37+
**Scoring Parameters:**
38+
39+
1. **Basic Code Standards (Score out of 2)**
40+
- Avoidance of hard-coded values
41+
- No repetition of code (DRY principle)
42+
43+
2. **Code Readability (Score out of 3)**
44+
- Presence of meaningful comments
45+
- Consistent naming conventions:
46+
- JavaScript: CamelCase
47+
- CSS: kebab-case
48+
- Liquid: snake_case
49+
- Proper variable declaration using `const` and `let`
50+
51+
3. **Error Handling (Score out of 4)**
52+
- Handling failure scenarios (e.g., try-catch, fallbacks)
53+
- Proper loading state implementation (e.g., button click loading states)
54+
- Handling edge cases (e.g., checking for undefined or missing values)
55+
- Input validation (ensuring correct user inputs)
56+
57+
4. **Shopify Theme Check Validation (Score: 0 or 1)**
58+
- `0` → Not Passed
59+
- `1` → Passed
60+
61+
5. **Responsive Design (Score: 0 or 1)**
62+
- `0` → Not Responsive
63+
- `1` → Responsive
64+
**Final Score Calculation:**
65+
Combine the scores from the parameters above to derive the final code quality score (out of 5).
66+
**Output Format:**
67+
Provide the final report in a table format with the following columns (use shorthand notations), be sure to include this list at the top above the chart in the "Column Notation" section so users understand what the columns mean:
68+
- **User Name (User)**
69+
- **Basic Code Standards (BCS) (out of 2)**
70+
- **Code Readability (CR) (out of 3)**
71+
- **Error Handling (EH) (out of 4)**
72+
- **Shopify Theme Check (STC) (0/1)**
73+
- **Responsive Design (RD) (0/1)**
74+
- **Final Code Quality Score (FCQS) (out of 11)**
75+
</overall_instructions>
76+
<example>
77+
## Column Notation
78+
- **User Name (User)**
79+
- **Basic Code Standards (BCS) (out of 2)**
80+
- **Code Readability (CR) (out of 3)**
81+
- **Error Handling (EH) (out of 4)**
82+
- **Shopify Theme Check (STC) (0/1)**
83+
- **Responsive Design (RD) (0/1)**
84+
- **Final Code Quality Score (FCQS) (out of 11)**
85+
## Score Chart
86+
| User | BCS (2) | CR (3) | EH (4) | STC (0/1) | RD (0/1) | FCQS (11) |
87+
|----------|---------|--------|--------|-----------|----------|-----------|
88+
| John Doe | 2 | 3 | 4 | 1 | 1 | 11 |
89+
</example>

0 commit comments

Comments
 (0)