3 Commits

Author SHA1 Message Date
8dc74aed03 fix(pushover): add optional_int function, return None for empty strings and update priority argument type (#5)
All checks were successful
Release / Create Release (push) Successful in 29s
Release / Print Release (push) Successful in 1s
Reviewed-on: #5
2026-03-13 20:49:44 +00:00
d4aab75f9c Update renovate.json
All checks were successful
Release / Create Release (push) Successful in 19s
Release / Print Release (push) Successful in 2s
2025-10-30 20:17:05 +00:00
1ffa7f927b Update python Docker tag to v3.14
Some checks failed
Conventional Commit / validate_pr_title (pull_request) Failing after 4s
Release / Create Release (push) Successful in 1m3s
Release / Print Release (push) Successful in 5s
2025-10-07 21:46:12 +00:00
4 changed files with 19 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
name: Conventional Commit name: Validate PR Title
on: on:
pull_request: pull_request:
types: types:
@@ -8,7 +8,9 @@ on:
- reopened - reopened
jobs: jobs:
validate_pr_title: validate:
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/conventional-commit.yml@main runs-on: ubuntu-latest
with: steps:
commit_message: ${{ gitea.event.pull_request.title }} - uses: https://git.tainton.uk/actions/conventional-commits-check-action@v1.3.0
with:
commit-message: ${{ gitea.event.pull_request.title }}

View File

@@ -1,4 +1,4 @@
FROM python:3.13-slim FROM python:3.14-slim
LABEL maintainer="Luke Tainton <luke@tainton.uk>" LABEL maintainer="Luke Tainton <luke@tainton.uk>"
WORKDIR /home WORKDIR /home
COPY . . COPY . .

View File

@@ -4,6 +4,12 @@ import argparse
import requests import requests
def optional_int(value):
"""Convert string to int, treating empty strings as None"""
if value == '':
return None
return int(value)
def get_args(): def get_args():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--message', type=str, help='Message text') parser.add_argument('--message', type=str, help='Message text')
@@ -11,7 +17,7 @@ def get_args():
parser.add_argument('--url', type=str, help='Supplementary URL to show with your message') parser.add_argument('--url', type=str, help='Supplementary URL to show with your message')
parser.add_argument('--url_title', type=str, help='title for your supplementary URL, otherwise just the URL is shown') parser.add_argument('--url_title', type=str, help='title for your supplementary URL, otherwise just the URL is shown')
parser.add_argument('--device', type=str, help='Device name to send the message directly to') parser.add_argument('--device', type=str, help='Device name to send the message directly to')
parser.add_argument('--priority', type=int, help='Notification priority (low-to-high: -2 to 1)') parser.add_argument('--priority', type=optional_int, help='Notification priority (low-to-high: -2 to 1)')
parser.add_argument('--sound', type=str, help='The name of a supported sound (https://pushover.net/api#sounds; custom sounds are supported)') parser.add_argument('--sound', type=str, help='The name of a supported sound (https://pushover.net/api#sounds; custom sounds are supported)')
args = parser.parse_args() args = parser.parse_args()
return args return args
@@ -48,7 +54,7 @@ def main():
if device: if device:
payload['device'] = device payload['device'] = device
if priority: if priority:
payload['priority'] = priority payload['priority'] = str(priority)
if sound: if sound:
payload['sound'] = sound payload['sound'] = sound

View File

@@ -8,6 +8,9 @@
"platformCommit": "enabled", "platformCommit": "enabled",
"rebaseWhen": "behind-base-branch", "rebaseWhen": "behind-base-branch",
"rollbackPrs": true, "rollbackPrs": true,
"semanticCommits": "enabled",
"semanticCommitScope": "deps",
"semanticCommitType": "feat",
"vulnerabilityAlerts": { "vulnerabilityAlerts": {
"commitMessagePrefix": "[SECURITY] ", "commitMessagePrefix": "[SECURITY] ",
"enabled": true, "enabled": true,