4 Commits

Author SHA1 Message Date
pacnpal
785bb103c6 Update action.js 2025-02-10 17:25:49 -05:00
pacnpal
d45693ae1c Update release.yml 2025-02-10 17:23:06 -05:00
pacnpal
a9173964c2 Update release.yml 2025-02-10 17:22:58 -05:00
github-actions[bot]
acd58d30ee Add built files 2025-02-10 22:09:31 +00:00
3 changed files with 6 additions and 23 deletions

View File

@@ -27,8 +27,8 @@ jobs:
- name: Commit built files - name: Commit built files
run: | run: |
git config --global user.name 'github-actions[bot]' git config --global user.name 'claude-code-review[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com' git config --global user.email 'claude-code-review[bot]@users.noreply.github.com'
git add -f dist git add -f dist
git commit -m 'Add built files' git commit -m 'Add built files'
git push origin HEAD:main git push origin HEAD:main

View File

@@ -33,6 +33,8 @@ async function setupGitConfig() {
// Configure git to fetch PR refs // Configure git to fetch PR refs
await exec('git', ['config', '--local', '--add', 'remote.origin.fetch', '+refs/pull/*/head:refs/remotes/origin/pr/*']); await exec('git', ['config', '--local', '--add', 'remote.origin.fetch', '+refs/pull/*/head:refs/remotes/origin/pr/*']);
await exec('git', ['fetch', 'origin']); await exec('git', ['fetch', 'origin']);
await exec('git', ['config', '--global', 'user.name', 'claude-code-review[bot]']);
await exec('git', ['config', '--global', 'user.email', 'claude-code-review[bot]@users.noreply.github.com']);
} }
async function getDiff(baseSha, headSha) { async function getDiff(baseSha, headSha) {

23
dist/index.js vendored
View File

@@ -31877,26 +31877,7 @@ async function getDiff(baseSha, headSha) {
} }
}); });
// Filter for relevant files return diffContent;
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;
} catch (error) { } catch (error) {
throw new Error(`Failed to generate diff: ${error.message}`); throw new Error(`Failed to generate diff: ${error.message}`);
} }
@@ -31942,7 +31923,7 @@ ${diffContent}
'anthropic-version': '2023-06-01' 'anthropic-version': '2023-06-01'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'claude-3-sonnet-20240229', model: 'claude-3-5-sonnet-20241022',
max_tokens: 4096, max_tokens: 4096,
temperature: 0.7, temperature: 0.7,
messages: [{ messages: [{