Skip to content

Commit

Permalink
Test create comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanm-bb committed Jul 11, 2024
1 parent 9e230b0 commit ea9fe62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Apps.Jira/Actions/IssueCommentActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Blackbird.Applications.Sdk.Common;
using Blackbird.Applications.Sdk.Common.Actions;
using Blackbird.Applications.Sdk.Common.Invocation;
using Newtonsoft.Json;
using RestSharp;

namespace Apps.Jira.Actions;
Expand Down Expand Up @@ -56,7 +57,7 @@ public async Task<IssueCommentDto> AddIssueComment([ActionParameter] IssueIdenti
[ActionParameter] AddIssueCommentRequest comment)
{
var request = new JiraRequest($"/issue/{input.IssueKey}/comment", Method.Post);
request.AddJsonBody(new
request.AddStringBody(JsonConvert.SerializeObject(new
{
body = new
{
Expand Down Expand Up @@ -84,7 +85,11 @@ public async Task<IssueCommentDto> AddIssueComment([ActionParameter] IssueIdenti
value = comment.VisibilityValue ?? null,
identifier = comment.VisibilityIdentifier ?? "Administrators"
}
});
}, Formatting.None,
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
}), DataFormat.Json);

return await Client.ExecuteWithHandling<IssueCommentDto>(request);
}
Expand Down
2 changes: 1 addition & 1 deletion Apps.Jira/Apps.Jira.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>12</LangVersion>
<Product>Jira</Product>
<Description>Issue tracking</Description>
<Version>2.1.5</Version>
<Version>2.1.6</Version>
<AssemblyName>Apps.Jira</AssemblyName>
</PropertyGroup>
<ItemGroup>
Expand Down

0 comments on commit ea9fe62

Please sign in to comment.