perfgate_github/types.rs
1//! Types for GitHub API responses and requests.
2
3use serde::{Deserialize, Serialize};
4
5/// A GitHub issue/PR comment.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct GitHubComment {
8 /// The comment ID.
9 pub id: u64,
10
11 /// The comment body (Markdown).
12 pub body: String,
13
14 /// The HTML URL for the comment.
15 pub html_url: String,
16
17 /// The user who created the comment.
18 pub user: GitHubUser,
19}
20
21/// A GitHub user (minimal fields).
22#[derive(Debug, Clone, Serialize, Deserialize)]
23pub struct GitHubUser {
24 /// The user's login name.
25 pub login: String,
26}
27
28/// Request body for creating/updating a comment.
29#[derive(Debug, Serialize)]
30pub(crate) struct GitHubCommentRequest {
31 pub body: String,
32}