Skip to content

Improve test and build workflow with conditional execution (#381) #286

Improve test and build workflow with conditional execution (#381)

Improve test and build workflow with conditional execution (#381) #286

name: Reviewer Bot PR Metadata
on:
pull_request_target:
types: [opened, labeled, unlabeled, reopened, closed, synchronize]
permissions:
contents: read
env:
STATE_ISSUE_NUMBER: '314'
jobs:
reviewer-bot-pr-metadata:
runs-on: ubuntu-latest
permissions:
# Temporary lock debt: contents:write is allowed only for the existing lock-ref API operations.
contents: write
issues: write
pull-requests: write
actions: read
steps:
- name: Install uv
run: python -m pip install uv
- name: Checkout trusted bot source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
ref: ${{ github.sha }}
- name: Select trusted bot source
id: bot-source
uses: ./.github/actions/reviewer-bot-source
- name: Run reviewer bot
env:
BOT_SRC_ROOT: ${{ steps.bot-source.outputs.bot-src-root }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: pull_request_target
EVENT_ACTION: ${{ github.event.action }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
LABEL_NAME: ${{ github.event.label.name }}
ISSUE_AUTHOR: ${{ github.event.pull_request.user.login }}
ISSUE_LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
IS_PULL_REQUEST: 'true'
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_CREATED_AT: ${{ github.event.pull_request.created_at }}
PR_UPDATED_AT: ${{ github.event.pull_request.updated_at }}
PR_CLOSED_AT: ${{ github.event.pull_request.closed_at }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
GITHUB_REPOSITORY: ${{ github.repository }}
WORKFLOW_RUN_ID: ${{ github.run_id }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_JOB_NAME: ${{ github.job }}
run: uv run --project "$BOT_SRC_ROOT" reviewer-bot