refactor(#3434): drop the agent_repo identity function
mara, PR #3438 review: 'remove the identity function. agent names are unique and all repos go into agent-configs namespace anyway'. Right -- repo==agent isn't a convention worth a name once every call site can just say so; call create_repo/add_repo_member/seed_agent_config with &agent directly.
This commit is contained in:
parent
4d526b8492
commit
6dffa74d90
2 changed files with 8 additions and 21 deletions
|
|
@ -31,19 +31,12 @@ use crate::webhook::DeliveryKind;
|
|||
/// The forge org that owns agent repos. Same org `hive-c0re::forge`
|
||||
/// already uses for its own single-hive `CreateRepo` path — this is
|
||||
/// the same forge instance, not a separate one, so the same org.
|
||||
pub const AGENTS_ORG: &str = "agents";
|
||||
|
||||
/// The repo an agent's config lives in — one repo per agent inside
|
||||
/// [`AGENTS_ORG`], named after the agent.
|
||||
///
|
||||
/// The identity here is the point, not an accident to be inlined: this is
|
||||
/// the single home for the naming convention, so a caller holding an agent
|
||||
/// name never writes the repo name itself. Callers used to pass both, which
|
||||
/// meant every node payload carried the same string twice and any future
|
||||
/// change to the convention would have been a search rather than an edit.
|
||||
pub fn agent_repo(agent: &str) -> &str {
|
||||
agent
|
||||
}
|
||||
/// There is no per-agent repo-vs-agent naming convention to maintain here:
|
||||
/// agent names are unique and every agent's repo lives in this one org, so
|
||||
/// the agent name IS the repo name at every call site (dropped the
|
||||
/// `agent_repo` identity function this used to go through, per review).
|
||||
pub const AGENTS_ORG: &str = "agents";
|
||||
|
||||
/// The `operators` team, whitelisted for the merge gate on every repo
|
||||
/// this client protects — provisioned by `hive-c0re::forge::repos`
|
||||
|
|
|
|||
Loading…
Reference in a new issue