Codex Comment Watch #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |