Fix hypercore stats flaky tests #2101
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Assign PR to author and reviewers | |
# This workflow runs on the pull_request_target event: | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. | |
# | |
# So the secrets are accessible even if the PR was opened from an external | |
# repository. This is done because the GitHub API key needs to be accessed | |
# to modify the PRs. | |
# | |
# NOTE: Only API calls should be made in the actions defined here. The | |
# committed code should _NOT_ be touched in any case. | |
"on": | |
pull_request_target: | |
types: [ opened, reopened, ready_for_review ] | |
jobs: | |
assign-pr: | |
name: Assign PR to author | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: toshimaru/[email protected] | |
ask-review: | |
name: Run pull-review | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.draft && github.event.pull_request.base.ref == 'main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run pull-review with docker | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OWNER: ${{ github.repository_owner }} | |
REPO: ${{ github.event.repository.name }} | |
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} | |
shell: bash | |
run: | | |
PR_URL="https://github.com/${OWNER}/${REPO}/pull/${PULL_REQUEST_NUMBER}" | |
docker run ghcr.io/imsky/pull-review "$PR_URL" --github-token "${GITHUB_TOKEN}" |