Skip to content

Use Client ID for dashboard GitHub App config - #394

Merged
michaelmwu merged 3 commits into
mainfrom
discord-todo-permissions-plan
Jul 28, 2026
Merged

Use Client ID for dashboard GitHub App config#394
michaelmwu merged 3 commits into
mainfrom
discord-todo-permissions-plan

Conversation

@michaelmwu

@michaelmwu michaelmwu commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • use the GitHub App Client ID as the installation-token JWT issuer
  • make the Client ID, installation ID, and encrypted multiline private key configurable in Dashboard → Configuration → Operations
  • retain GITHUB_APP_ID as a legacy environment alias and refresh the checked-in dashboard bundle

Validation

  • uv run --group dev pytest -q tests/ --tb=short — 1936 passed, 21 skipped
  • dashboard TypeScript check, Biome lint, and Vitest suite — 15 tests passed
  • Ruff and focused Pyrefly checks passed

Note

Medium Risk
Changes touch GitHub App authentication and secret handling in the admin dashboard; misconfiguration could break Discord/agent GitHub tools until credentials are corrected.

Overview
GitHub App auth now treats the App Client ID as the installation-token JWT issuer, with GITHUB_APP_ID kept only as an env alias for GITHUB_APP_CLIENT_ID.

Dashboard → Configuration → Operations exposes Client ID, installation ID, and an encrypted multiline PEM private key (new multiline field type with a textarea); GITHUB_APP_* settings surface in the primary table. .env.example, README, and docs/discord-github-todos.md document the todos backend, repo access model, and App vs legacy token setup.

The checked-in dashboard static bundle is refreshed to ship the UI changes.

Reviewed by Cursor Bugbot for commit 7f6f67a. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@michaelmwu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 309199ac-989b-4626-836d-1e9274bd632a

📥 Commits

Reviewing files that changed from the base of the PR and between 43aea7f and 7f6f67a.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (33)
  • .env.example
  • README.md
  • apps/admin_dashboard/src/configuration-view.test.tsx
  • apps/admin_dashboard/src/views/configuration-view.tsx
  • apps/api/src/five08/backend/static/dashboard/.vite/manifest.json
  • apps/api/src/five08/backend/static/dashboard/assets/index-2UypYUrJ.css
  • apps/api/src/five08/backend/static/dashboard/assets/index-BFwNBgpZ.js
  • apps/api/src/five08/backend/static/dashboard/assets/index-CvxiiFrp.css
  • apps/api/src/five08/backend/static/dashboard/index.html
  • apps/discord_bot/src/five08/discord_bot/cogs/agent.py
  • docs/configuration.md
  • docs/discord-github-todos.md
  • packages/shared/pyproject.toml
  • packages/shared/src/five08/agent/evals.py
  • packages/shared/src/five08/agent/orchestrator.py
  • packages/shared/src/five08/agent/planner.py
  • packages/shared/src/five08/agent/policy.py
  • packages/shared/src/five08/agent/tools.py
  • packages/shared/src/five08/clients/github.py
  • packages/shared/src/five08/runtime_config.py
  • packages/shared/src/five08/settings.py
  • tests/evals/discord-agent/fixtures/v1/github_issue_create_confirmation_001.json
  • tests/evals/discord-agent/fixtures/v1/github_issue_search_001.json
  • tests/evals/discord-agent/fixtures/v1/github_issue_search_default_repo_001.json
  • tests/evals/discord-agent/fixtures/v1/github_todo_member_confirmation_001.json
  • tests/evals/discord-agent/fixtures/v1/index.json
  • tests/unit/test_agent_evals.py
  • tests/unit/test_agent_gateway.py
  • tests/unit/test_agent_planner.py
  • tests/unit/test_backend_api.py
  • tests/unit/test_github_client.py
  • tests/unit/test_runtime_config.py
  • tests/unit/test_shared_settings.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch discord-todo-permissions-plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_bd40023b-7bad-4e24-b796-68e69d90df96)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f6f67afcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 376 to +380
payload = self._request(
"GET",
"/search/issues",
params={"q": " ".join(search_terms), "per_page": min(max(limit, 1), 20)},
f"/orgs/{organization}/projectsV2",
params={"per_page": min(max(limit, 1), 100)},
permissions={"organization_projects": "read"},

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 Use the GraphQL API for GitHub Projects v2

GitHub Projects v2 is exposed through GraphQL, not REST routes such as /orgs/{organization}/projectsV2, so a Steering Committee request such as “List GitHub Projects” receives a 404; the get, fields, items, add, and update methods below use the same nonexistent route family and numeric IDs, leaving the entire newly advertised Projects workflow unusable. Implement these operations with the Projects v2 GraphQL queries and mutations and their node IDs instead.

Useful? React with 👍 / 👎.

Comment on lines +245 to +249
f"/repos/{repository}/issues",
params={
"state": _issue_state(state),
"per_page": min(max(bounded_limit * 5, 30), 100),
"sort": "updated",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Search beyond the first page of recently updated issues

When a repository has more than 30–100 issues and the requested match is not among the most recently updated first page, this fetches one bounded page and filters it locally, causing github_issue.search_issues to report no match even though the issue exists. The previous Search API queried the whole repository; either retain that behavior or paginate issue pages until the requested result limit is satisfied or the collection is exhausted.

Useful? React with 👍 / 👎.

Comment on lines +265 to +269
if (
not self.github_app_configured
and normalized_repository in self.github_configured_repositories
):
return f"github:repository:configured:{suffix}"

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 Preserve admin access to legacy allowed repositories

When a deployment is still using the documented GITHUB_API_TOKEN/GITHUB_ALLOWED_REPOS compatibility path, an Admin, Owner, or Steering Committee user targeting a nondefault allowed repository is assigned github:repository:configured:{read,write} here, but the admin role only has the all and legacy issue scopes; authorization therefore denies the request before _resolve_repository can apply the allowlist. Add the configured repository scopes to the admin role or classify privileged legacy requests under a scope admins possess.

Useful? React with 👍 / 👎.

Comment on lines +308 to +309
if state is not None:
payload["state"] = _issue_state(state)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject the list-only all state for issue updates

When the structured planner proposes an issue update with state: "all", the action passes the planner shape checks and reaches this shared _issue_state validator, which accepts all for issue listings; the subsequent PATCH is invalid because GitHub issue updates only accept open or closed, so a user can confirm a write that inevitably fails. Validate update states separately from list states before creating the confirmation plan.

Useful? React with 👍 / 👎.

Comment on lines +838 to +844
if tool_name == "github_repository.list_repositories":
_require_any_scope(
github_scopes,
{"github:repository:all:read", "github:repository:all:write"},
message="Listing GitHub repositories requires Steering Committee access",
)
return self._github_client().list_installation_repositories()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid installation-only repository listing with legacy tokens

When the documented legacy GITHUB_API_TOKEN fallback is active and a Steering Committee/Admin user asks to list repositories, _github_client() constructs a static PAT-backed client but this branch unconditionally calls /installation/repositories, which requires a GitHub App installation access token; the newly exposed command therefore fails instead of returning the configured legacy allowlist or explaining that App credentials are required. Gate this tool on a complete App configuration or provide a PAT-compatible legacy implementation.

Useful? React with 👍 / 👎.

@michaelmwu
michaelmwu added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit ea1e294 Jul 28, 2026
13 checks passed
@michaelmwu
michaelmwu deleted the discord-todo-permissions-plan branch July 28, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant