pub struct ThreadCommentOptions {
pub policy: CommentPolicy,
pub comment: String,
pub kind: CommentKind,
pub marker: String,
pub no_lgtm: bool,
}Expand description
Options that control posting comments on a thread.
Used as a parameter value to RestApiClient::post_thread_comment().
Fields§
§policy: CommentPolicyControls posting comments on a thread that concerns a Pull Request or Push event.
Typically, this is only desirable for Pull Requests.
comment: StringThe comment to post.
This can be a blank string if Self::no_lgtm is true and the
Self::kind is CommentKind::Lgtm.
kind: CommentKindThe CommentKind that describes the comment’s purpose.
marker: StringA string used to mark/identify the thread’s comment as a comment submitted by this software.
User comments may be indistinguishable from bot/generated comments if this value is not unique enough.
If the git server employs Markdown syntax for comments, then it is recommended to set this to a HTML comment that is unique to your CI application:
<!-- my-cool-CI-app-name -->The default value for this is an HTML comment generated from this crate’s name and version along with the compile-tome’s datetime. For example:
<!-- git-bot-feedback/0.1.0/Jul-14-2025_17-00 -->no_lgtm: boolDisallow posting “Looks Good To Me” comments.
Setting this option to true may instigate the deletion of old bot comment(s),
if any exist.
Implementations§
Source§impl ThreadCommentOptions
impl ThreadCommentOptions
Sourcepub fn mark_comment(&self) -> String
pub fn mark_comment(&self) -> String
Ensure that the ThreadCommentOptions::comment is marked with
the ThreadCommentOptions::marker.
Typically only used by implementations of
RestApiClient::post_thread_comment
and RestApiClient::append_step_summary.