From 9a66ff7f1702cf87e5e831599cc3499f28c51968 Mon Sep 17 00:00:00 2001 From: william Date: Sat, 31 Oct 2026 11:03:24 +0100 Subject: [PATCH] fix(ci): trigger only on pull_request, the only point that can still block a merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A push to develop/main runs after the fact for direct pushes, and a push to main specifically only happens once Gitea has already created the merge commit — too late to gate anything. The only trigger that runs before the "Merge" button becomes clickable is pull_request. Simplifies the previous push-only setup (which technically also worked via SHA-based status checks, but was confusing to reason about) down to the one trigger that matches intent directly. Note: the required status check name on main's branch protection will need updating in the Gitea UI to match the new context (something like "CI / quality (pull_request)" instead of "CI / quality (push)"). Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d54e1e6..385a31f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,13 +1,11 @@ name: CI on: - # Un seul declenchement par commit : la protection de branche sur main verifie le statut du - # commit exact en tete de la PR (par SHA, peu importe l'evenement qui l'a produit), donc le - # trigger "push" suffit deja a bloquer la fusion tant que ce commit n'est pas vert. Le trigger - # "pull_request" produirait un second run redondant pour le meme commit (contexte de statut - # different, non verifie par la regle de protection "CI / quality (push)"). - push: - branches: [develop, main] + # Tourne uniquement sur la Pull Request, avant le clic sur "Merge" (seul moment ou un check peut + # encore bloquer la fusion). Un "push" sur main declenche par le merge lui-meme arriverait trop + # tard pour bloquer quoi que ce soit. + pull_request: + branches: [main] jobs: quality: