Skip to content

Commit

Permalink
Fixed issue where it created comment in hardcoded pr
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Aug 1, 2020
1 parent 5e2f43b commit 85d4e6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion WebOptimizationProject/GitHubRepositoryOptimizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ public async Task GoOptimize(Repository repository, string branchName = null)
};
obtainedPullRequest = await _gitOctoKitHandler.GitHubClient.PullRequest.Create(repositoryOwner, repositoryName, pr);
}
Console.WriteLine($"Using PR: {obtainedPullRequest.Url}");

var descriptionForCommitInPr = TemplatesHandler.GetCommitDescriptionForPullRequest(clonedRepo, branchName, optimizedFileResults, DateTime.UtcNow.ToString());
Console.WriteLine($"Creating comment on pr with length {descriptionForCommitInPr.Length}...");
var result = await _gitOctoKitHandler.GitHubClient.Issue.Comment.Create("WebOptimizationProject", "TestRepo1", obtainedPullRequest.Number, descriptionForCommitInPr);
var createdComment = await _gitOctoKitHandler.GitHubClient.Issue.Comment.Create(repositoryOwner, repositoryName, obtainedPullRequest.Number, descriptionForCommitInPr);
Console.WriteLine($"Comment created: {createdComment.Url}");
}

Console.WriteLine();
Expand Down

0 comments on commit 85d4e6a

Please sign in to comment.