|
19 | 19 | description: 'Git ref the session should work against (e.g., origin/merge-train/barretenberg)' |
20 | 20 | required: false |
21 | 21 | type: string |
| 22 | + repo: |
| 23 | + description: 'Repo the work targets (owner/repo). Defaults to this repo. A private target (…-private) makes the session run in private mode.' |
| 24 | + required: false |
| 25 | + type: string |
| 26 | + mode: |
| 27 | + description: 'ClaudeBox repo-access mode (public|private). Leave empty to infer from the target repo.' |
| 28 | + required: false |
| 29 | + type: string |
22 | 30 | slack_channel: |
23 | 31 | description: 'Slack channel ID to thread status into (set by the kickoff script)' |
24 | 32 | required: false |
@@ -124,15 +132,19 @@ jobs: |
124 | 132 | CLAUDEBOX_LINK: ${{ steps.parse.outputs.link }} |
125 | 133 | COMMENT_ID: ${{ github.event.comment.id || '' }} |
126 | 134 | RUN_COMMENT_ID: ${{ steps.status_comment.outputs.run_comment_id || '' }} |
127 | | - REPO: ${{ github.repository }} |
| 135 | + REPO: ${{ inputs.repo || github.repository }} |
128 | 136 | RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
129 | 137 | AUTHOR: ${{ github.event.comment.user.login || github.actor }} |
130 | 138 | SLACK_CHANNEL: ${{ inputs.slack_channel || '' }} |
131 | 139 | SLACK_THREAD_TS: ${{ inputs.slack_thread_ts || '' }} |
132 | | - # Public mode grants the session read-write access to public repos |
133 | | - # (aztec-packages). Without it the session only gets the group's |
134 | | - # unscoped repos and cannot open PRs against aztec-packages. |
135 | | - CLAUDEBOX_MODE: ${{ vars.CLAUDEBOX_MODE || 'public' }} |
| 140 | + # Mode selection, in priority order: |
| 141 | + # 1. an explicit `mode` input (caller knows best); |
| 142 | + # 2. private, when the target repo is a private mirror (…-private) — |
| 143 | + # e.g. a merge-train dequeue on aztec-packages-private, which a |
| 144 | + # public-mode session cannot read or open a fix PR against; |
| 145 | + # 3. the repo/org default (public) for ordinary /claudebox work on |
| 146 | + # aztec-packages. |
| 147 | + CLAUDEBOX_MODE: ${{ inputs.mode || (endsWith(inputs.repo || github.repository, '-private') && 'private' || vars.CLAUDEBOX_MODE || 'public') }} |
136 | 148 | run: | |
137 | 149 | if [ -z "${CLAUDEBOX_API_SECRET:-}" ]; then |
138 | 150 | echo "ERROR: CLAUDEBOX_API_SECRET is not set; cannot dispatch ClaudeBox v2" |
|
0 commit comments