Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
1 line
7.7 KiB
JSON
1 line
7.7 KiB
JSON
{"repo": "adamskijakub/exercio", "files": {".github/workflows/deepseek-review.yml": {"297a0d5da7f31233952656fe044954a85784fc2c": {"t": 1786068431.0697901, "n": 7264, "h": "261e8b3bf2a27ceb", "c": "name: DeepSeek Code Review\n\npermissions:\n contents: read\n pull-requests: write\n\non:\n pull_request:\n types: [opened, synchronize, reopened]\n workflow_dispatch:\n\nenv:\n SYSTEM_PROMPT: |\n You are a senior code reviewer. Review ONLY the git diff provided.\n Focus ONLY on real bugs: Logic errors, Security issues, Crash risks, Data leaks, Broken functionality.\n DO NOT report: Unused imports, any usage, Hardcoded strings, Hardcoded locale, Missing error handling for fetch calls, Code style, Missing use client directive, Type safety nitpicks, Code duplication, Performance micro-optimizations.\n Format: **file/path.ts:line** - description. Be concise.\n If everything looks good, just say \"No issues found.\"\n\njobs:\n code-review:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Get git diff\n id: diff\n run: |\n DIFF=$(git diff --unified=3 \"origin/${{ github.base_ref }}...HEAD\" -- . \\\n ':!*.lock' ':!*.toml' \\\n ':!*.svg' ':!*.png' ':!*.jpg' ':!*.jpeg' \\\n ':!**/node_modules/**' 2>/dev/null || true)\n\n echo \"$DIFF\" > /tmp/git_diff.txt\n\n FILES=$(git diff --name-only \"origin/${{ github.base_ref }}...HEAD\" -- . \\\n ':!*.lock' ':!*.toml' \\\n ':!*.svg' ':!*.png' ':!*.jpg' ':!*.jpeg' \\\n ':!**/node_modules/**' 2>/dev/null || true)\n\n echo \"FILES<<EOF\" >> $GITHUB_OUTPUT\n echo \"$FILES\" >> $GITHUB_OUTPUT\n echo \"EOF\" >> $GITHUB_OUTPUT\n\n - name: Call DeepSeek API (chunked)\n id: review\n env:\n DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}\n run: |\n FILES=\"${{ steps.diff.outputs.FILES }}\"\n FILE_COUNT=$(echo \"$FILES\" | grep -c '[^[:space:]]' || true)\n\n if [ \"$FILE_COUNT\" -eq 0 ]; then\n echo \"No code changes to review.\" > /tmp/review_comment.txt\n exit 0\n fi\n\n DIFF_CONTENT=$(cat /tmp/git_diff.txt)\n DIFF_SIZE=${#DIFF_CONTENT}\n\n # Build system prompt file to avoid jq quoting issues\n cat > /tmp/system_prompt.txt << 'PROMPT_EOF'\n You are a senior code reviewer. Review ONLY the git diff provided.\n Focus ONLY on real bugs: Logic errors, Security issues, Crash risks, Data leaks, Broken functionality.\n DO NOT report: Unused imports, any usage, Hardcoded strings, Hardcoded locale, Missing error handling for fetch calls, Code style, Missing use client directive, Type safety nitpicks, Code duplication, Performance micro-optimizations.\n Format: **file/path.ts:line** - description. Be concise.\n If everything looks good, just say \"No issues found.\"\n PROMPT_EOF\n\n SYSTEM_PROMPT=$(cat /tmp/system_prompt.txt)\n\n # If diff is small enough, do a single review\n if [ \"$DIFF_SIZE\" -lt 30000 ]; then\n echo \"Single review (diff size: $DIFF_SIZE bytes)\"\n\n jq -n \\\n --arg system \"$SYSTEM_PROMPT\" \\\n --arg files \"$FILES\" \\\n --arg diff \"$DIFF_CONTENT\" \\\n '{\n model: \"deepseek-chat\",\n max_tokens: 4096,\n temperature: 0.1,\n messages: [\n {\n role: \"system\",\n content: $system\n },\n {\n role: \"user\",\n content: (\"Files changed:\\n\" + $files + \"\\n\\nGit diff:\\n```diff\\n\" + $diff + \"\\n```\")\n }\n ]\n }' > /tmp/payload.json\n else\n echo \"Chunked review (diff size: $DIFF_SIZE bytes)\"\n\n CHUNK_FILE=$(mktemp)\n echo \"$FILES\" > \"$CHUNK_FILE\"\n\n REVIEWS=\"\"\n CHUNK_NUM=1\n while true; do\n CHUNK_FILES=$(sed -n '1,10p' \"$CHUNK_FILE\")\n sed -i '1,10d' \"$CHUNK_FILE\"\n\n if [ -z \"$CHUNK_FILES\" ]; then\n break\n fi\n\n CHUNK_DIFF=$(echo \"$CHUNK_FILES\" | while IFS= read -r file; do\n git diff --unified=3 \"origin/${{ github.base_ref }}...HEAD\" -- \"$file\" 2>/dev/null\n done)\n\n if [ -z \"$CHUNK_DIFF\" ]; then\n continue\n fi\n\n echo \"Reviewing chunk $CHUNK_NUM...\"\n\n jq -n \\\n --arg system \"$SYSTEM_PROMPT\" \\\n --arg files \"$CHUNK_FILES\" \\\n --arg diff \"$CHUNK_DIFF\" \\\n '{\n model: \"deepseek-chat\",\n max_tokens: 2048,\n temperature: 0.1,\n messages: [\n {\n role: \"system\",\n content: $system\n },\n {\n role: \"user\",\n content: (\"Files changed:\\n\" + $files + \"\\n\\nGit diff:\\n```diff\\n\" + $diff + \"\\n```\")\n }\n ]\n }' > /tmp/payload_chunk.json\n\n RESPONSE=$(curl -s https://api.deepseek.com/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DEEPSEEK_API_KEY\" \\\n -d @/tmp/payload_chunk.json)\n\n CHUNK_REVIEW=$(echo \"$RESPONSE\" | jq -r '.choices[0].message.content // \"\"')\n\n if [ -n \"$CHUNK_REVIEW\" ] && [ \"$CHUNK_REVIEW\" != \"No issues found.\" ]; then\n REVIEWS=\"${REVIEWS}\\n\\n### Chunk ${CHUNK_NUM}\\n${CHUNK_REVIEW}\"\n fi\n\n CHUNK_NUM=$((CHUNK_NUM + 1))\n done\n\n # Deduplicate: remove repeated identical lines (e.g. same \"Unused import\" reported N times)\n if [ -n \"$REVIEWS\" ]; then\n echo \"$REVIEWS\" > /tmp/reviews_raw.txt\n awk '!seen[$0]++' /tmp/reviews_raw.txt > /tmp/reviews_deduped.txt\n REVIEWS=$(cat /tmp/reviews_deduped.txt)\n fi\n\n rm -f \"$CHUNK_FILE\"\n\n if [ -z \"$REVIEWS\" ]; then\n REVIEWS=\"No issues found.\"\n fi\n\n echo \"$REVIEWS\" > /tmp/review_comment.txt\n rm -f /tmp/payload.json /tmp/payload_chunk.json\n exit 0\n fi\n\n echo 'Calling DeepSeek API...'\n RESPONSE=$(curl -s https://api.deepseek.com/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DEEPSEEK_API_KEY\" \\\n -d @/tmp/payload.json)\n\n COMMENT=$(echo \"$RESPONSE\" | jq -r '.choices[0].message.content // \"API error\"')\n\n ERROR=$(echo \"$RESPONSE\" | jq -r '.error.message // \"\"')\n if [ -n \"$ERROR\" ]; then\n COMMENT=\"API Error: $ERROR\"\n fi\n\n echo \"$COMMENT\" > /tmp/review_comment.txt\n rm -f /tmp/payload.json\n\n - name: Post comment on PR\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n COMMENT=$(cat /tmp/review_comment.txt)\n\n if [ -n \"$COMMENT\" ]; then\n gh pr comment ${{ github.event.pull_request.number }} --body \"## 🤖 DeepSeek Code Review\n\n $COMMENT\n\n ---\n *Powered by DeepSeek AI*\"\n fi\n"}}}} |