Skip to content

Commit 09f2139

Browse files
author
Fr4gm3nt3d_sh
committed
Update .github/workflows/llmcodereview.yml
1 parent acfe9a1 commit 09f2139

File tree

1 file changed

+93
-93
lines changed

1 file changed

+93
-93
lines changed

.github/workflows/llmcodereview.yml

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ jobs:
4242
4343
const prompt = `You are a code review expert. Analyze the following git diff and provide a detailed code review.
4444
45-
Focus on:
46-
- Potential bugs or logical errors in the NEW code
47-
- Performance issues and optimization opportunities
48-
- Security vulnerabilities
49-
- Code style and maintainability improvements
50-
- Edge cases that might not be handled
51-
- If the old code had a better approach to solving the same problem, mention it
52-
53-
Be constructive and specific. For each issue, explain:
54-
1. What the problem is
55-
2. Why it matters
56-
3. How to fix it with concrete code examples
57-
58-
Return the review in clean, well-formatted markdown with sections and code blocks.
59-
60-
Git Diff:
61-
\`\`\`diff
62-
${diff}
63-
\`\`\``;
45+
Focus on:
46+
- Potential bugs or logical errors in the NEW code
47+
- Performance issues and optimization opportunities
48+
- Security vulnerabilities
49+
- Code style and maintainability improvements
50+
- Edge cases that might not be handled
51+
- If the old code had a better approach to solving the same problem, mention it
52+
53+
Be constructive and specific. For each issue, explain:
54+
1. What the problem is
55+
2. Why it matters
56+
3. How to fix it with concrete code examples
57+
58+
Return the review in clean, well-formatted markdown with sections and code blocks.
59+
60+
Git Diff:
61+
\`\`\`diff
62+
${diff}
63+
\`\`\``;
6464
6565
const result = await model.generateContent(prompt);
6666
const report = result.response.text();
@@ -70,86 +70,86 @@ ${diff}
7070
const date = new Date();
7171
7272
const html = `<!DOCTYPE html>
73-
<html lang="en">
74-
<head>
75-
<meta charset="UTF-8">
76-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77-
<title>Gemini Code Review</title>
78-
<style>
79-
* { margin:0; padding:0; box-sizing:border-box; }
80-
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; line-height:1.6; color:#333; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); min-height:100vh; padding:2rem 1rem; }
81-
.container { max-width:900px; margin:0 auto; background:white; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.3); overflow:hidden; }
82-
.header { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:white; padding:3rem 2rem; text-align:center; }
83-
.header h1 { font-size:2.5rem; margin-bottom:0.5rem; font-weight:700; }
84-
.header p { font-size:1.1rem; opacity:0.95; }
85-
.timestamp { font-size:0.9rem; opacity:0.85; margin-top:1rem; }
86-
.content { padding:3rem 2rem; }
87-
.content h2 { color:#667eea; margin-top:2rem; margin-bottom:1rem; font-size:1.8rem; border-left:4px solid #667eea; padding-left:1rem; }
88-
.content h3 { color:#764ba2; margin-top:1.5rem; margin-bottom:0.8rem; font-size:1.3rem; }
89-
.content p { margin-bottom:1rem; }
90-
.content ul, .content ol { margin-left:2rem; margin-bottom:1rem; }
91-
.content code { background:#f5f5f5; padding:0.2rem 0.5rem; border-radius:4px; font-family:monospace; color:#e83e8c; }
92-
.content pre { background:#2d2d2d; color:#f8f8f2; padding:1.5rem; border-radius:8px; overflow-x:auto; margin:1rem 0; font-family:monospace; font-size:0.9rem; }
93-
.content pre code { background:none; padding:0; color:inherit; }
94-
.footer { background:#f9f9f9; padding:2rem; text-align:center; color:#666; border-top:1px solid #eee; }
95-
.footer a { color:#667eea; text-decoration:none; }
96-
@media(max-width:768px){.header h1{font-size:1.8rem;}}
97-
</style>
98-
</head>
99-
<body>
100-
<div class="container">
101-
<div class="header">
102-
<h1>🔍 Gemini Code Review</h1>
103-
<p>Automated code analysis and recommendations</p>
104-
<p class="timestamp">${date.toUTCString()}</p>
105-
</div>
106-
<div class="content">
107-
${report}
108-
</div>
109-
<div class="footer">
110-
<p>Generated by Gemini Code Analysis | <a href="index.html">← Back to Reports</a></p>
111-
</div>
112-
</div>
113-
</body>
114-
</html>`;
73+
<html lang="en">
74+
<head>
75+
<meta charset="UTF-8">
76+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77+
<title>Gemini Code Review</title>
78+
<style>
79+
* { margin:0; padding:0; box-sizing:border-box; }
80+
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; line-height:1.6; color:#333; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); min-height:100vh; padding:2rem 1rem; }
81+
.container { max-width:900px; margin:0 auto; background:white; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.3); overflow:hidden; }
82+
.header { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:white; padding:3rem 2rem; text-align:center; }
83+
.header h1 { font-size:2.5rem; margin-bottom:0.5rem; font-weight:700; }
84+
.header p { font-size:1.1rem; opacity:0.95; }
85+
.timestamp { font-size:0.9rem; opacity:0.85; margin-top:1rem; }
86+
.content { padding:3rem 2rem; }
87+
.content h2 { color:#667eea; margin-top:2rem; margin-bottom:1rem; font-size:1.8rem; border-left:4px solid #667eea; padding-left:1rem; }
88+
.content h3 { color:#764ba2; margin-top:1.5rem; margin-bottom:0.8rem; font-size:1.3rem; }
89+
.content p { margin-bottom:1rem; }
90+
.content ul, .content ol { margin-left:2rem; margin-bottom:1rem; }
91+
.content code { background:#f5f5f5; padding:0.2rem 0.5rem; border-radius:4px; font-family:monospace; color:#e83e8c; }
92+
.content pre { background:#2d2d2d; color:#f8f8f2; padding:1.5rem; border-radius:8px; overflow-x:auto; margin:1rem 0; font-family:monospace; font-size:0.9rem; }
93+
.content pre code { background:none; padding:0; color:inherit; }
94+
.footer { background:#f9f9f9; padding:2rem; text-align:center; color:#666; border-top:1px solid #eee; }
95+
.footer a { color:#667eea; text-decoration:none; }
96+
@media(max-width:768px){.header h1{font-size:1.8rem;}}
97+
</style>
98+
</head>
99+
<body>
100+
<div class="container">
101+
<div class="header">
102+
<h1>🔍 Gemini Code Review</h1>
103+
<p>Automated code analysis and recommendations</p>
104+
<p class="timestamp">${date.toUTCString()}</p>
105+
</div>
106+
<div class="content">
107+
${report}
108+
</div>
109+
<div class="footer">
110+
<p>Generated by Gemini Code Analysis | <a href="index.html">← Back to Reports</a></p>
111+
</div>
112+
</div>
113+
</body>
114+
</html>`;
115115
116116
fs.writeFileSync(reportName, html);
117117
118118
let index = "";
119119
if (fs.existsSync("report.html")) {
120-
index = fs.readFileSync("report.html","utf8");
120+
index = fs.readFileSync("report.html","utf8");
121121
} else {
122-
index = `<!DOCTYPE html>
123-
<html lang="en">
124-
<head>
125-
<meta charset="UTF-8">
126-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
127-
<title>Gemini Code Reports</title>
128-
<style>
129-
* {margin:0;padding:0;box-sizing:border-box;}
130-
body {font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);min-height:100vh;padding:2rem 1rem;}
131-
.container {max-width:900px;margin:0 auto;}
132-
.header {text-align:center;color:white;margin-bottom:3rem;}
133-
.header h1 {font-size:3rem;margin-bottom:0.5rem;font-weight:700;}
134-
.header p {font-size:1.2rem;opacity:0.95;}
135-
.reports-grid {display:grid;gap:1.5rem;margin-top:2rem;}
136-
.report-card {background:white;border-radius:12px;padding:1.5rem;box-shadow:0 10px 30px rgba(0,0,0,0.2);transition:transform 0.3s ease,box-shadow 0.3s ease;text-decoration:none;color:inherit;display:block;}
137-
.report-card:hover {transform:translateY(-5px);box-shadow:0 15px 40px rgba(0,0,0,0.3);}
138-
.report-card h2 {color:#667eea;margin-bottom:0.5rem;font-size:1.3rem;}
139-
.report-card .date {color:#999;font-size:0.9rem;}
140-
@media(max-width:768px){.header h1{font-size:2rem;}}
141-
</style>
142-
</head>
143-
<body>
144-
<div class="container">
145-
<div class="header">
146-
<h1>📊 Gemini Code Reviews</h1>
147-
<p>Continuous code analysis and insights</p>
148-
</div>
149-
<div class="reports-grid" id="reports"></div>
150-
</div>
151-
</body>
152-
</html>`;
122+
index = `<!DOCTYPE html>
123+
<html lang="en">
124+
<head>
125+
<meta charset="UTF-8">
126+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
127+
<title>Gemini Code Reports</title>
128+
<style>
129+
* {margin:0;padding:0;box-sizing:border-box;}
130+
body {font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);min-height:100vh;padding:2rem 1rem;}
131+
.container {max-width:900px;margin:0 auto;}
132+
.header {text-align:center;color:white;margin-bottom:3rem;}
133+
.header h1 {font-size:3rem;margin-bottom:0.5rem;font-weight:700;}
134+
.header p {font-size:1.2rem;opacity:0.95;}
135+
.reports-grid {display:grid;gap:1.5rem;margin-top:2rem;}
136+
.report-card {background:white;border-radius:12px;padding:1.5rem;box-shadow:0 10px 30px rgba(0,0,0,0.2);transition:transform 0.3s ease,box-shadow 0.3s ease;text-decoration:none;color:inherit;display:block;}
137+
.report-card:hover {transform:translateY(-5px);box-shadow:0 15px 40px rgba(0,0,0,0.3);}
138+
.report-card h2 {color:#667eea;margin-bottom:0.5rem;font-size:1.3rem;}
139+
.report-card .date {color:#999;font-size:0.9rem;}
140+
@media(max-width:768px){.header h1{font-size:2rem;}}
141+
</style>
142+
</head>
143+
<body>
144+
<div class="container">
145+
<div class="header">
146+
<h1>📊 Gemini Code Reviews</h1>
147+
<p>Continuous code analysis and insights</p>
148+
</div>
149+
<div class="reports-grid" id="reports"></div>
150+
</div>
151+
</body>
152+
</html>`;
153153
}
154154
155155
const button = `<a href="./${reportName}" class="report-card"><h2>📝 Code Review Report</h2><p class="date">${date.toUTCString()}</p></a>`;

0 commit comments

Comments
 (0)