Skip to content

Integrate with Pull Request comment flow #157

@robobario

Description

@robobario

Hi!

We have been experimenting with triggering performance tests using a comment in a PR. We use xt0rted/pull-request-comment-branch to extract the head_ref to checkout. But when the benchmark results are pushed to github the commit in the results is the HEAD commit on the main branch, not the commit from the PR.

It would be cool if we could get the commit details from issue_comment events, either in this action or by using the output of another action.

Could we pass the ref as a parameter instead of extracting it from the event?

Like:

      - name: 'Store benchmark result'
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: kafka producer perf test Benchmark
          tool: 'customSmallerIsBetter'
          ...
          ref: ${{ steps.comment-branch.outputs.head_ref }}

And then look up the commit details through the API using getCommitFromGitHubAPIRequest (maybe repo and owner would need to be configurable the same way if we are testing a PR from a fork? It's moot because the other action doesn't extract them either).

Thanks for your time 👋

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions