Skip to content

feat(replay-vision): API validation + lens_result row column #31947

feat(replay-vision): API validation + lens_result row column

feat(replay-vision): API validation + lens_result row column #31947

Workflow file for this run

name: Opened PR
on:
pull_request:
types: [opened, ready_for_review]
permissions:
pull-requests: write
jobs:
check-description:
name: Check that PR has description
runs-on: ubuntu-24.04
timeout-minutes: 5
if: github.event.pull_request.draft == false
steps:
- name: Check if PR is shame-worthy
id: is-shame-worthy
run: |
FILTERED_BODY=$( \
sed -r -e \
'/^(\.\.\.)|(\*)|(#+ )|(<!--)|(👉)/d' \
<<< $RAW_BODY \
)
echo "::debug::Filtered PR body to $FILTERED_BODY"
if [[ -z "${FILTERED_BODY//[[:space:]]/}" ]]; then
echo "is-shame-worthy=true" >> $GITHUB_OUTPUT
else
echo "is-shame-worthy=false" >> $GITHUB_OUTPUT
fi
env:
RAW_BODY: ${{ github.event.pull_request.body }}
# `gh` CLI in the next step requires the repo to be checked out
- uses: actions/checkout@v6
if: steps.is-shame-worthy.outputs.is-shame-worthy == 'true'
with:
# make the checkout extremely quickly
sparse-checkout: 'README.md'
- name: Shame if PR has no description
if: steps.is-shame-worthy.outputs.is-shame-worthy == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ACTOR: ${{ github.actor }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
SHAME_BODY="Hey @${PR_ACTOR}! 👋\nThis pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future."
gh pr comment "$PR_NUMBER" --body "$SHAME_BODY"