smart-commit-tool 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smart_commit_tool-2.0.2/.github/workflows/smart_commit_ci.yml +68 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/PKG-INFO +1 -1
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/pyproject.toml +1 -1
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/constants.py +5 -6
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/.gitignore +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/LICENSE +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/README.md +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/README.ru.md +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/assets/demonstration.gif +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/cli.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/config.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/exceptions.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/logger.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/services/ci.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/services/git.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/services/security.py +0 -0
- {smart_commit_tool-2.0.0 → smart_commit_tool-2.0.2}/src/smart_commit/services/validator.py +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Smart Commit CI Pipeline
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main", "master", "prod", "release" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main", "master", "prod", "release" ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
# Runs the pipeline on multiple Python versions automatically
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout Repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
cache: 'pip' # Speeds up consecutive runs
|
|
27
|
+
|
|
28
|
+
- name: Install Dependencies (Adaptive Smart Installer)
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
|
|
32
|
+
echo "🔍 Detecting package manager..."
|
|
33
|
+
|
|
34
|
+
if [ -f "poetry.lock" ] || [ -f "pyproject.toml" ] && grep -q "tool.poetry" "pyproject.toml"; then
|
|
35
|
+
echo "🚀 Poetry detected!"
|
|
36
|
+
pip install poetry
|
|
37
|
+
# Force poetry to install globally so custom commands work without 'poetry run'
|
|
38
|
+
poetry config virtualenvs.create false
|
|
39
|
+
poetry install --no-interaction --no-ansi
|
|
40
|
+
|
|
41
|
+
elif [ -f "Pipfile.lock" ] || [ -f "Pipfile" ]; then
|
|
42
|
+
echo "🚀 Pipenv detected!"
|
|
43
|
+
pip install pipenv
|
|
44
|
+
pipenv install --system --dev
|
|
45
|
+
|
|
46
|
+
elif [ -f "pdm.lock" ] || [ -f "pyproject.toml" ] && grep -q "tool.pdm" "pyproject.toml"; then
|
|
47
|
+
echo "🚀 PDM detected!"
|
|
48
|
+
pip install pdm
|
|
49
|
+
pdm config python.use_venv false
|
|
50
|
+
pdm install
|
|
51
|
+
|
|
52
|
+
elif [ -f "requirements.txt" ]; then
|
|
53
|
+
echo "🚀 Standard requirements.txt detected!"
|
|
54
|
+
pip install -r requirements.txt
|
|
55
|
+
# Install package itself if setup.py exists
|
|
56
|
+
if [ -f "setup.py" ]; then pip install -e .; fi
|
|
57
|
+
|
|
58
|
+
elif [ -f "pyproject.toml" ]; then
|
|
59
|
+
echo "🚀 Standard PEP 621 pyproject.toml detected (Hatch, Flit, Setuptools)!"
|
|
60
|
+
# Attempt to install with dev dependencies if available, otherwise regular install
|
|
61
|
+
pip install -e .[dev] || pip install -e .
|
|
62
|
+
|
|
63
|
+
else
|
|
64
|
+
echo "⚠️ No known package manager found. Skipping dependency installation."
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
- name: Run 'ruff check .'
|
|
68
|
+
run: ruff check .
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "smart-commit-tool"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.2"
|
|
8
8
|
description = "Automated pre-push workflow manager with built-in code quality enforcement and smart branch protection."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -56,7 +56,6 @@ jobs:
|
|
|
56
56
|
strategy:
|
|
57
57
|
fail-fast: false
|
|
58
58
|
matrix:
|
|
59
|
-
# Runs the pipeline on multiple Python versions automatically
|
|
60
59
|
python-version: ["3.10", "3.11", "3.12"]
|
|
61
60
|
|
|
62
61
|
steps:
|
|
@@ -67,18 +66,20 @@ jobs:
|
|
|
67
66
|
uses: actions/setup-python@v5
|
|
68
67
|
with:
|
|
69
68
|
python-version: ${{ matrix.python-version }}
|
|
70
|
-
cache: 'pip'
|
|
69
|
+
cache: 'pip'
|
|
71
70
|
|
|
72
71
|
- name: Install Dependencies (Adaptive Smart Installer)
|
|
73
72
|
run: |
|
|
74
73
|
python -m pip install --upgrade pip
|
|
75
74
|
|
|
75
|
+
# Ensure local bin is in PATH for all subsequent steps
|
|
76
|
+
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
77
|
+
|
|
76
78
|
echo "🔍 Detecting package manager..."
|
|
77
79
|
|
|
78
80
|
if [ -f "poetry.lock" ] || [ -f "pyproject.toml" ] && grep -q "tool.poetry" "pyproject.toml"; then
|
|
79
81
|
echo "🚀 Poetry detected!"
|
|
80
82
|
pip install poetry
|
|
81
|
-
# Force poetry to install globally so __COMMANDS__ work without 'poetry run'
|
|
82
83
|
poetry config virtualenvs.create false
|
|
83
84
|
poetry install --no-interaction --no-ansi
|
|
84
85
|
|
|
@@ -96,12 +97,10 @@ jobs:
|
|
|
96
97
|
elif [ -f "requirements.txt" ]; then
|
|
97
98
|
echo "🚀 Standard requirements.txt detected!"
|
|
98
99
|
pip install -r requirements.txt
|
|
99
|
-
# Install package itself if setup.py exists
|
|
100
100
|
if [ -f "setup.py" ]; then pip install -e .; fi
|
|
101
101
|
|
|
102
102
|
elif [ -f "pyproject.toml" ]; then
|
|
103
|
-
echo "🚀 Standard PEP 621 pyproject.toml detected
|
|
104
|
-
# Attempt to install with dev dependencies if available, otherwise regular install
|
|
103
|
+
echo "🚀 Standard PEP 621 pyproject.toml detected!"
|
|
105
104
|
pip install -e .[dev] || pip install -e .
|
|
106
105
|
|
|
107
106
|
else
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|