Skip to content

add new basic message function for gw alert notification #68

add new basic message function for gw alert notification

add new basic message function for gw alert notification #68

Workflow file for this run

name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Python version from pyproject.toml
id: get-python-version
run: |
PYTHON_VERSION=$(grep '^requires-python' pyproject.toml | grep -oP '[0-9]+\.[0-9]+')
echo "Python version found: $PYTHON_VERSION"
echo "python-version=$PYTHON_VERSION" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ steps.get-python-version.outputs.python-version }}
- name: Install system dependencies (for pylint)
run: |
sudo apt-get update
sudo apt-get install -y pylint
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
- name: Fail if files were modified
run: |
if ! git diff --quiet; then
echo "pre-commit hooks modified files. Please run pre-commit locally and commit the changes."
git diff
exit 1
fi