Org policy file: devready check --policy FILE

Abierto
#44 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
cli, devtools

Línea de trabajo

Start with section 6 of docs/plans/features-5-8.md and the existing check_tool version checks and _compare logic; the issue recommends beginning after #43. The plan spans policy loading and validation, evaluation, CLI and environment options, GitHub Action support, starter file generation, and documentation. Follow its one PR per step sequence; done means the stated policy results and exit behavior work, invalid content produces one policy.file ERROR without echoing contents, and organization guidance is documented.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Problem: Platform teams want one minimum toolchain for every repo ("Git >= 2.40, Node >= 20, Docker required") without editing each repo's .devready.json, whose keys are frozen in 1.x.

Do: follow section 6 of the team features plan. One PR per step:

  • checks/policy.py: loader and validator, with hostile-content tests (file content is never echoed).
  • Requirement evaluation reusing check_tool versions and _compare; policy.* ids, explain.py entries, docs/checks.md rows.
  • --policy FILE flag and DEVREADY_POLICY env var; works with --recursive (#43), applying to every package.
  • GitHub Action policy input; devready init --policy prints a starter file.
  • Docs: a "Using DevReady across an organization" guide.

Policy file shape (unknown keys make the file invalid, reported as one ERROR result):

{"policy_version": 1,
 "require": {"node": ">=20", "python": ">=3.11", "git": ">=2.40", "docker": "*"},
 "skip": ["platform.autocrlf"],
 "env": ["NPM_TOKEN"]}

Done when:

  • devready check --policy org.json reports policy.<tool>.require results, and a policy fail exits 1.
  • A repo's .devready.json skip cannot skip policy.* ids.
  • An invalid policy file gives one policy.file ERROR and never prints its contents.

Notes:

  • Local files only. Remote URLs stay out (network checks need a design review first, see ROADMAP.md); teams vendor the file or fetch it in CI.
  • DEVREADY_POLICY holds a path; its value is never printed.
  • Best started after #43.
Lenguaje dominante
Python
Estrellas
2
Forks
3
Merge medio
10 h 51 min
PR fusionados (30 d)
40

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Evalogical-Inc/devReady

Todos los issues de Evalogical-Inc/devReady

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.