-
Notifications
You must be signed in to change notification settings - Fork 27
👷 automate annuaire entreprises data updates via daily cron #1488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👷 automate annuaire entreprises data updates via daily cron #1488
Conversation
7080a21
to
c0e89a4
Compare
c0e89a4
to
34516de
Compare
Remove unused directory creation and adjust TypeScript config to properly include scripts folder without restricting rootDir. The data directory is created by the workflow before running the script.
This commit reverts follows #1483 with a own graded on purpuse to ensure that a pr will be created after merge
Add data change verification step before creating pull requests. Previously, the workflow would create a PR whenever the search-infra commit SHA changed, even if the generated data files remained identical. The workflow now performs a two-stage check: 1. Commit SHA difference check (rebuilds data if different) 2. Data file change check (only creates PR if JSON files actually changed) This prevents creating unnecessary PRs when upstream changes don't affect the generated data.
What we want https://github.com/proconnect-gouv/proconnect-identite/actions/runs/18406028355/job/52446043186?pr=1488 packages/annuaire_entreprises/data/.commit | 2 +-
.../annuaire_entreprises/data/administration_siren_whitelist.json | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/annuaire_entreprises/data/.commit b/packages/annuaire_entreprises/data/.commit
index 959b040..295a11d 100644
--- a/packages/annuaire_entreprises/data/.commit
+++ b/packages/annuaire_entreprises/data/.commit
@@ -1 +1 @@
-3c339c4f4e0367eddb24c827667d7db64623f43d
+6b9943789c70f18dcf970dedbea139ac9886fe28
diff --git a/packages/annuaire_entreprises/data/administration_siren_whitelist.json b/packages/annuaire_entreprises/data/administration_siren_whitelist.json
index d662660..04f85df 100644
--- a/packages/annuaire_entreprises/data/administration_siren_whitelist.json
+++ b/packages/annuaire_entreprises/data/administration_siren_whitelist.json
@@ -134,5 +134,7 @@
"180020026": "CAISSE DES DEPOTS ET CONSIGNATIONS (CDC)",
"334654035": "MAISONS & CITES SOCIETE ANONYME D'HLM (M & C)",
"264600115": "HOPITAL DE SAINT CERE - SAINT-CERE",
- "180000010": "GRANDE CHANCELLERIE DE LA LEGION D'HONNEUR"
+ "180000010": "GRANDE CHANCELLERIE DE LA LEGION D'HONNEUR",
+ "263500126": "CENTRE HOSPITALIER INTERCOMMUNAL REDON-CARENTOIR",
+ "439988767": "PAVI EVOLUTION (LE MAJESTIC)"
} |
Remove workflow_dispatch dry_run input parameter since dry run mode is automatically determined by PR context. This streamlines the workflow configuration while maintaining the same functionality.
"build": "tsc --build tsconfig.lib.json", | ||
"prebuild:data": "rm -rf data", | ||
"build:data": "run-p build:degit:*", | ||
"prebuild:data": "npx --yes del-cli data/*.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: rm -rf
should be enought here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure any more lol.
Will it work on your machine ?
Replaces manual dependency tracking with automated daily workflow that:
annuaire-entreprises-data-gouv-fr/search-infra
for new commitsKey improvements:
peerDependencies
pollution (now usesdata/.commit
file)degit
with clean TypeScript fetch scriptdegit
,npm-run-all2
)Like #1483 we down grade the data on purpose to ensure a update PR is created after merge