From 3f26ce0ec2002623f0f9c4a85726468b427146d5 Mon Sep 17 00:00:00 2001 From: benslimane-byte Date: Thu, 11 Jun 2026 14:03:23 +0200 Subject: [PATCH 1/4] feat: add additional notes to the GitHub Actions documentation --- notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.md b/notes.md index 2c821cd..1f511cb 100644 --- a/notes.md +++ b/notes.md @@ -1 +1 @@ -# Mon TP GitHub Actions +# Mon TP GitHub Actions ! From 0e0bb3485c26adbf7c3049bc5b79f6ee87c3f9c9 Mon Sep 17 00:00:00 2001 From: benslimane-byte Date: Thu, 11 Jun 2026 14:39:27 +0200 Subject: [PATCH 2/4] feat: add /logs/stats endpoint and corresponding unit test --- ressources/app.py | 9 +++++++++ ressources/test_app.py | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/ressources/app.py b/ressources/app.py index d7e75f2..eee358d 100644 --- a/ressources/app.py +++ b/ressources/app.py @@ -38,5 +38,14 @@ def logs_critical(): return jsonify({"critical_count": seuil, "alerte": alerte}) +@app.route("/logs/stats") +def logs_stats(): + total = sum(LOG_SUMMARY.values()) + return jsonify({ + "total": total, + "breakdown": LOG_SUMMARY + }) + + if __name__ == "__main__": app.run(debug=True, port=5001) diff --git a/ressources/test_app.py b/ressources/test_app.py index ce56a43..a886678 100644 --- a/ressources/test_app.py +++ b/ressources/test_app.py @@ -57,3 +57,13 @@ def test_logs_critical_alerte(client): assert "critical_count" in data assert "alerte" in data assert data["alerte"] is True + + +def test_logs_stats(client): + """La route /logs/stats retourne le total et le détail.""" + response = client.get("/logs/stats") + assert response.status_code == 200 + data = response.get_json() + assert "total" in data + assert "breakdown" in data + assert data["total"] == 185 # 142 + 28 + 12 + 3 From 1b3235cc8e922a541e1541a4424df974ea90661f Mon Sep 17 00:00:00 2001 From: benslimane-byte Date: Thu, 11 Jun 2026 14:39:50 +0200 Subject: [PATCH 3/4] chore: update compiled Python bytecode files in __pycache__ --- ressources/__pycache__/app.cpython-314.pyc | Bin 1673 -> 2033 bytes .../test_app.cpython-314-pytest-8.2.0.pyc | Bin 10552 -> 12753 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/ressources/__pycache__/app.cpython-314.pyc b/ressources/__pycache__/app.cpython-314.pyc index 9c6bb8fbb623dd55e32759029b312973982207a7..8a104e18b245ab298a3704c9f4e083497c5ee11f 100644 GIT binary patch delta 443 zcmeC={m9R!&Bx2d00drZw6c^~Ch|!z#!OWIHu0cXD4z)YOh+mw+1j1w};fZAl z60nG1U`P>TV31*mWet#qN+D4}f?`?`SAMFFMD0xFkzR2y9Ha0}hw z;GZCRgF|>q^aoaE5w_0^%slKL7?@evC(E#^G4f4zX7yw$Ql8w&s>G!WGzMf<@yp3u mSvSitv9?P#N_N;@W|aKM#LCG2nVEq}>H~=NL11z^n-Tz(X;OLs delta 126 zcmey!-^t6T&Bx2d00c`j6tfDLC-O-!>P=MtX3G-9XA!}`kRrywAj1&L8XyT$g9?K9 zg9L&E&6yyg@(e*j%3!Q1yt#w%IP>ImHbq9>$(?MTldrSMbEyNBF#>V%nMv%MCtqM! F1OOzt7G(ec diff --git a/ressources/__pycache__/test_app.cpython-314-pytest-8.2.0.pyc b/ressources/__pycache__/test_app.cpython-314-pytest-8.2.0.pyc index b3576dfa74af7b212b02087efb60ef786e756c99..8f93bd206a0b24af1a42295be79d6c889674c55b 100644 GIT binary patch delta 606 zcmdlHbTOGvn~#@^0SNNfXl4CipU5Y{*f3GOiknlMp+q2vQJF!LYvZy6RmNYF+11P# zS5CH5Gh&Shini<`VVpn#(arM}D;eP&d1XgNK~5bhm?;bl1sriZCp)rOateXfi-osL zUZ`l!$UpfZt0gOUkU)^&WOdbe5Ajk{pdOz@g`)h@l2ir#oc#1+{o<0ul46CT)RO$t zqP$dvoK%I9{F1~Rh13!dJLT}olElm$y((@b)ss)CDyXu8l@$pCO)Rnk5xOA414!KB zOe#uE%udNK&zmf-CMQ_r1(J~l5i%gcXYw93X&wHO)Z&tOkQ3s;PACcj%Gm*Nu^ljo z8WTZlX-=wLQ5291iuhum$uBir`9F!UGb()n I5(;3|0IZv#p#T5? delta 130 zcmcbZyd#KDn~#@^0SK06C}wS7o5&}@ST#|-ij`5BL6dXingmtGs>!@+W{jGXUDV8& zG Date: Thu, 11 Jun 2026 15:20:19 +0200 Subject: [PATCH 4/4] feat: update CODEOWNERS to clarify review requirements and approvals --- .github/CODEOWNERS | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7197fee..17d1891 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,14 +1,8 @@ -# Syntaxe : <@utilisateur ou @org/équipe> +# Tout changement requiert une approbation de votre binôme +* @benslimane-byte @bambstk -# Par défaut : tout changement requiert une review de ces personnes -* @ +# Les workflows ne peuvent être modifiés qu'avec validation des deux +.github/workflows/ @benslimane-byte @bambstk -# Les workflows CI/CD ne peuvent être modifiés que par le lead DevOps -.github/workflows/ @ - -# Le fichier de dépendances requiert une validation technique -ressources/requirements.txt @ - -# Les fichiers de sécurité requièrent une double validation -.github/dependabot.yml @ -.github/CODEOWNERS @ +# Le code applicatif +ressources/ @benslimane-byte @bambstk