Skip to content

Add regfish-dns provider#1018

Open
tobiashaigis wants to merge 4 commits intopolymind-inc:masterfrom
siedlegroup:feature/add-regfish-dns-provider
Open

Add regfish-dns provider#1018
tobiashaigis wants to merge 4 commits intopolymind-inc:masterfrom
siedlegroup:feature/add-regfish-dns-provider

Conversation

@tobiashaigis
Copy link
Copy Markdown

Summary

Added provider for Regfish DNS

Validation

  • dotnet build -c Release ./src
  • dotnet format --verify-no-changes --verbosity detailed --no-restore ./src

Copilot AI review requested due to automatic review settings April 16, 2026 06:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new DNS provider integration for Regfish DNS so Acmebot can create/delete TXT records for DNS-01 challenges via the Regfish API.

Changes:

  • Introduce RegfishProvider implementation with an internal RegfishClient for zone/record operations.
  • Add RegfishOptions and expose it via AcmebotOptions.
  • Register the new provider in Program.cs DNS provider setup.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/Acmebot.App/Providers/RegfishProvider.cs Implements Regfish DNS provider + HTTP client wrapper for zones/records
src/Acmebot.App/Program.cs Registers RegfishProvider when Acmebot:Regfish options are configured
src/Acmebot.App/Options/RegfishOptions.cs Adds options model for Regfish API key
src/Acmebot.App/Options/AcmebotOptions.cs Exposes Regfish configuration slot on main options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Acmebot.App/Providers/RegfishProvider.cs Outdated
Comment thread src/Acmebot.App/Providers/RegfishProvider.cs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +87 to +88
private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName) => $"{relativeRecordName}.{zoneName}.";

Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsMatchingTxtRecord contains a special-case for records whose API name is "@" (zone apex), but GetAbsoluteRecordName always formats ${relativeRecordName}.${zoneName}. so it will never pass recordName == zoneName (and will produce values like "@.example.com." / ".example.com." instead). This makes apex matching inconsistent and would prevent DeleteTxtRecordAsync from removing apex TXT records if relativeRecordName is "@" or empty. Consider handling "@"/empty explicitly in GetAbsoluteRecordName (and/or adjusting IsMatchingTxtRecord) so the representation is consistent.

Suggested change
private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName) => $"{relativeRecordName}.{zoneName}.";
private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName)
{
var normalizedZoneName = NormalizeName(zoneName);
if (string.IsNullOrWhiteSpace(relativeRecordName) || string.Equals(relativeRecordName.Trim(), "@", StringComparison.Ordinal))
{
return $"{normalizedZoneName}.";
}
var normalizedRelativeRecordName = NormalizeName(relativeRecordName);
return $"{normalizedRelativeRecordName}.{normalizedZoneName}.";
}

Copilot uses AI. Check for mistakes.
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.

2 participants