@@ -304,10 +304,15 @@ impl Display for BuildStatus {
304
304
#[ sqlx( type_name = "build" ) ]
305
305
pub struct BuildModel {
306
306
pub id : PrimaryKey ,
307
+ /// The GitHub repository this build belongs to.
307
308
pub repository : GithubRepoName ,
309
+ /// The branch where this build is running (e.g., "automation/bors/try").
308
310
pub branch : String ,
311
+ /// The SHA of the commit being built.
309
312
pub commit_sha : String ,
313
+ /// Current status of the build (pending, success, failure, etc.).
310
314
pub status : BuildStatus ,
315
+ /// The base commit SHA that this build is merged with (e.g., main branch HEAD).
311
316
pub parent : String ,
312
317
pub created_at : DateTime < Utc > ,
313
318
}
@@ -316,19 +321,33 @@ pub struct BuildModel {
316
321
#[ derive( Debug ) ]
317
322
pub struct PullRequestModel {
318
323
pub id : PrimaryKey ,
324
+ /// The GitHub repository this PR belongs to.
319
325
pub repository : GithubRepoName ,
326
+ /// The GitHub pull request number.
320
327
pub number : PullRequestNumber ,
328
+ /// The title of the pull request in GitHub.
321
329
pub title : String ,
330
+ /// The GitHub username of the PR author.
322
331
pub author : String ,
332
+ /// List of GitHub usernames assigned to this PR.
323
333
pub assignees : Vec < String > ,
334
+ /// The GitHub PR state: open, closed, draft, or merged.
324
335
pub pr_status : PullRequestStatus ,
336
+ /// The target branch this PR will be merged into.
325
337
pub base_branch : String ,
338
+ /// GitHub's determination of PR mergeability.
326
339
pub mergeable_state : MergeableState ,
340
+ /// Approval status including approver and approved commit SHA.
327
341
pub approval_status : ApprovalStatus ,
342
+ /// Temporary permissions granted to the PR author by a reviewer (try or review).
328
343
pub delegated_permission : Option < DelegatedPermission > ,
344
+ /// Priority for merge queue ordering. Higher priority PRs are merged first.
329
345
pub priority : Option < i32 > ,
346
+ /// Rollup mode determining if this PR can be included in rollup builds.
330
347
pub rollup : Option < RollupMode > ,
348
+ /// The (latest) try build associated with this PR, if any.
331
349
pub try_build : Option < BuildModel > ,
350
+ /// The (latest) auto merge build associated with this PR, if any.
332
351
pub auto_build : Option < BuildModel > ,
333
352
pub created_at : DateTime < Utc > ,
334
353
}
@@ -359,7 +378,9 @@ impl PullRequestModel {
359
378
#[ sqlx( type_name = "TEXT" ) ]
360
379
#[ sqlx( rename_all = "lowercase" ) ]
361
380
pub enum WorkflowType {
381
+ /// GitHub Actions workflow.
362
382
Github ,
383
+ /// External CI system workflow.
363
384
External ,
364
385
}
365
386
@@ -379,11 +400,17 @@ pub enum WorkflowStatus {
379
400
/// Represents a workflow run, coming either from Github Actions or from some external CI.
380
401
pub struct WorkflowModel {
381
402
pub id : PrimaryKey ,
403
+ /// The build this workflow is associated with.
382
404
pub build : BuildModel ,
405
+ /// The name of the workflow (e.g., "CI", "Tests").
383
406
pub name : String ,
407
+ /// URL to view this workflow run on GitHub or external CI.
384
408
pub url : String ,
409
+ /// Unique identifier for this workflow run.
385
410
pub run_id : RunId ,
411
+ /// Whether this is a GitHub Actions workflow or external CI.
386
412
pub workflow_type : WorkflowType ,
413
+ /// Current status of the workflow (pending, success, failure).
387
414
pub status : WorkflowStatus ,
388
415
pub created_at : DateTime < Utc > ,
389
416
}
@@ -474,7 +501,9 @@ impl From<PullRequest> for UpsertPullRequestParams {
474
501
/// Represents a repository configuration.
475
502
pub struct RepoModel {
476
503
pub id : PrimaryKey ,
504
+ /// The GitHub repository name in "owner/repo" format.
477
505
pub name : GithubRepoName ,
506
+ /// State of the repository tree (open or closed with priority threshold).
478
507
pub tree_state : TreeState ,
479
508
pub created_at : DateTime < Utc > ,
480
509
}
0 commit comments