Skip to content

Commit

Permalink
More log to represent inputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei18 committed Sep 8, 2024
1 parent 9c2a38e commit b0b5a99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/CommentCore/CommentUseCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ struct CommentUseCase {

// Try to find an existing comment with the hidden anchor content.
if let comment = comments.first(where: { $0.body?.contains(hidingContent) == true }) {
print("Update the existing comment with the new body content.")
_ = try await client.issues_sol_update_hyphen_comment(
path: .init(owner: owner, repo: repo, comment_id: Components.Parameters.comment_hyphen_id(comment.id)),
body: .json(.init(body: newBody))
)
).ok
print("Update the existing comment with the new body content.")
} else {
print("Create a new comment if no existing comment with the anchor is found.")
_ = try await client.issues_sol_create_hyphen_comment(
path: .init(owner: owner, repo: repo, issue_number: number),
body: .json(.init(body: newBody))
)
).created
print("Create a new comment which no existing comment with the anchor is found.")
}
}
}
Expand Down

0 comments on commit b0b5a99

Please sign in to comment.