Skip to content

Commit

Permalink
Merge pull request #109 from chorus-ai/tp/update_benchmark_workflow
Browse files Browse the repository at this point in the history
Remove 'post comment' step from benchmark action
  • Loading branch information
briangow authored Nov 4, 2024
2 parents be6880b + f2b6e57 commit 70fba60
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,21 @@ jobs:
echo "No benchmarks were run." > final_results.txt
fi
- name: Post results to pull request
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const filePath = 'final_results.txt';
if (!fs.existsSync(filePath) || fs.statSync(filePath).size === 0) {
console.log("No results to post.");
return;
}
const resultContent = fs.readFileSync(filePath, 'utf8');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `Benchmark results:\n\`\`\`\n${resultContent}\n\`\`\``
});
# Requires private TOKEN to be added to run on PRS from external repos
# - name: Post results to pull request
# uses: actions/github-script@v7
# with:
# script: |
# const fs = require('fs');
# const filePath = 'final_results.txt';
# if (!fs.existsSync(filePath) || fs.statSync(filePath).size === 0) {
# console.log("No results to post.");
# return;
# }
# const resultContent = fs.readFileSync(filePath, 'utf8');
# await github.rest.issues.createComment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# issue_number: context.issue.number,
# body: `Benchmark results:\n\`\`\`\n${resultContent}\n\`\`\``
# });

0 comments on commit 70fba60

Please sign in to comment.