Skip to content

feat(ui): Add Miuix blur and custom card backdrop blur support #211

feat(ui): Add Miuix blur and custom card backdrop blur support

feat(ui): Add Miuix blur and custom card backdrop blur support #211

Workflow file for this run

name: Codex Review
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request:
types: [review_requested]
permissions:
contents: read
issues: read
pull-requests: read
jobs:
codex-review:
runs-on: ubuntu-latest
steps:
- name: Parse review command
id: command
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
COMMENT_BODY: ${{ github.event.comment.body }}
COMMENT_USER: ${{ github.event.comment.user.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_PR_URL: ${{ github.event.issue.pull_request.url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REQUESTED_REVIEWER: ${{ github.event.requested_reviewer.login }}
SENDER_LOGIN: ${{ github.event.sender.login }}
run: |
set -euo pipefail
if [ "$EVENT_NAME" = "pull_request" ]; then
if [ "${REQUESTED_REVIEWER:-}" != "xingguangcuicanbot" ]; then
echo "matched=false" >> "$GITHUB_OUTPUT"
exit 0
fi
NUMBER="$PR_NUMBER"
REQUEST_USERNAME="${SENDER_LOGIN:-}"
else
if ! grep -Eq '(^|[[:space:]])/codex[[:space:]]+review([[:space:]]|$)' <<<"$COMMENT_BODY"; then
echo "matched=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [ "$EVENT_NAME" = "issue_comment" ]; then
if [ -z "${ISSUE_PR_URL:-}" ]; then
echo "matched=false" >> "$GITHUB_OUTPUT"
exit 0
fi
NUMBER="$ISSUE_NUMBER"
else
NUMBER="$PR_NUMBER"
fi
REQUEST_USERNAME="${COMMENT_USER:-}"
fi
if [ -z "${NUMBER:-}" ]; then
echo "::error::cannot resolve pull request number"
exit 1
fi
echo "matched=true" >> "$GITHUB_OUTPUT"
echo "repo=${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
echo "username=${REQUEST_USERNAME}" >> "$GITHUB_OUTPUT"
echo "number=${NUMBER}" >> "$GITHUB_OUTPUT"
- name: Call reviewer service
if: steps.command.outputs.matched == 'true'
shell: bash
env:
REVIEW_SERVER_URL: ${{ secrets.CODEX_REVIEW_SERVER_URL }}
REPO: ${{ steps.command.outputs.repo }}
REQUEST_USERNAME: ${{ steps.command.outputs.username }}
PR_NUMBER: ${{ steps.command.outputs.number }}
run: |
set -euo pipefail
if [ -z "${REVIEW_SERVER_URL:-}" ]; then
echo "::error::missing secret CODEX_REVIEW_SERVER_URL"
exit 1
fi
payload=$(jq -n \
--arg repo "$REPO" \
--arg request_username "$REQUEST_USERNAME" \
--argjson pr_number "$PR_NUMBER" \
'{repo:$repo, request_username:$request_username, pr_number:$pr_number}')
curl -fsSL \
-H 'Content-Type: application/json' \
-d "$payload" \
"${REVIEW_SERVER_URL%/}/review"