Skip to content

Fix project name capitalization in README #2132

Fix project name capitalization in README

Fix project name capitalization in README #2132

name: Suivi des phases d'intégration
on:
issues:
types: [opened, closed, reopened, labeled, unlabeled]
pull_request:
types: [opened, closed, reopened]
workflow_dispatch:
permissions:
issues: read
pull-requests: read
contents: read
jobs:
rapport-phases:
name: Rapport d'avancement par phase
# Runners maison (groupe maison, Ubuntu 20.04, root) ; repli GitHub :
# variable NETCROSS_RUNS_ON_LEGER = '"ubuntu-latest"'.
runs-on: ${{ fromJSON(vars.NETCROSS_RUNS_ON_LEGER || '{"group":"maison","labels":["self-hosted","linux"]}') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Vérifier les fichiers de suivi
run: |
echo "## Vérification des fichiers de suivi" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
for f in docs/roadmap.md docs/issues-summary.md docs/features-backlog.md; do
if [ -f "$f" ]; then
echo "✅ \`$f\` présent" >> "$GITHUB_STEP_SUMMARY"
else
echo "⚠️ \`$f\` manquant" >> "$GITHUB_STEP_SUMMARY"
fi
done
- name: Générer le rapport d'avancement
uses: actions/github-script@v7
with:
script: |
const { data: openIssues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
per_page: 100
});
const { data: closedIssues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed',
per_page: 100
});
// Détecter les labels de priorité présents
const priorityLabels = ['P0-fondations', 'P1-différenciation', 'P2-exploitation', 'P3-applicatif', 'P4-admin', 'haute', 'moyenne', 'faible', 'bloqué', 'décision-produit'];
const priorityCounts = {};
for (const label of priorityLabels) {
priorityCounts[label] = openIssues.filter(i => i.labels.some(l => l.name === label)).length;
}
const diffLabels = ['diff-1-faible', 'diff-2-moyenne', 'diff-3-notable', 'diff-4-elevee', 'diff-5-expert'];
const diffCounts = {};
for (const label of diffLabels) {
diffCounts[label] = openIssues.filter(i => i.labels.some(l => l.name === label)).length;
}
const noPriority = openIssues.filter(i =>
!i.labels.some(l => priorityLabels.includes(l.name))
);
let prs = [];
try {
const prResult = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
prs = prResult.data;
} catch (e) {
// ignore
}
const lines = [];
lines.push(`## Rapport d'avancement — ${context.repo.owner}/${context.repo.repo}`);
lines.push('');
lines.push(`**Date** : ${new Date().toISOString()}`);
lines.push(`**Déclencheur** : ${context.eventName}`);
lines.push('');
lines.push("### Vue d'ensemble");
lines.push('');
lines.push('| Métrique | Valeur |');
lines.push('|----------|--------|');
lines.push(`| Issues ouvertes | ${openIssues.length} |`);
lines.push(`| Issues closes | ${closedIssues.length} |`);
lines.push(`| PRs ouvertes | ${prs.length} |`);
lines.push('');
// Section priorité
const activePriorities = priorityLabels.filter(l => priorityCounts[l] > 0);
if (activePriorities.length > 0) {
lines.push('### Issues ouvertes par priorité');
lines.push('');
lines.push('| Priorité | Nombre |');
lines.push('|----------|--------|');
for (const l of activePriorities) {
lines.push(`| ${l} | ${priorityCounts[l]} |`);
}
lines.push(`| Sans priorité | ${noPriority.length} |`);
lines.push('');
}
// Section difficulté
const activeDiffs = diffLabels.filter(l => diffCounts[l] > 0);
if (activeDiffs.length > 0) {
lines.push('### Issues ouvertes par difficulté');
lines.push('');
lines.push('| Difficulté | Nombre |');
lines.push('|------------|--------|');
for (const l of activeDiffs) {
lines.push(`| ${l} | ${diffCounts[l]} |`);
}
lines.push('');
}
if (noPriority.length > 0) {
lines.push('### Issues sans priorité');
lines.push('');
for (const i of noPriority) {
lines.push(`- #${i.number}: ${i.title}`);
}
lines.push('');
}
if (prs.length > 0) {
lines.push('### PRs ouvertes');
lines.push('');
for (const p of prs) {
lines.push(`- #${p.number}: ${p.title} (${p.head.ref})`);
}
lines.push('');
}
const fs = require('fs');
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, lines.join('\n') + '\n');