22 Commits

Author SHA1 Message Date
pacnpal
d1c6a98994 Update action.js 2025-02-10 17:08:21 -05:00
github-actions[bot]
e6777037d5 Add built files 2025-02-10 21:57:17 +00:00
pacnpal
c6c00d8c95 Update release.yml 2025-02-10 16:56:24 -05:00
pacnpal
45e3331bcb Update release.yml 2025-02-10 16:50:17 -05:00
pacnpal
dd1b18e57a Update release.yml 2025-02-10 16:47:22 -05:00
pacnpal
1b84aff159 Update action.js 2025-02-10 16:18:34 -05:00
pacnpal
5fb151d172 Update release.yml 2025-02-10 16:09:39 -05:00
pacnpal
4e1bd4b9e5 Merge pull request #5 from pacnpal/pacnpal-patch-1
Update README.md
2025-02-10 16:06:21 -05:00
pacnpal
7276f1e2c5 Update README.md 2025-02-10 16:06:09 -05:00
pacnpal
2c57b7a5ba Update release.yml 2025-02-10 16:05:18 -05:00
pacnpal
096a52cda5 Merge pull request #4 from pacnpal/pacnpal-patch-1
Update README.md
2025-02-10 15:11:02 -05:00
pacnpal
0356960aa8 Update README.md 2025-02-10 15:10:43 -05:00
pacnpal
a5bd0e4bcf Update README.md 2025-02-10 15:02:22 -05:00
pacnpal
e49cf9d908 Merge pull request #3 from pacnpal/pacnpal-patch-1
Update README.md
2025-02-10 14:57:39 -05:00
pacnpal
a4b8566177 Update README.md 2025-02-10 14:55:38 -05:00
pacnpal
fc5d87701c Update action.js 2025-02-10 14:52:55 -05:00
pacnpal
eb556a6d23 Update README.md 2025-02-10 13:35:39 -05:00
pacnpal
7e5914e90c Update README.md 2025-02-10 13:28:43 -05:00
pacnpal
6c6cbaba84 Update README.md 2025-02-10 13:28:03 -05:00
pacnpal
9f9953664f Merge pull request #2 from pacnpal/dependabot/npm_and_yarn/npm_and_yarn-2c579f9325 2025-01-21 21:57:04 -05:00
dependabot[bot]
ada4f6b4ed Bump undici in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici).


Updates `undici` from 5.28.4 to 5.28.5
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.28.5)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 00:48:58 +00:00
pacnpal
a5a4083f00 Update README.md 2024-12-24 11:15:26 -05:00
5 changed files with 43 additions and 31 deletions

View File

@@ -25,6 +25,14 @@ jobs:
- name: Build
run: npm run build
- name: Commit built files
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -f dist
git commit -m 'Add built files'
git push origin HEAD:main
- name: Create Release
uses: softprops/action-gh-release@v1
with:

View File

@@ -1,6 +1,6 @@
# Claude Code Review Action
A GitHub Action that performs automated code reviews using Claude AI.
A GitHub Action that performs automated code reviews using Claude Sonnet 3.5, an AI assistant from Anthropic.
## Features
- Analyzes code changes in pull requests
@@ -35,14 +35,14 @@ on:
jobs:
code-review:
runs-on: ubuntu-latest
environment: development_environment
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Claude Review
uses: pacnpal/claude-code-review@v1.0.6
uses: pacnpal/claude-code-review@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }}

View File

@@ -48,26 +48,7 @@ async function getDiff(baseSha, headSha) {
}
});
// Filter for relevant files
const lines = diffContent.split('\n');
let filtered = '';
let keep = false;
for (const line of lines) {
if (line.startsWith('diff --git')) {
keep = false;
// Check if file type should be included
if (line.match(/\.(js|ts|py|cpp|h|java|cs)$/) &&
!line.match(/(package-lock\.json|yarn\.lock|\.md|\.json)/)) {
keep = true;
}
}
if (keep) {
filtered += line + '\n';
}
}
return filtered;
return diffContent;
} catch (error) {
throw new Error(`Failed to generate diff: ${error.message}`);
}
@@ -94,7 +75,9 @@ For each issue found:
- Provide specific recommendations for fixes
- Include code examples where helpful
If no issues are found in a particular area, explicitly state that.
- If no issues are found in a particular area, explicitly state that.
- If it's a dependency update, evaluate with strict scrutiny the implications of the change.
- No matter your findings, give a summary of the pull request.
Here is the code diff to review:
@@ -111,7 +94,7 @@ ${diffContent}
'anthropic-version': '2023-06-01'
},
body: JSON.stringify({
model: 'claude-3-sonnet-20240229',
model: 'claude-3-5-sonnet-20241022',
max_tokens: 4096,
temperature: 0.7,
messages: [{

23
dist/index.js vendored
View File

@@ -15741,6 +15741,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253)
const { File: UndiciFile } = __nccwpck_require__(3041)
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322)
let random
try {
const crypto = __nccwpck_require__(7598)
random = (max) => crypto.randomInt(0, max)
} catch {
random = (max) => Math.floor(Math.random(max))
}
let ReadableStream = globalThis.ReadableStream
/** @type {globalThis['File']} */
@@ -15826,7 +15834,7 @@ function extractBody (object, keepalive = false) {
// Set source to a copy of the bytes held by object.
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
} else if (util.isFormDataLike(object)) {
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -30011,6 +30019,14 @@ module.exports = require("net");
/***/ }),
/***/ 7598:
/***/ ((module) => {
"use strict";
module.exports = require("node:crypto");
/***/ }),
/***/ 8474:
/***/ ((module) => {
@@ -31907,7 +31923,9 @@ For each issue found:
- Provide specific recommendations for fixes
- Include code examples where helpful
If no issues are found in a particular area, explicitly state that.
- If no issues are found in a particular area, explicitly state that.
- If it's a dependency update, evaluate with strict scrutiny the implications of the change.
- No matter your findings, give a summary of the pull request.
Here is the code diff to review:
@@ -32022,6 +32040,7 @@ async function run() {
}
run();
module.exports = __webpack_exports__;
/******/ })()
;

4
package-lock.json generated
View File

@@ -3241,7 +3241,9 @@
}
},
"node_modules/undici": {
"version": "5.28.4",
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"