Weekly data workflow only refreshes an unused file and pushes straight to unprotected main

Ouverte
#35 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
30/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
csharp, github-actions, unity
Domaine
backend, ci-cd, devtools

Piste de recherche

Start by reading .github/workflows/update-unity-api.yml, .github/scripts/refresh_unity_data.py, and the MCP server references to the JSON data files. Check how the workflow validates and publishes refreshed data, and which files the tools load. Done means data changes arrive in CI-passing PRs, refreshed data is used, and main has the stated protection and lifecycle compatibility behavior; this spans workflow, server, and repository settings.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

ci priority: medium security

Why it matters

The weekly "Update Unity API Data" workflow looks like it keeps the API database current, but it only rewrites lifecycle_order.json, which no MCP tool reads. It also pushes directly to an unprotected main, pinned to an old docs version. It gives a false sense of freshness while adding unreviewed commits.

Evidence

  • .github/scripts/refresh_unity_data.py:118-121 - only lifecycle_order.json is refreshed. unity_api_common.json, deprecated_patterns.json, shader_properties.json, platform_defines.json are never updated.
  • grep lifecycle_order mcp-server/server.py returns nothing: no tool loads that file.
  • refresh_unity_data.py:22 - UNITY_DOCS_BASE = ".../6000.1/Documentation/ScriptReference" is hardcoded.
  • The lifecycle list includes OnPreCull, OnPreRender, OnPostRender, OnRenderImage, which are not called in URP/HDRP, with no pipeline note.
  • .github/workflows/update-unity-api.yml commits and git pushes straight to main; gh api .../branches/main/protection returns "Branch not protected".

Suggested approach

  • Either expose lifecycle data through a tool (e.g. a lifecycle_info tool or include it in lookup_api) or stop refreshing it.
  • Rename the workflow to reflect what it does, read the docs version from a single config value, and open a PR (e.g. peter-evans/create-pull-request) instead of pushing to main.
  • Enable branch protection on main with required status checks (Validate), and allow the release bot through a ruleset bypass.
  • Add a pipeline-compatibility field to lifecycle entries.

Done when

Automated data changes arrive as PRs that pass CI, the refreshed data is actually used, and main is protected.

Langage dominant
C#
Étoiles
4
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de TMHSDigital/Unity-Developer-Tools

Toutes les issues de TMHSDigital/Unity-Developer-Tools

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.