Skip to content

Commit ef63308

Browse files
committed
debug: check base and merge commit results
1 parent cbaa0e3 commit ef63308

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/benchmark-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
OWNER: ${{ github.repository_owner }}
2929
REPOSITORY: ${{ github.event.repository.name }}
3030
PR_NUMBER: ${{ github.event.pull_request.number }}
31-
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
31+
GITHUB_SHA: ${{ github.sha }}
3232
steps:
3333
- name: Checkout and setup environment
3434
uses: MetaMask/action-checkout-and-setup@v1
@@ -56,7 +56,7 @@ jobs:
5656
OWNER: ${{ github.repository_owner }}
5757
REPOSITORY: ${{ github.event.repository.name }}
5858
PR_NUMBER: ${{ github.event.pull_request.number }}
59-
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
59+
GITHUB_SHA: ${{ github.sha }}
6060

6161
- name: Upload benchmark results
6262
if: github.ref == 'refs/heads/main'

development/benchmark-pr-comment.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,10 @@ function generateBenchmarkComment(
534534
* @throws {Error} When GitHub API request fails or required environment variables are missing
535535
*/
536536
async function main(): Promise<void> {
537-
const { PR_COMMENT_TOKEN, OWNER, REPOSITORY, PR_NUMBER } =
537+
const { PR_COMMENT_TOKEN, OWNER, REPOSITORY, PR_NUMBER, GITHUB_SHA } =
538538
process.env as Record<string, string>;
539539
const N_COMMITS = 10;
540-
540+
console.log({ GITHUB_SHA });
541541
if (!PR_NUMBER) {
542542
console.warn('No pull request detected, skipping benchmark comment');
543543
return;
@@ -568,6 +568,7 @@ async function main(): Promise<void> {
568568
return;
569569
}
570570

571+
benchmarkData.commit = GITHUB_SHA;
571572
const referenceData = await fetchLatestMainBenchmarkData(N_COMMITS);
572573

573574
const commentBody = generateBenchmarkComment(benchmarkData, referenceData);

0 commit comments

Comments
 (0)