Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/monthly_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
GCS_BUCKET: ${{ vars.GCS_BUCKET }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
SELFHOSTED_CODEX_REVIEW_ENABLED: ${{ vars.SELFHOSTED_CODEX_REVIEW_ENABLED || 'true' }}
SELFHOSTED_CODEX_REVIEW_REPOSITORY: ${{ vars.SELFHOSTED_CODEX_REVIEW_REPOSITORY || 'QuantStrategyLab/SelfHostedCodexAuditBridge' }}
SELFHOSTED_CODEX_REVIEW_REPOSITORY: ${{ vars.SELFHOSTED_CODEX_REVIEW_REPOSITORY || 'QuantStrategyLab/CryptoCodexAuditBridge' }}
SELFHOSTED_CODEX_REVIEW_MODE: ${{ vars.SELFHOSTED_CODEX_REVIEW_MODE || 'review_and_fix' }}
SELFHOSTED_CODEX_REVIEW_AUTO_MERGE: ${{ vars.SELFHOSTED_CODEX_REVIEW_AUTO_MERGE || 'false' }}
LEGACY_AI_REVIEW_ENABLED: ${{ vars.LEGACY_AI_REVIEW_ENABLED || 'false' }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
private-key: ${{ secrets.CROSS_REPO_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
SelfHostedCodexAuditBridge
CryptoCodexAuditBridge

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Derive app token repo from configured target repository

TARGET_REPOSITORY is configurable via SELFHOSTED_CODEX_REVIEW_REPOSITORY, but the app-token step now hardcodes CryptoCodexAuditBridge. In environments that still set SELFHOSTED_CODEX_REVIEW_REPOSITORY to another repo (for example the previous SelfHostedCodexAuditBridge value), the dispatch call targets that repo while the GitHub App token is scoped to a different repo, causing 403/404 on POST /dispatches unless a fallback PAT is present. This regression was introduced by changing only the token scope constant, so the token scope should be computed from the same configured target repository.

Useful? React with 👍 / 👎.

permission-contents: write

- name: Trigger Self-hosted Codex Monthly Review
Expand Down
4 changes: 2 additions & 2 deletions tests/test_monthly_publish_workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def test_monthly_review_issue_creation_does_not_require_gh_cli(self) -> None:
self.assertIn('GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}', workflow)
self.assertIn("issue_number=", workflow)
self.assertIn("SELFHOSTED_CODEX_REVIEW_REPOSITORY", workflow)
self.assertIn("QuantStrategyLab/SelfHostedCodexAuditBridge", workflow)
self.assertIn("QuantStrategyLab/CryptoCodexAuditBridge", workflow)
self.assertIn("CROSS_REPO_GITHUB_APP_ID", workflow)
self.assertIn("CROSS_REPO_GITHUB_APP_PRIVATE_KEY", workflow)
self.assertIn("actions/create-github-app-token@v3", workflow)
self.assertIn("SelfHostedCodexAuditBridge", workflow)
self.assertIn("CryptoCodexAuditBridge", workflow)
self.assertIn("permission-contents: write", workflow)
self.assertIn("APP_TOKEN", workflow)
self.assertIn("CODEX_AUDIT_DISPATCH_TOKEN", workflow)
Expand Down