[docs: LangChain root notes with shipped code and canonical plan] #63
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 Agent (PR Comments) | |
| on: | |
| issue_comment: | |
| types: [created] | |
| # Cancel superseded @codex runs on the same issue thread; keep main history. | |
| concurrency: | |
| group: codex-pr-comment-${{ github.event.issue.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| codex: | |
| name: Codex Agent | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: | | |
| github.event.issue.pull_request != null && | |
| ( | |
| contains(github.event.comment.body, '@codex') || | |
| contains(github.event.comment.body, '@github-actions[bot]') | |
| ) && | |
| github.event.comment.user.login == 'CGFixIT' | |
| permissions: | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| outputs: | |
| final_message: ${{ steps.run_codex.outputs.final-message }} | |
| steps: | |
| - name: Checkout PR merge ref | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: refs/pull/${{ github.event.issue.number }}/merge | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - name: Run Codex | |
| id: run_codex | |
| uses: openai/codex-action@10cb888d2ed3b99867f7e7ccff174a861a75aeb6 # v1 | |
| with: | |
| openai-api-key: ${{ secrets.OPENAI_API_KEY }} | |
| codex-version: latest | |
| prompt-file: .github/codex/prompts/pr-agent.md | |
| output-file: codex-output.md | |
| sandbox: read-only | |
| safety-strategy: drop-sudo | |
| allow-users: CGFixIT | |
| post_feedback: | |
| name: Post Codex feedback | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| needs: codex | |
| if: needs.codex.outputs.final_message != '' | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Comment on PR | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| env: | |
| CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }} | |
| with: | |
| github-token: ${{ github.token }} | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| body: ["Codex", "", process.env.CODEX_FINAL_MESSAGE].join("\n"), | |
| }); |