Skip to content

Commit b0b5a99

Browse files
committed
More log to represent inputs.
1 parent 9c2a38e commit b0b5a99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/CommentCore/CommentUseCase.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ struct CommentUseCase {
7777

7878
// Try to find an existing comment with the hidden anchor content.
7979
if let comment = comments.first(where: { $0.body?.contains(hidingContent) == true }) {
80-
print("Update the existing comment with the new body content.")
8180
_ = try await client.issues_sol_update_hyphen_comment(
8281
path: .init(owner: owner, repo: repo, comment_id: Components.Parameters.comment_hyphen_id(comment.id)),
8382
body: .json(.init(body: newBody))
84-
)
83+
).ok
84+
print("Update the existing comment with the new body content.")
8585
} else {
86-
print("Create a new comment if no existing comment with the anchor is found.")
8786
_ = try await client.issues_sol_create_hyphen_comment(
8887
path: .init(owner: owner, repo: repo, issue_number: number),
8988
body: .json(.init(body: newBody))
90-
)
89+
).created
90+
print("Create a new comment which no existing comment with the anchor is found.")
9191
}
9292
}
9393
}

0 commit comments

Comments
 (0)