Skip to content

Commit 5dce7f6

Browse files
authored
Merge pull request #1 from maelemiel/devdev
Devdev
2 parents c264b24 + b78ebf1 commit 5dce7f6

20 files changed

+595
-1725
lines changed

.github/workflows/extract-comments.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
# Permet aussi de lancer manuellement
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: write
16+
1417
jobs:
1518
extract-comments:
1619
runs-on: ubuntu-latest
@@ -19,6 +22,7 @@ jobs:
1922
- uses: actions/checkout@v3
2023
with:
2124
fetch-depth: 0 # Nécessaire pour git blame
25+
persist-credentials: true
2226

2327
- name: Set up Python
2428
uses: actions/setup-python@v4
@@ -28,21 +32,23 @@ jobs:
2832
- name: Install dependencies
2933
run: |
3034
python -m pip install --upgrade pip
31-
pip install python-dateutil
35+
pip install python-dateutil pyinstaller
3236
3337
- name: Extract comments
3438
run: |
35-
python ./scripts/extract_comments.py \
39+
make
40+
./extract_comments \
3641
--directory . \
3742
--output docs/todos/code_annotations.md \
3843
--json-output docs/todos/code_annotations.json \
3944
--repo-url https://github.com/${{ github.repository }} \
4045
--exclude node_modules .git dist build
4146
4247
- name: Commit changes
48+
if: github.event_name != 'pull_request'
4349
run: |
4450
git config --global user.name 'GitHub Actions'
4551
git config --global user.email 'actions@github.com'
4652
git add docs/todos/code_annotations.md docs/todos/code_annotations.json
4753
git diff --quiet && git diff --staged --quiet || git commit -m "Update code annotations report"
48-
git push
54+
git push origin HEAD:${GITHUB_REF#refs/heads/}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,7 @@ cython_debug/
172172

173173
# PyPI configuration file
174174
.pypirc
175+
176+
177+
examples/
178+
extract_comments

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ NAME = extract_comments
22
SRC = __main__.py
33

44
run:
5-
python3 $(SRC) $(ARGS)
6-
7-
build:
8-
pyinstaller --onefile -n $(NAME) $(SRC)
5+
pyinstaller --onefile -n extract_comments --add-data "src/report_html.py:." __main__.py
6+
@cp dist/$(NAME) ../$(NAME)
97

108
clean:
119
rm -rf build dist __pycache__ *.spec
1210

13-
.PHONY: run build clean
11+
.PHONY: run clean

0 commit comments

Comments
 (0)