fix: use gitleaks CLI instead of licensed action, fix lint errors
Some checks failed
Some checks failed
- Replace gitleaks-action (requires paid license) with direct CLI invocation -- same engine, no license needed - Fix ruff I001 import sorting in voice.py and test_llm.py - Remove unused imports: _chat_request (test_llm), Path (test_music) - Remove unused assignment: original_spawn (test_voice) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: gitleaks/gitleaks-action@v2
|
- name: Install gitleaks
|
||||||
env:
|
run: |
|
||||||
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
|
curl -sSL https://github.com/gitleaks/gitleaks/releases/latest/download/gitleaks_8.24.3_linux_x64.tar.gz \
|
||||||
|
| tar xz -C /usr/local/bin gitleaks
|
||||||
|
- name: Scan for secrets
|
||||||
|
run: gitleaks detect --source . --verbose
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import wave
|
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
import wave
|
||||||
|
|
||||||
from derp.http import urlopen as _urlopen
|
from derp.http import urlopen as _urlopen
|
||||||
from derp.plugin import command
|
from derp.plugin import command
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ from plugins.llm import ( # noqa: E402
|
|||||||
_COOLDOWN,
|
_COOLDOWN,
|
||||||
_MAX_HISTORY,
|
_MAX_HISTORY,
|
||||||
_MAX_REPLY_LEN,
|
_MAX_REPLY_LEN,
|
||||||
_chat_request,
|
|
||||||
_check_cooldown,
|
_check_cooldown,
|
||||||
_extract_reply,
|
_extract_reply,
|
||||||
_get_api_key,
|
_get_api_key,
|
||||||
@@ -35,7 +34,6 @@ from plugins.llm import ( # noqa: E402
|
|||||||
cmd_chat,
|
cmd_chat,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# -- Helpers -----------------------------------------------------------------
|
# -- Helpers -----------------------------------------------------------------
|
||||||
|
|
||||||
class _FakeState:
|
class _FakeState:
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import asyncio
|
|||||||
import importlib.util
|
import importlib.util
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
# -- Load plugin module directly ---------------------------------------------
|
# -- Load plugin module directly ---------------------------------------------
|
||||||
|
|||||||
@@ -182,7 +182,6 @@ class TestSayCommand:
|
|||||||
msg = _Msg(text="!say hello world")
|
msg = _Msg(text="!say hello world")
|
||||||
|
|
||||||
spawned = []
|
spawned = []
|
||||||
original_spawn = bot._spawn
|
|
||||||
|
|
||||||
def track_spawn(coro, *, name=None):
|
def track_spawn(coro, *, name=None):
|
||||||
spawned.append(name)
|
spawned.append(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user