[codex] Document Conductor command wrapper #7
Workflow file for this run
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: Show Review App Commands on PR Open | |
| on: | |
| # pull_request_target is intentional: it has write permission to comment on PRs from | |
| # forks, where `pull_request` would be read-only. This is safe because no PR code is | |
| # checked out — the job only calls `actions/github-script` with a hardcoded message. | |
| # Do not switch this to `pull_request` or add a checkout step without re-evaluating. | |
| pull_request_target: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| show-help: | |
| # Skip on PRs in repos that have not configured the cpflow review app flow yet, | |
| # so this workflow does not noisily comment on every contributor PR. Once the | |
| # repository sets `vars.REVIEW_APP_PREFIX`, the help message starts appearing. | |
| if: vars.REVIEW_APP_PREFIX != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Post quick reference | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const body = [ | |
| "# Review app commands", | |
| "", | |
| "- `+review-app-deploy` - create or redeploy this PR's review app.", | |
| "- `+review-app-delete` - delete this PR's review app and temporary resources.", | |
| "- `+review-app-help` - show setup details and workflow behavior.", | |
| "", | |
| "For setup details, comment `+review-app-help`." | |
| ].join("\n"); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body | |
| }); |