repowarden 4.8.3 → 4.8.4-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bots +6 -3
- package/bin/proteger +10 -0
- package/hooks/lib/i18n/en.sh +2 -0
- package/hooks/lib/i18n/fr.sh +2 -0
- package/package.json +1 -1
package/bin/bots
CHANGED
|
@@ -80,7 +80,7 @@ t bots.flow_question
|
|
|
80
80
|
printf '%s\n' "$REPLY" >&2
|
|
81
81
|
t bots.flow_main "$PRINCIPALE"
|
|
82
82
|
printf ' 1) %s\n' "$REPLY" >&2
|
|
83
|
-
t bots.flow_develop "$PRINCIPALE"
|
|
83
|
+
t bots.flow_develop "$PRINCIPALE" "$PRINCIPALE"
|
|
84
84
|
printf ' 2) %s\n' "$REPLY" >&2
|
|
85
85
|
# develop → main par défaut : seul develop entre dans main
|
|
86
86
|
choix_flux=2
|
|
@@ -90,8 +90,9 @@ case "${reponse:-$choix_flux}" in
|
|
|
90
90
|
*) FLUX=main; INTEGRATION="" ;;
|
|
91
91
|
esac
|
|
92
92
|
CREER_DEVELOP=""
|
|
93
|
+
# Nom renvoyé comparé : sur une 404, gh écrit le corps de l'erreur sur stdout
|
|
93
94
|
if [ "$FLUX" = develop ] &&
|
|
94
|
-
[
|
|
95
|
+
[ "$(gh api "repos/$REPO/branches/$INTEGRATION" --jq .name 2>/dev/null || true)" != "$INTEGRATION" ]; then
|
|
95
96
|
if demander bots.ask_create_develop o; then
|
|
96
97
|
CREER_DEVELOP=1
|
|
97
98
|
else
|
|
@@ -332,7 +333,9 @@ if [ -n "$CREER_DEVELOP" ]; then
|
|
|
332
333
|
fi
|
|
333
334
|
if [ "$FLUX" = develop ]; then
|
|
334
335
|
conf="$GIT_TOPLEVEL/.repowarden.conf"
|
|
335
|
-
git config
|
|
336
|
+
# Valeur déjà en place : fichier laissé tel quel (git config le réindenterait)
|
|
337
|
+
[ "$(git config -f "$conf" --get repowarden.integrationBranch || true)" = "$INTEGRATION" ] ||
|
|
338
|
+
git config -f "$conf" repowarden.integrationBranch "$INTEGRATION"
|
|
336
339
|
git config -f "$conf" --get repowarden.protectedBranches >/dev/null ||
|
|
337
340
|
git config -f "$conf" repowarden.protectedBranches "$PRINCIPALE $INTEGRATION"
|
|
338
341
|
if [ -z "$AVEC_APP" ]; then
|
package/bin/proteger
CHANGED
|
@@ -84,6 +84,16 @@ for b in $protected; do
|
|
|
84
84
|
[ "$(gh api "repos/$REPO/branches/$b" --jq .name 2>/dev/null)" = "$b" ] && existing="$existing $b"
|
|
85
85
|
done
|
|
86
86
|
[ -n "$existing" ] || { err_t ci.proteger.no_branch "$protected" "$REPO"; exit 1; }
|
|
87
|
+
# Branche d'intégration absente : arrêt avant toute modification (GitHub
|
|
88
|
+
# refuserait une branche par défaut inexistante, réglages posés à moitié)
|
|
89
|
+
if [ -n "$integration" ] &&
|
|
90
|
+
[ "$(gh api "repos/$REPO/branches/$integration" --jq .name 2>/dev/null)" != "$integration" ]; then
|
|
91
|
+
principale=main
|
|
92
|
+
for b in $existing; do [ "$b" = "$integration" ] || { principale="$b"; break; }; done
|
|
93
|
+
err_t ci.proteger.no_integration "$integration" "$REPO"
|
|
94
|
+
dim_t ci.proteger.no_integration_hint "$principale" "$integration"
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
87
97
|
|
|
88
98
|
# Vérifications séparées par des virgules : un nom de job peut contenir des
|
|
89
99
|
# espaces (« tests (ubuntu-latest) »)
|
package/hooks/lib/i18n/en.sh
CHANGED
|
@@ -288,6 +288,8 @@ _msg_en() {
|
|
|
288
288
|
ci.proteger.automerge_invalid) _M="autoMergeWork: true or false." ;;
|
|
289
289
|
ci.proteger.unattributed_invalid) _M="unattributedApproval: true or false." ;;
|
|
290
290
|
ci.proteger.no_branch) _M="None of the branches \"%s\" exists on %s." ;;
|
|
291
|
+
ci.proteger.no_integration) _M="Integration branch \"%s\" missing on %s: nothing was changed." ;;
|
|
292
|
+
ci.proteger.no_integration_hint) _M=" Create it from the main branch: git push origin %s:refs/heads/%s (or repowarden bots), then run again." ;;
|
|
291
293
|
ci.proteger.no_cleanup) _M="Automatic branch deletion disabled (it would delete develop): add a workflow calling nettoyage-branches.yml, otherwise merged branches remain (see In an organisation)." ;;
|
|
292
294
|
ci.proteger.no_delivery_env) _M="main will require a successful \"%s\" deployment, but no workflow creates that deployment: a deployment nothing creates would block main forever. Call release-auto.yml with delivery-environment (see docs/releases.md, develop flow), or set deliveryApproval = review in .repowarden.conf." ;;
|
|
293
295
|
ci.proteger.stale_concurrency) _M="%s: a pending delivery request (manual or scheduled) would silently block the next ones. Set cancel-in-progress: \${{ github.event_name != 'push' }} (a new request replaces the pending one) and one group per trigger: release-\${{ github.ref_name }}-\${{ github.event.schedule || github.event_name }}." ;;
|
package/hooks/lib/i18n/fr.sh
CHANGED
|
@@ -288,6 +288,8 @@ _msg_fr() {
|
|
|
288
288
|
ci.proteger.automerge_invalid) _M="autoMergeWork : true ou false." ;;
|
|
289
289
|
ci.proteger.unattributed_invalid) _M="unattributedApproval : true ou false." ;;
|
|
290
290
|
ci.proteger.no_branch) _M="Aucune des branches « %s » n'existe sur %s." ;;
|
|
291
|
+
ci.proteger.no_integration) _M="Branche d'intégration « %s » absente de %s : rien n'a été modifié." ;;
|
|
292
|
+
ci.proteger.no_integration_hint) _M=" La créer depuis la branche principale : git push origin %s:refs/heads/%s (ou repowarden bots), puis relancer." ;;
|
|
291
293
|
ci.proteger.no_cleanup) _M="Suppression automatique des branches désactivée (elle supprimerait develop) : ajouter un workflow qui appelle nettoyage-branches.yml, sinon les branches mergées restent (voir En organisation)." ;;
|
|
292
294
|
ci.proteger.no_delivery_env) _M="main exigera un déploiement « %s » réussi, mais aucun workflow ne crée ce déploiement : un déploiement que rien ne crée bloquerait main pour toujours. Appeler release-auto.yml avec delivery-environment (voir docs/releases.md, flux develop), ou deliveryApproval = review dans .repowarden.conf." ;;
|
|
293
295
|
ci.proteger.stale_concurrency) _M="%s : une demande de livraison (manuelle ou planifiée) en attente bloquerait en silence les suivantes. Mettre cancel-in-progress: \${{ github.event_name != 'push' }} (une nouvelle demande remplace celle en attente) et un groupe par déclencheur : release-\${{ github.ref_name }}-\${{ github.event.schedule || github.event_name }}." ;;
|
package/package.json
CHANGED