diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 7fc5c83f15974..81e1f99fce1bf 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -126,33 +126,9 @@ jobs: smp-version: ${{ steps.experimental-meta.outputs.SMP_CRATE_VERSION }} lading-version: ${{ steps.experimental-meta.outputs.LADING_VERSION }} steps: - - uses: actions/checkout@v3 - - - name: Checkout PR (issue_comment) - if: github.event_name == 'issue_comment' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh pr checkout ${{ github.event.issue.number }} - - - name: Get PR branch name (issue_comment) - id: get-pr-branch-name - if: github.event_name == 'issue_comment' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export BRANCH=$(git branch --show-current) - echo "BRANCH=${BRANCH}" - echo "BRANCH=${BRANCH}" >> $GITHUB_OUTPUT - - - name: Checkout PR branch (issue_comment) - if: github.event_name == 'issue_comment' - uses: actions/checkout@v3 with: - # TODO: this can be done more elegantly in a follow-up by using a depth value and - # increasing it until the merge-base is found. - fetch-depth: 500 - ref: "${{ steps.get-pr-branch-name.outputs.BRANCH }}" + fetch-depth: 1000 # If triggered by issue comment, the event payload doesn't directly contain the head and base sha from the PR. # But, we can retrieve this info from some commands. @@ -165,6 +141,8 @@ jobs: export PR_NUMBER=${{ github.event.issue.number }} echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT + gh pr checkout ${{ github.event.issue.number }} + export BASELINE_SHA=$(git merge-base master HEAD) echo "BASELINE_SHA=${BASELINE_SHA}" >> $GITHUB_OUTPUT