Skip to content

chore: simplification du remplissage des issues et des pull requests + nouveaux workflows + fixs extentions de fichiers incorrects #922

chore: simplification du remplissage des issues et des pull requests + nouveaux workflows + fixs extentions de fichiers incorrects

chore: simplification du remplissage des issues et des pull requests + nouveaux workflows + fixs extentions de fichiers incorrects #922

Workflow file for this run

name: Checks (TypeScript + ESLint)
on:
pull_request:
branches: [ "main" ]
jobs:
lint:
permissions: write-all
name: 🛠️ TypeScript and ESLint
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v3
- name: ⚙️ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: 💾 Install dependencies
run: npm ci
- name: 🔍 Run TypeScript and ESLint checks
id: lint
run: |
npm run lint > lint.log 2>&1
continue-on-error: true
- name: 👁️‍🗨️ Comment on Pull Request
if: steps.lint.outcome == 'failure'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const lintLogContent = fs.readFileSync('lint.log', 'utf8');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `⚠️ Erreur(s) détectée(s) par TypeScript/ESLint !\n\`\`\`\n${lintLogContent}\n\`\`\``
});
- name: 🧹 Clean up
if: always()
run: rm -f lint.log