Skip to content

Add support for pseudo-diff format in preview #3942

@andrewimeson

Description

@andrewimeson

Is your feature request related to a problem? Please describe.

The current dnscontrol preview output is great for viewing on the CLI or in GitHub Actions runs, but it can't be colorized in a GitHub/Gitea Pull Request comment (that I can figure out, at least)

Describe the solution you'd like

An option like --diff-format=diff to synthesize a patch-style diff that could be included in a \```diff codeblock and thus be automatically rendered with colors symbolizing addition, removal, and changes.

Describe alternatives you've considered

  1. Just giving up on colorized output and setting NO_COLOR or stripping out the ANSI color sequences in the CI step that posts the comment.
  2. Building my own output by taking the JSON report and spitting out markdown formatted text with the changed domain and changes summarized under "Added", "Changed", and "Deleted" subheadings

Additional context

Relates to #2499

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions