repoman-setup.sh: add a remove-repo subcommand to un-enroll repos

Aperta
#23 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
shell
Ambito
cli

Direzione di ricerca

Start with repoman-setup.sh and its existing add-repo subcommand to find how arguments are validated and repos.json is written. Read SKILL.md for the required subcommand list. Done means remove-repo removes only whole owner/name matches, writes atomically, rejects an empty result, preserves clones and program state, and is documented; the open question about downstream state behavior may need resolution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

repoman-setup.sh is the only supported writer for ~/.repoman/ (the skill's HARD INVARIANT says never edit it directly). It can add repos (add-repo) but has no way to remove one. So the only way to un-enroll a repo today is a hand edit of repos.json, which the skill forbids.

Proposal

Add repoman-setup.sh remove-repo (--owner <o> --name <n>)..., built to the same contract as add-repo:

  • validate owner/name and match whole names only
  • write atomically (temp file + mv)
  • fail loud if the result would be an empty set, since repoman_get_repos already rejects an empty repos.json
  • leave the clone under repos_dir and all program state/reports alone (non-destructive)
  • update the SKILL.md subcommand list

Open question

Programs keep per-repo state, such as scanner reports and tracked issues. Should removing a repo leave that state behind, or reconcile it? Each downstream consumer needs to define its behavior for this case.

Context

This came up while removing rossoctl/repoman from the ClawgentiOnDAM pod's enrolled set.

Lingua principale
Shell
Stelle
8
Fork
2
Merge medio
2g 18h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rossoctl/repoman

Tutte le issue di rossoctl/repoman

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.