Skip to content

feat(github-app): add repo command authorization policy - #367

Merged
JSONbored merged 5 commits into
JSONbored:mainfrom
mkdev5:feat/repo-command-authorization-policy
Jun 4, 2026
Merged

feat(github-app): add repo command authorization policy#367
JSONbored merged 5 commits into
JSONbored:mainfrom
mkdev5:feat/repo-command-authorization-policy

Conversation

@mkdev5

@mkdev5 mkdev5 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add repo-level command authorization policy settings for public @gittensory command handling.
  • Preserve secure defaults: maintainers/collaborators can run commands, confirmed-miner PR authors can run normal own-PR commands, and queue-digest commands stay maintainer/collaborator only by default.
  • Apply policy during issue_comment processing, include private preview diagnostics, and audit denied commands with normalized allowed roles.
  • Closes feat(github-app): add repo-level command authorization policy #106.

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None. npm run test:ci passed locally. Coverage from the local run was statements 99.09%, branches 97.03%, functions 98.43%, and lines 99.66%.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include screenshots or a short recording.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • No visible UI changes; the UI artifact change is the generated OpenAPI contract only.
  • Adds migration 0020_command_authorization_policy.sql for the repository settings JSON policy column.
  • Policy diagnostics stay in private API/settings-preview surfaces; public command comments remain sanitized and unchanged in shape.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@MkDev11 this is the one I would land first in the current migration stack.

A few notes:

  • The repo command authorization policy is a concrete production guard, not a speculative helper.
  • The migration follows current main cleanly as the next 0020 candidate.
  • No code changes requested.

Validation expected:

  • Keep the current green CI run after any required branch update.

@dosubot dosubot Bot added the lgtm label Jun 4, 2026
@JSONbored
JSONbored merged commit 3183bfb into JSONbored:main Jun 4, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 4, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(github-app): add repo-level command authorization policy

2 participants