repowarden 4.11.0 → 4.11.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/garde +11 -0
- package/hooks/lib/i18n/en.sh +1 -0
- package/hooks/lib/i18n/fr.sh +1 -0
- package/package.json +1 -1
package/bin/garde
CHANGED
|
@@ -193,6 +193,17 @@ verifier_git() {
|
|
|
193
193
|
[ -n "$amend" ] && [ -n "$noedit" ] && exit 0
|
|
194
194
|
refuser garde.commit "$ligne"
|
|
195
195
|
;;
|
|
196
|
+
push)
|
|
197
|
+
for mot in ${args_git[@]+"${args_git[@]}"}; do
|
|
198
|
+
case "$mot" in
|
|
199
|
+
# Force push : réécrit l'historique distant partagé (AGENTS.md l'interdit).
|
|
200
|
+
# Options courtes groupées : -f (-uf…) ; refspec forcé : +branche
|
|
201
|
+
--force | --force-with-lease | --force-with-lease=* | --force-if-includes | +*)
|
|
202
|
+
refuser garde.force_push "$ligne" ;;
|
|
203
|
+
-[!-]*) [[ "$mot" != *f* ]] || refuser garde.force_push "$ligne" ;;
|
|
204
|
+
esac
|
|
205
|
+
done
|
|
206
|
+
;;
|
|
196
207
|
cc)
|
|
197
208
|
lecture_seule ${args_git[@]+"${args_git[@]}"} || verifier_commit "$ligne"
|
|
198
209
|
;;
|
package/hooks/lib/i18n/en.sh
CHANGED
|
@@ -723,6 +723,7 @@ _msg_en() {
|
|
|
723
723
|
garde.branche) _M="command refused: \"%s\" creates a branch; here, branches come from tickets.\n → repowarden ticket <n>" ;;
|
|
724
724
|
garde.commit) _M="command refused: \"%s\"; commits go through the assistant (only --amend --no-edit is allowed).\n → repowarden cc -m \"<description>\" --refs \"Ticket : #<n>\"" ;;
|
|
725
725
|
garde.no_verify) _M="command refused: \"%s\" bypasses the repowarden hooks.\n → Run it again without --no-verify and fix what the hooks report." ;;
|
|
726
|
+
garde.force_push) _M="command refused: \"%s\" forces the push and rewrites the history already pushed.\n → Fix it with a new commit (repowarden cc …), then git push without forcing." ;;
|
|
726
727
|
garde.add_tout) _M="command refused: \"%s\" adds the whole repository.\n → Add files one by one: git add <files>" ;;
|
|
727
728
|
garde.sans_hooks) _M="command refused: \"%s\"; the repowarden hooks are not active in this repository (messages, secrets and formatting would not be checked).\n → Activate them: repowarden install (or repowarden install --global), then run it again." ;;
|
|
728
729
|
garde.commit_protegee) _M="command refused: \"%s\"; \"%s\" is a protected branch, the commit would be refused there.\n → Work on a ticket's branch: repowarden ticket <n>, then run it again." ;;
|
package/hooks/lib/i18n/fr.sh
CHANGED
|
@@ -724,6 +724,7 @@ _msg_fr() {
|
|
|
724
724
|
garde.branche) _M="commande refusée : « %s » crée une branche ; ici, la branche naît du ticket.\n → repowarden ticket <n>" ;;
|
|
725
725
|
garde.commit) _M="commande refusée : « %s » ; les commits passent par l'assistant (seul --amend --no-edit est permis).\n → repowarden cc -m \"<description>\" --refs \"Ticket : #<n>\"" ;;
|
|
726
726
|
garde.no_verify) _M="commande refusée : « %s » contourne les hooks repowarden.\n → Relancer sans --no-verify et corriger ce que les hooks signalent." ;;
|
|
727
|
+
garde.force_push) _M="commande refusée : « %s » force le push et réécrit l'historique déjà poussé.\n → Corriger par un nouveau commit (repowarden cc …), puis git push sans forcer." ;;
|
|
727
728
|
garde.add_tout) _M="commande refusée : « %s » ajoute tout le dépôt.\n → Ajouter les fichiers un par un : git add <fichiers>" ;;
|
|
728
729
|
garde.sans_hooks) _M="commande refusée : « %s » ; les hooks repowarden ne sont pas actifs dans ce dépôt (messages, secrets et formatage ne seraient pas vérifiés).\n → Les activer : repowarden install (ou repowarden install --global), puis relancer." ;;
|
|
729
730
|
garde.commit_protegee) _M="commande refusée : « %s » ; « %s » est une branche protégée, le commit y serait refusé.\n → Travailler sur la branche d'un ticket : repowarden ticket <n>, puis relancer." ;;
|
package/package.json
CHANGED