Skip to content

Merge pull request #1 from maelemiel/devdev #21

Merge pull request #1 from maelemiel/devdev

Merge pull request #1 from maelemiel/devdev #21

name: Extract Code Annotations
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
# Exécute automatiquement tous les lundis à 9h00
schedule:
- cron: '0 9 * * 1'
# Permet aussi de lancer manuellement
workflow_dispatch:
permissions:
contents: write
jobs:
extract-comments:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Nécessaire pour git blame
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install python-dateutil pyinstaller
- name: Extract comments
run: |
make
./extract_comments \
--directory . \
--output docs/todos/code_annotations.md \
--json-output docs/todos/code_annotations.json \
--repo-url https://github.com/${{ github.repository }} \
--exclude node_modules .git dist build
- name: Commit changes
if: github.event_name != 'pull_request'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add docs/todos/code_annotations.md docs/todos/code_annotations.json
git diff --quiet && git diff --staged --quiet || git commit -m "Update code annotations report"
git push origin HEAD:${GITHUB_REF#refs/heads/}