Skip to content

chore: bump astral-sh/setup-uv from 6.7.0 to 6.8.0 #58

chore: bump astral-sh/setup-uv from 6.7.0 to 6.8.0

chore: bump astral-sh/setup-uv from 6.7.0 to 6.8.0 #58

Workflow file for this run

name: LGTM Review
on:
issue_comment:
types: [created]
jobs:
lgtm-review:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/lgtm review')
runs-on: ubuntu-latest
steps:
- name: Check if commenter has write access
id: check-permission
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
USER=${{ github.event.comment.user.login }}
REPO=${{ github.repository }}
PERMISSION=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/$REPO/collaborators/$USER/permission \
| jq -r '.permission')
if [[ "$PERMISSION" == "admin" || "$PERMISSION" == "maintain" || "$PERMISSION" == "write" ]]; then
echo "HAS_PERMISSION=true" >> $GITHUB_ENV
else
echo "HAS_PERMISSION=false" >> $GITHUB_ENV
fi
- name: Fail if unauthorized
if: env.HAS_PERMISSION == 'false'
run: |
echo "User ${{ github.event.comment.user.login }} is not authorized to trigger this workflow."
exit 1
- name: Checkout PR code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: refs/pull/${{ github.event.issue.number }}/merge
- name: Run LGTM Review
uses: elementsinteractive/lgtm-ai-action@v1
with:
ai-api-key: ${{ secrets.AI_API_TOKEN }}
git-api-key: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.issue.number }}