public static bool CreateBugIssue(BugIssueData data, params string[] attachments)
        {
            var createIssueRequest = new CreateBugIssueRequest(data);
            var requestPayload     = createIssueRequest.Data.GetDataAsJSon();

            var bugRequest    = new FileInfo("bug-request.json");
            var bugArchive    = new FileInfo(attachments[0]);
            var bugReportTool = new DirectoryInfo(UTinyBuildPipeline.GetToolDirectory("bugreport"));

            File.WriteAllText(bugRequest.FullName, requestPayload, Encoding.UTF8);

            try
            {
                return(UTinyBuildUtilities.RunNode(bugReportTool, "index.js",
                                                   bugRequest.FullName.DoubleQuoted(),
                                                   bugArchive.FullName.DoubleQuoted()));
            }
            finally
            {
                if (bugRequest.Exists)
                {
                    bugRequest.Delete();
                }
            }
        }
 public CreateBugIssueRequest(BugIssueData data)
 {
     Data.Add(new Project(JiraAPI.ProjectId));
     AddField("summary", data.Title);
     AddField("description", data.GetDataString());
     Data.Add(IssueType.BugIssue);
 }