Skip to content

Release: merge develop into main - #147

Merged
mikemadeja merged 11 commits into
mainfrom
develop
Oct 24, 2026
Merged

mikemadeja merged 11 commits into
mainfrom
develop

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Release develop into main.

Changes

🤖 Generated with Claude Code

mikemadeja and others added 11 commits October 11, 2026 11:09
FunctionsToExport was missing from the manifest entirely, which
PowerShell/the Gallery treat as wildcard ('*') - Microsoft's module
authoring guidance calls this an anti-pattern since it forces
PowerShell to execute the .psm1 to discover exports instead of
reading the static manifest, and the Gallery can't show an accurate
function list without importing. Added the explicit list, generated
from and verified identical to PiHoleShell.psm1's own
Export-ModuleMember list (76 functions, confirmed via
Test-ModuleManifest and a real Import-Module).

Also adds .gitattributes (* text=auto, with PiHoleShell.psd1
excluded since it's UTF-16LE). This makes line-ending normalization
explicit/portable across contributors rather than implicit in each
person's local core.autocrlf setting - note it does not by itself
silence the "LF will be replaced by CRLF" messages this session has
seen locally, since those come from this machine's own
core.autocrlf=true regardless of .gitattributes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
chore: declare FunctionsToExport and add .gitattributes
Adds DNS-specific convenience wrappers for managing Pi-hole's local
DNS records (A/AAAA host entries and CNAME records), which were
already reachable generically via Add-PiHoleConfigArrayItem /
Remove-PiHoleConfigArrayItem on dns/hosts and dns/cnameRecords - these
just make that discoverable with typed, DNS-specific parameters
(-Type A/AAAA/CNAME, -IPv4Address, -IPv6Address, -Target, -Ttl)
instead of requiring callers to know Pi-hole's raw value format
("<ip> <hostname>" or "<alias>,<target>[,<ttl>]").

Both are thin wrappers that call the existing config-array functions
internally rather than duplicating their auth/HTTP logic.
Remove-PiHoleDnsRecord implements its own ShouldProcess and passes
-Confirm:$false through to the inner call to avoid double-prompting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds Get-PiHoleDnsRecord, completing the Get/Add/Remove set for local
DNS record management. Parses Pi-hole's raw dns.hosts/dns.cnameRecords
config arrays into the same typed object shape Add-/Remove-PiHoleDnsRecord
already use (Type/Hostname/IPv4Address/IPv6Address/Target/Ttl), with
optional -Type/-Hostname filtering.

Remove-PiHoleDnsRecord now accepts that same shape via
ValueFromPipelineByPropertyName, so Get-PiHoleDnsRecord's output can be
piped straight into it - including removing several matched records in
a single pipeline. This is the first use of pipeline input anywhere in
the module; no other function currently has a matching Get/Remove
object shape to make it worthwhile.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SonarCloud flagged the BeforeAll/AfterAll blocks of the Get- and
Remove-PiHoleDnsRecord integration tests as duplicated (8% duplication on
new code, failing the quality gate). Move config loading and record cleanup
into tests/DnsControl/DnsRecordTestHelpers.ps1 and use it from the Add, Get
and Remove test files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test: extract shared setup/cleanup for DNS record integration tests
Wraps GET /api/auth/app. It only generates a password and its hash; the
help explains how to activate it by setting webserver.api.app_pwhash with
Set-PiHoleConfig. Checked against a live server: generating a password
leaves the current app password and active sessions untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FTL v6.8 answers POST /api/action/gravity with 409 while another run is in
progress. Use ConvertTo-PiHoleFriendlyErrorMessage so the caller sees
Pi-hole's own message, and add an integration test that starts a
background run and checks a second call reports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat: add Get-PiHoleAuthApp; clearer error when gravity is already running
@sonarqubecloud

Copy link
Copy Markdown

@mikemadeja
mikemadeja merged commit 1234da1 into main Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant