File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,18 @@ WORKDIR /app
4646
4747RUN git clone --branch main /source /app --local
4848RUN git remote set-url origin https://github.com/oleander/git-ai.git
49+ RUN git pull origin main
4950RUN cargo fetch
5051RUN cargo build
52+ RUN cargo clippy
53+
54+ ARG PR_NUMBER
55+ ARG GH_TOKEN
56+ ENV GH_TOKEN=$GH_TOKEN
57+ RUN gh pr checkout $PR_NUMBER
58+ RUN cargo fetch
59+ RUN cargo build
60+ RUN cargo clippy
5161
5262# Default command that can be overridden
5363SHELL ["/bin/bash" , "-lc" ]
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ integration-test:
2828 docker build -t git-ai-test .
2929 docker run --rm git-ai-test -e OPENAI_API_KEY=$OPENAI_API_KEY
3030
31- pr CMD :
32- docker build --target pr-tester -t git-ai-pr-tester .
31+ # just pr 74 "cargo fmt --all"
32+ # just pr 74 "cargo build"
33+ pr PR_NUMBER CMD :
34+ docker build --build-arg PR_NUMBER={{ PR_NUMBER}} --build-arg GH_TOKEN=$(gh auth token) --target pr-tester -t git-ai-pr-tester .
3335 docker run -i --rm -e GITHUB_TOKEN=$(gh auth token) git-ai-pr-tester bash -c " {{ CMD}} "
36+
37+ # Sync a specific PR with origin/main
38+ sync-pr PR_NUM :
39+ just pr {{ PR_NUM}} " git merge origin/main --no-edit && cargo fmt --check && cargo check && git push origin HEAD"
You can’t perform that action at this time.
0 commit comments