Creating issues

The Cake.Issues addin can be used to create issues directly in the build script. This issues can for example be used to create reports.

To create issues you need to import the following core addin:

#addin "Cake.Issues"

Please note that you always should pin addins to a specific version to make sure your builds are deterministic and won't break due to updates to one of the addins.

See pinning addin versions for details.

In the following task a new warning for the myfile.txt file on line 42 is created:

Task("Create-Issue").Does(() =>
    var issue =
            "Something went wrong",
            "My Cake Script")
            .WithMessageInHtmlFormat("Something went <b>wrong</b>")
            .WithMessageInMarkdownFormat("Something went **wrong**")
            .InFile("myfile.txt", 42)

    Information("Issue created with message: {0}", issues.MessageText);