Skip to content

feat(gator): add per-repo registry and register ai-openshell/desktop - #6223

Draft
elezar wants to merge 1 commit into
mainfrom
feat/gator-repo-registry/elezar
Draft

elezar wants to merge 1 commit into
mainfrom
feat/gator-repo-registry/elezar

Conversation

@elezar

@elezar elezar commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Lets gator review PRs in ai-openshell/desktop without duplicating the agent definition there. Opened as a draft for feedback; approval on desktop stays disabled.

Related Issue

None yet. Opening as a draft to get feedback on the design before filing or linking an issue.

Changes

  • Add repos.json, shipped at /etc/openshell/gator-repos.json. It registers each repo gator may work in, with per-repo approval settings (enabled, maintainers_file, required_check, required_check_integration_id) and the workflow paths approve-gator-workflow may approve.
  • bin/gh and bin/approve-gator-workflow read the registry instead of hardcoding ai-openshell/openshell. A repo that is unregistered or has approval disabled is denied, with no default.
  • Register ai-openshell/desktop with approval disabled and no approvable workflows.
  • Add desktop rules to both provider policies (read, comment, label, review).
  • Read the stale-payload version from ai-openshell/openshell, so desktop needs no copy of agent.yaml. Bump payload_version to 26.
  • Make the gate skill, prompt, launch skill, and README repo-neutral, and document how to add a repo.

Release Notes

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

All gator test scripts pass in an Ubuntu container (they need Bash 4+). New cases cover approval denial for a registered-but-disabled repo and an unregistered repo, and workflow-approval denial for both. A local gator against desktop PR 16 read the PR and applied gator:in-review; a full cycle on the final payload is not yet verified.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Move the approval guard's repo, roster, required check, and approvable
workflows into repos.json. Approval is opt-in per repo: desktop is
registered review-only, and unregistered repos are denied. Extend the
provider policies to cover desktop.

Read the stale-payload version from ai-openshell/openshell so the agent
definition is not duplicated in each target repo.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Dec 4, 2026
@elezar

elezar commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Open question for reviewers: how should gator decide who counts as a maintainer in repos other than openshell?

Today the approval guard reads a MAINTAINERS.md roster from the target repo and requires the base branch to require OpenShell / Maintainer Approval. ai-openshell/desktop has neither, so approval is disabled there in repos.json. Review, labels, and comments work.

The org already tracks maintainers as GitHub teams managed in the infra repo: a top-level maintainers team plus per-repo teams such as desktop. Reading those would avoid a roster file in every repo. A sketch:

  • repos.json gains maintainer_teams (for example ["maintainers", "desktop"]). The guard reads GET /orgs/ai-openshell/teams/<slug>/members and uses the logins in place of the MAINTAINERS.md parse. openshell could keep its roster file.
  • Provider policies need a GET /orgs/ai-openshell/teams/*/members rule. The App already requests members: read. The user identity needs read:org.
  • A missing team, an empty team, or a failed read must deny approval, not fall back.

Things to decide:

  1. Should the top-level maintainers team be trusted in every repo, with repo teams adding to it?
  2. The openshell Maintainer Approval check reads MAINTAINERS.md, so it and gator could disagree on who is a maintainer. Should the check read the teams too, or should the roster file be generated from them?
  3. Desktop still needs its own required Maintainer Approval check before approval can be enabled, whichever source is used.

I have not implemented the team source in this PR. Happy to do it here or as a follow-up, depending on feedback.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant