Skip to content

Commit

Permalink
change PR comment structure
Browse files Browse the repository at this point in the history
  • Loading branch information
vsvaidya27 committed Dec 6, 2024
1 parent 9005139 commit 2a91f45
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions .github/workflows/bfcl_evaluation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,12 @@ jobs:
- name: Comment on PR with results
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
uses: peter-evans/create-or-update-comment@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const score = process.env.EVALUATION_SCORE;
const threshold = process.env.MIN_ACCEPTABLE_SCORE;
const passed = parseFloat(score) >= parseFloat(threshold);
issue-number: ${{ github.event.pull_request.number }}
body: |
## BFCL Evaluation Results
const body = `## BFCL Evaluation Results
- Score: ${score}
- Minimum Threshold: ${threshold}
- Status: ${passed ? '✅ Passed' : '❌ Failed'}`;
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.name,
pull_number: context.issue.number,
body: body,
event: 'COMMENT'
});
- Score: ${{ env.EVALUATION_SCORE }}
- Minimum Threshold: ${{ env.MIN_ACCEPTABLE_SCORE }}
- Status: ${{ env.EVALUATION_SCORE >= env.MIN_ACCEPTABLE_SCORE && '✅ Passed' || '❌ Failed' }}

0 comments on commit 2a91f45

Please sign in to comment.