Skip to content

repository set-up: the team-review prompt — an inbound endpoint for managers and the "any linked member of the team may decide" rule #273

Description

@teemow

Parent

Epic: giantswarm/giantswarm#37726 — repository set-up as a company-wide automation.
Plan: repository-setupPRD.md (proposed in giantswarm/bumblebee-plans#56, in review; the link moves to main once merged). Slice 16 of 23.

What to build

A team, in its Slack channel, receives the asks that need its decision — a deprecation, an archive, a repository another team hands over — with an Approve button; a linked member's click is the GitHub review, submitted as that member. Swarmgeist's HITL surface (docs/slack-hitl-surface.md) decides prompts by a thread's initiator or a granted collaborator today, and the gateway has no inbound API for a third party to post a prompt (docs/api.md: the chat front door, the web adapter, admin endpoints). Both are new here.

  • A new prompt kind — the team review: posted into a named channel, the change spelled out (what, which repository, the giving and the receiving team for a transfer, the PR link), an Approve button and a link to the PR for anything else. A second variant is notice-only (a completion message; the giving team's notice) and has no buttons.
  • An inbound endpoint for managers to post a prompt or a notice to a channel, authenticated as a service identity (no personal token, no shared secret in a configuration file), with the team name, the channel, the text and the tool call to make on approval.
  • The decision rule for this kind: any linked (musterlink) member of the named GitHub team may decide — there is no initiator; the click calls the named manager tool (giantswarm-repo-manager's approve_change) as the clicking member, passing that member's identity; a second click is refused and the message shows the outcome and who decided.

Acceptance criteria

  • Unit tests: only a linked member of the named team may decide; the click invokes the tool as that member; a second click is refused; an unauthenticated post is refused; a notice renders without buttons
  • Lab proof with a fixture team and channel: a manager posts an ask, a linked member approves, the tool is called with that member's identity
  • docs/api.md and docs/slack-hitl-surface.md describe the endpoint, the prompt kind and the rule

Blocked by

Nothing. giantswarm-repo-manager (slice 12) wires its lifecycle asks and completion messages to this endpoint.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Validation ☑️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions