Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ name: bandit static checks
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Run bandit
run: |
python --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@ name: mypy
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Running mypy
run: |
python --version
python --version
python -m pip install --quiet --no-cache-dir --upgrade uv
uv run mypy --strict $(basename $(pwd)) tests
14 changes: 4 additions & 10 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,16 @@ name: pylint
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Running pylint
run: |
python --version
python -m pip install --quiet --no-cache-dir --upgrade uv
uv run ruff check $(basename $(pwd)) tests
python --version
python -m pip install --quiet --no-cache-dir --upgrade uv
uv run ruff check $(basename $(pwd)) tests
8 changes: 1 addition & 7 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ name: pytest
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Running pytest
run: |
python --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Shellcheck
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12
3.13
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-slim
FROM python:3.13-slim

########################################
# add a user so we're not running as root
Expand Down
2 changes: 1 addition & 1 deletion github_linter/fixes/dependabot/dependabot_auto_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
github-token: "${{ secrets.GITHUB_TOKEN }}"
alert-lookup: true
compat-lookup: true
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Approve a PR if not already approved

run: |
Expand Down
2 changes: 1 addition & 1 deletion github_linter/fixes/github_actions/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.4.2"
uses: mozilla-actions/sccache-action@v0.0.9
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ jobs:
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: actions/checkout@v5
- name: Run bandit
run: |
python --version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth:
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: actions/checkout@v5
- name: Running mypy
run: |
python --version
Expand Down
10 changes: 2 additions & 8 deletions github_linter/fixes/github_actions/templates/Python/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ name: pylint
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Python 3.12 # TODO: This should be template-able based on what's in pyproject
uses: actions/setup-python@v4
with:
python-version: "3.12" # TODO: This should be template-able based on what's in pyproject
- uses: actions/checkout@v5
- name: Running tests
run: |
python --version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: actions/checkout@v5
- name: Running pytest
run: |
python --version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
cargo_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install Rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ name: Run Shellcheck
"on":
push:
branches:
- main # Set a branch to deploy
- main
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
Expand Down
2 changes: 1 addition & 1 deletion github_linter/fixes/homebrew/homebrew_check_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: "Homebrew spec update checker"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Run the check script
run: bash homebrew_check_latest_release.sh

Expand Down
8 changes: 1 addition & 7 deletions github_linter/fixes/mkdocs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
uses: actions/checkout@v5
- name: Running mkdocs
run: |
python --version
Expand Down
6 changes: 3 additions & 3 deletions github_linter/tests/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import TypedDict

from github.PullRequest import PullRequest
from loguru import logger


Expand Down Expand Up @@ -44,9 +45,8 @@ def check_open_prs(
pulls = repo.repository.get_pulls("open")
repo_full_name = repo.repository.full_name
if pulls.totalCount:
logger.warning(
"There's {} PRs... listing at least the latest 10.", pulls.totalCount
)
logger.warning("There's {} PRs... listing at least the latest 10.", pulls.totalCount)
pull: PullRequest
for pull in pulls.reversed[:10]:
message = f"{repo_full_name} has an open PR: #{pull.number} - {pull.title} in {repo_full_name} (mergeable={pull.mergeable})"
repo.warning(CATEGORY, message)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[project]
version = "0.0.5"
version = "0.0.6"
name = "github_linter"
authors = [{ name = "James Hodgkinson", email = "james@terminaloutcomes.com" }]
classifiers = ["License :: OSI Approved :: MIT License"]
Expand All @@ -12,7 +12,7 @@ requires-python = ">=3.12"
dependencies = [
"aiosqlite>=0.20.0",
"click>=8.1.8",
"fastapi>=0.115.6",
"fastapi>=0.121.2",
"github3-py>=4.0.1",
"greenlet>=3.1.1",
"jinja2>=3.1.5",
Expand Down
Loading