Skip to content

Commit 68123dd

Browse files
Merge pull request #4 from EuclidStellar/keployAI
feat: KeployAI Code review action
2 parents 06cd88f + e6292ec commit 68123dd

28 files changed

+1621
-490
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/.DS_Store

6 KB
Binary file not shown.

.github/workflows/.DS_Store

6 KB
Binary file not shown.

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 256 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test Code Review Action
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
workflow_dispatch: # Allows manual triggering
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
test-action:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # Required for git diff operations
20+
21+
- name: Test Local Action
22+
uses: ./ # Now this will work
23+
with:
24+
github-token: ${{ secrets.GH_SECRET }}
25+
model: 'gpt-4o-mini' # Fix: Use available model
26+
max-tokens: 6700
27+
temperature: 0.1
28+
ignore-patterns: '*.md,node_modules/**'

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# filepath: .gitignore
2+
# Binaries
3+
main
4+
code-review-agent
5+
6+
# Log files
7+
*.log
8+
ollama_serve.log
9+
10+
# IDE settings
11+
.vscode/

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# FROM golang:1.24-alpine AS builder
2+
3+
# WORKDIR /app
4+
# COPY go.mod go.sum ./
5+
# RUN go mod download
6+
# COPY . .
7+
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
8+
9+
# FROM alpine:latest
10+
# # FIX: Add curl, which is required to download the Ollama install script
11+
# RUN apk --no-cache add ca-certificates git bash curl
12+
13+
# # Configure git to trust the workspace directory
14+
# RUN git config --global --add safe.directory /github/workspace
15+
# RUN git config --global --add safe.directory '*'
16+
17+
# # Put binary in /app instead of /github/workspace
18+
# WORKDIR /app
19+
# COPY --from=builder /app/main .
20+
# RUN chmod +x main
21+
22+
# # GitHub Actions will mount /github/workspace, but we're using /app
23+
# ENTRYPOINT ["/app/main"]
24+
25+
26+
27+
# --- Use a standard Go image based on Debian/glibc for the builder ---
28+
FROM golang:1.24-bookworm AS builder
29+
30+
WORKDIR /app
31+
COPY go.mod go.sum ./
32+
RUN go mod download
33+
COPY . .
34+
# Build a standard Linux binary
35+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
36+
37+
# --- Use Ubuntu as the final stage for maximum compatibility ---
38+
FROM ubuntu:22.04
39+
40+
# Install necessary packages. Ubuntu uses 'apt-get'.
41+
# 'curl' and 'bash' are usually pre-installed, but we ensure they are present.
42+
RUN apt-get update && apt-get install -y --no-install-recommends \
43+
ca-certificates \
44+
git \
45+
curl \
46+
bash \
47+
&& rm -rf /var/lib/apt/lists/*
48+
49+
# Configure git to trust the workspace directory
50+
RUN git config --global --add safe.directory /github/workspace
51+
RUN git config --global --add safe.directory '*'
52+
53+
# Put binary in /app
54+
WORKDIR /app
55+
COPY --from=builder /app/main .
56+
RUN chmod +x main
57+
58+
ENTRYPOINT ["/app/main"]

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
MIT License
3+
4+
Copyright (c) 2025 EuclidStellar
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

0 commit comments

Comments
 (0)