mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 17:31:03 +01:00
fix: auto-fix linting issues
This commit is contained in:
committed by
github-actions[bot]
parent
b8ad99cc82
commit
769d9bf0a6
@@ -4,11 +4,11 @@
|
|||||||
- Minor bugs fixed
|
- Minor bugs fixed
|
||||||
## 2025.08.16 (20-08-2025)
|
## 2025.08.16 (20-08-2025)
|
||||||
- Cleaned code and clarify new options
|
- Cleaned code and clarify new options
|
||||||
- Add interactive chart option : #107
|
- Add interactive chart option : #107
|
||||||
- New plot : #105
|
- New plot : #105
|
||||||
- Add species management tools : #104
|
- Add species management tools : #104
|
||||||
- Add species confirmation option to recordings : #102
|
- Add species confirmation option to recordings : #102
|
||||||
- Add selectable duration mini-graphs for species pages : #101
|
- Add selectable duration mini-graphs for species pages : #101
|
||||||
|
|
||||||
## 2025.08.15 (20-08-2025)
|
## 2025.08.15 (20-08-2025)
|
||||||
- Minor bugs fixed
|
- Minor bugs fixed
|
||||||
|
|||||||
@@ -2,80 +2,81 @@
|
|||||||
set -e
|
set -e
|
||||||
update=yes
|
update=yes
|
||||||
if [[ "$update" = "yes" ]]; then
|
if [[ "$update" = "yes" ]]; then
|
||||||
repo="https://github.com/alexbelgium/BirdNET-Pi.git"
|
repo="https://github.com/alexbelgium/BirdNET-Pi.git"
|
||||||
# repo="https://github.com/Nachtzuster/BirdNET-Pi.git"
|
# repo="https://github.com/Nachtzuster/BirdNET-Pi.git"
|
||||||
branch="main"
|
branch="main"
|
||||||
echo "Update with $branch of $repo"
|
echo "Update with $branch of $repo"
|
||||||
|
|
||||||
temp_dir="$(mktemp -d)"
|
temp_dir="$(mktemp -d)"
|
||||||
target_dir="/home/${USER:-pi}/BirdNET-Pi"
|
target_dir="/home/${USER:-pi}/BirdNET-Pi"
|
||||||
|
|
||||||
# Parse owner/repo from the URL
|
# Parse owner/repo from the URL
|
||||||
_url_no_git="${repo%.git}"
|
_url_no_git="${repo%.git}"
|
||||||
_path="${_url_no_git#https://github.com/}"
|
_path="${_url_no_git#https://github.com/}"
|
||||||
owner="${_path%%/*}"
|
owner="${_path%%/*}"
|
||||||
reponame="${_path#*/}"
|
reponame="${_path#*/}"
|
||||||
|
|
||||||
# --- helper: list open PRs via GitHub API (unauthenticated) ----------------
|
# --- helper: list open PRs via GitHub API (unauthenticated) ----------------
|
||||||
list_open_prs() {
|
list_open_prs() {
|
||||||
# prints PR numbers, one per line; returns non-zero if none or curl missing
|
# prints PR numbers, one per line; returns non-zero if none or curl missing
|
||||||
command -v curl >/dev/null 2>&1 || return 1
|
command -v curl > /dev/null 2>&1 || return 1
|
||||||
local page=1 per_page=100 out
|
local page=1 per_page=100 out
|
||||||
local -a all=() chunk=()
|
local -a all=() chunk=()
|
||||||
while :; do
|
while :; do
|
||||||
out="$(curl -fsSL "https://api.github.com/repos/${owner}/${reponame}/pulls?state=open&per_page=${per_page}&page=${page}")" || break
|
out="$(curl -fsSL "https://api.github.com/repos/${owner}/${reponame}/pulls?state=open&per_page=${per_page}&page=${page}")" || break
|
||||||
[[ -z "$out" || "$out" == "[]" ]] && break
|
[[ -z "$out" || "$out" == "[]" ]] && break
|
||||||
if command -v jq >/dev/null 2>&1; then
|
if command -v jq > /dev/null 2>&1; then
|
||||||
mapfile -t chunk < <(printf '%s' "$out" | jq -r '.[] | select(.draft == false) | .number')
|
mapfile -t chunk < <(printf '%s' "$out" | jq -r '.[] | select(.draft == false) | .number')
|
||||||
else
|
else
|
||||||
# Fallback JSON scraping if jq is unavailable
|
# Fallback JSON scraping if jq is unavailable
|
||||||
mapfile -t chunk < <(printf '%s' "$out" | grep -o '"number":[[:space:]]*[0-9]\+' | grep -o '[0-9]\+')
|
mapfile -t chunk < <(printf '%s' "$out" | grep -o '"number":[[:space:]]*[0-9]\+' | grep -o '[0-9]\+')
|
||||||
fi
|
fi
|
||||||
((${#chunk[@]}==0)) && break
|
((${#chunk[@]} == 0)) && break
|
||||||
all+=("${chunk[@]}")
|
all+=("${chunk[@]}")
|
||||||
((${#chunk[@]} < per_page)) && break
|
((${#chunk[@]} < per_page)) && break
|
||||||
((page++))
|
((page++))
|
||||||
done
|
done
|
||||||
((${#all[@]}==0)) && return 1
|
((${#all[@]} == 0)) && return 1
|
||||||
printf '%s\n' "${all[@]}"
|
printf '%s\n' "${all[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- clone base ------------------------------------------------------------
|
# --- clone base ------------------------------------------------------------
|
||||||
git clone --quiet --branch "$branch" "$repo" "$temp_dir"
|
git clone --quiet --branch "$branch" "$repo" "$temp_dir"
|
||||||
pushd "$temp_dir" >/dev/null
|
pushd "$temp_dir" > /dev/null
|
||||||
git fetch --quiet origin
|
git fetch --quiet origin
|
||||||
git config user.name "Local PR Aggregator"
|
git config user.name "Local PR Aggregator"
|
||||||
git config user.email "local@example.invalid"
|
git config user.email "local@example.invalid"
|
||||||
git checkout -B with-open-prs "origin/${branch}"
|
git checkout -B with-open-prs "origin/${branch}"
|
||||||
|
|
||||||
# --- fetch & merge only OPEN PRs -------------------------------------------
|
# --- fetch & merge only OPEN PRs -------------------------------------------
|
||||||
mapfile -t prs < <(list_open_prs || true)
|
mapfile -t prs < <(list_open_prs || true)
|
||||||
if ((${#prs[@]})); then
|
if ((${#prs[@]})); then
|
||||||
# Sort numerically (oldest first)
|
# Sort numerically (oldest first)
|
||||||
IFS=$'\n' prs=($(sort -n <<<"${prs[*]}")); unset IFS
|
IFS=$'\n' prs=($(sort -n <<< "${prs[*]}"))
|
||||||
echo "Open PR(s): ${prs[*]}"
|
unset IFS
|
||||||
|
echo "Open PR(s): ${prs[*]}"
|
||||||
|
|
||||||
for pr in "${prs[@]}"; do
|
for pr in "${prs[@]}"; do
|
||||||
echo "Fetching PR #${pr}…"
|
echo "Fetching PR #${pr}…"
|
||||||
if git fetch --quiet origin "pull/${pr}/head:pr-${pr}"; then
|
if git fetch --quiet origin "pull/${pr}/head:pr-${pr}"; then
|
||||||
echo "Merging PR #${pr} into with-open-prs…"
|
echo "Merging PR #${pr} into with-open-prs…"
|
||||||
if git merge --no-ff -X theirs --no-edit "pr-${pr}"; then
|
if git merge --no-ff -X theirs --no-edit "pr-${pr}"; then
|
||||||
echo "✓ merged PR #${pr}"
|
echo "✓ merged PR #${pr}"
|
||||||
else
|
else
|
||||||
echo "! Conflict merging PR #${pr}; aborting and skipping."
|
echo "! Conflict merging PR #${pr}; aborting and skipping."
|
||||||
git merge --abort || true
|
git merge --abort || true
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git checkout with-open-prs
|
git checkout with-open-prs
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "! Could not fetch refs for PR #${pr}; skipping."
|
echo "! Could not fetch refs for PR #${pr}; skipping."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No open PRs detected (API unavailable or none open)."
|
echo "No open PRs detected (API unavailable or none open)."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
popd >/dev/null
|
popd > /dev/null
|
||||||
rm -rf "$target_dir"
|
rm -rf "$target_dir"
|
||||||
mv "$temp_dir" "$target_dir"
|
mv "$temp_dir" "$target_dir"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -94,13 +94,13 @@
|
|||||||
"panel_admin": false,
|
"panel_admin": false,
|
||||||
"panel_icon": "mdi:book-multiple",
|
"panel_icon": "mdi:book-multiple",
|
||||||
"ports": {
|
"ports": {
|
||||||
"8181/tcp": 8181,
|
|
||||||
"8081/tcp": 8081,
|
"8081/tcp": 8081,
|
||||||
|
"8181/tcp": 8181,
|
||||||
"9090/tcp": 9090
|
"9090/tcp": 9090
|
||||||
},
|
},
|
||||||
"ports_description": {
|
"ports_description": {
|
||||||
"8181/tcp": "Calibre desktop gui (https)",
|
|
||||||
"8081/tcp": "Calibre webserver gui, to be enabled within the desktop gui",
|
"8081/tcp": "Calibre webserver gui, to be enabled within the desktop gui",
|
||||||
|
"8181/tcp": "Calibre desktop gui (https)",
|
||||||
"9090/tcp": "Calibre wireless connection, to be enabled within the desktop gui"
|
"9090/tcp": "Calibre wireless connection, to be enabled within the desktop gui"
|
||||||
},
|
},
|
||||||
"privileged": [
|
"privileged": [
|
||||||
|
|||||||
0
emby_beta/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
emby_beta/rootfs/etc/services.d/nginx/run
Normal file → Executable file
@@ -97,7 +97,7 @@ setup_root_user() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the root user exists.
|
# Check if the root user exists.
|
||||||
if ! psql "postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:${DB_PORT}" -tAc "SELECT 1 FROM pg_roles WHERE rolname='root'" | grep -q 1; then
|
if ! psql "postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:${DB_PORT}" -tAc "SELECT 1 FROM pg_roles WHERE rolname='root'" | grep -q 1; then
|
||||||
bashio::log.info "Root user does not exist. Creating root user with DB_ROOT_PASSWORD..."
|
bashio::log.info "Root user does not exist. Creating root user with DB_ROOT_PASSWORD..."
|
||||||
psql "postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:${DB_PORT}" << EOF
|
psql "postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:${DB_PORT}" << EOF
|
||||||
|
|||||||
0
nzbget/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
nzbget/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
portainer/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
portainer/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
portainer/rootfs/etc/services.d/portainer/run
Normal file → Executable file
0
portainer/rootfs/etc/services.d/portainer/run
Normal file → Executable file
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
0
qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run
Normal file → Executable file
0
qbittorrent/rootfs/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run
Normal file → Executable file
0
qbittorrent/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
qbittorrent/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
qbittorrent/rootfs/etc/services.d/timer/run
Normal file → Executable file
0
qbittorrent/rootfs/etc/services.d/timer/run
Normal file → Executable file
0
ubooquity/rootfs/etc/services.d/nginx/run
Normal file → Executable file
0
ubooquity/rootfs/etc/services.d/nginx/run
Normal file → Executable file
Reference in New Issue
Block a user