Skip to content

Codex Comment Watch #38

Codex Comment Watch

Codex Comment Watch #38

name: Codex Comment Watch
on:
issue_comment:
types:
- created
pull_request_review_comment:
types:
- created
pull_request_review:
types:
- submitted
permissions:
contents: read
pull-requests: read
concurrency:
group: codex-comment-watch-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
check-codex-comments:
name: Check Codex Comments
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
if: >
contains(fromJson('["chatgpt-codex-connector","chatgpt-codex-connector[bot]"]'), github.event.sender.login)
&& (github.event_name != 'issue_comment' || github.event.issue.pull_request != null)
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for git describe to find tags
- name: Determine PR number
id: determine-pr
run: |
if [[ "${{ github.event_name }}" == "issue_comment" ]]; then
echo "value=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
else
echo "value=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
fi
- name: Check for unresolved Codex comments
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/check_codex_comments.sh ${{ steps.determine-pr.outputs.value }}