An issue no longer says whether it is queued for a g1t agent: Issue.queued was read from queued_by, which nothing has written since g1t stopped running agents of its own, so it was always false; it is gone from the issue in the API, the contracts and the API reference's examples, and the column stays in work's D1. The work service no longer serves start_checks (always refused, kept for runners from before checks were workflows), list_assigned_issues or stall over RPC, none of which anything called; stalling a pull request g1t is seeing through stays inside the service. Opening an issue or a pull request no longer takes the by_g1t flag of hosted agents in forks, which every caller passed as false. Repository settings, auto-merge and agent approvals are described without g1t's agents, and the runner settings' reference note says agents_on_self_hosted and agent_labels now send checks, merge checks and the merge queue to your runners, where it said agent work still used g1t's model proxy. Checked: cargo test for g1t-work (103), g1t-contracts (306), g1t-api (201) and g1t (102 and 41), the wasm builds of work and the API, the OpenAPI document regenerated (the CLI's operations and reference are unchanged), the TypeScript typecheck and the contracts' 48 tests.
9 files+22−1450/9 viewed
| 1101 | 1101 | "comment_count": 0, | |
| 1102 | 1102 | "assignees": [], | |
| 1103 | 1103 | "blocked_by": [], | |
| 1104 | − | "queued": false, | |
| 1105 | 1104 | "agent": "claude-code", | |
| 1106 | 1105 | "milestone": null | |
| 1107 | 1106 | } | |
| ⋯ | |||
| 1144 | 1143 | "comment_count": 0, | |
| 1145 | 1144 | "assignees": [], | |
| 1146 | 1145 | "blocked_by": [], | |
| 1147 | − | "queued": false, | |
| 1148 | 1146 | "agent": null, | |
| 1149 | 1147 | "milestone": null | |
| 1150 | 1148 | }, | |
| ⋯ | |||
| 1180 | 1178 | "comment_count": 0, | |
| 1181 | 1179 | "assignees": [], | |
| 1182 | 1180 | "blocked_by": [], | |
| 1183 | − | "queued": false, | |
| 1184 | 1181 | "agent": null, | |
| 1185 | 1182 | "milestone": null | |
| 1186 | 1183 | }, | |
| ⋯ | |||
| 1339 | 1336 | "syntaqx" | |
| 1340 | 1337 | ], | |
| 1341 | 1338 | "blocked_by": [9], | |
| 1342 | − | "queued": false, | |
| 1343 | 1339 | "agent": null, | |
| 1344 | 1340 | "milestone": { | |
| 1345 | 1341 | "number": 3, | |
| ⋯ | |||
| 1379 | 1375 | "comment_count": 0, | |
| 1380 | 1376 | "assignees": [], | |
| 1381 | 1377 | "blocked_by": [], | |
| 1382 | − | "queued": false, | |
| 1383 | 1378 | "agent": null, | |
| 1384 | 1379 | "milestone": null | |
| 1385 | 1380 | } | |
| ⋯ | |||
| 1413 | 1408 | "comment_count": 0, | |
| 1414 | 1409 | "assignees": [], | |
| 1415 | 1410 | "blocked_by": [], | |
| 1416 | − | "queued": false, | |
| 1417 | 1411 | "agent": null, | |
| 1418 | 1412 | "milestone": null | |
| 1419 | 1413 | } | |
| ⋯ | |||
| 1701 | 1695 | "comment_count": 0, | |
| 1702 | 1696 | "assignees": [], | |
| 1703 | 1697 | "blocked_by": [], | |
| 1704 | − | "queued": false, | |
| 1705 | 1698 | "agent": "claude-code", | |
| 1706 | 1699 | "milestone": null | |
| 1707 | 1700 | }, | |
| ⋯ | |||
| 2855 | 2848 | "blocked_by": [ | |
| 2856 | 2849 | 9 | |
| 2857 | 2850 | ], | |
| 2858 | − | "queued": false, | |
| 2859 | 2851 | "agent": null, | |
| 2860 | 2852 | "milestone": { | |
| 2861 | 2853 | "number": 3, | |
| ⋯ | |||
| 4259 | 4251 | "fork_pull_requests": false, | |
| 4260 | 4252 | "inherited": false | |
| 4261 | 4253 | }, | |
| 4262 | − | "notes": "Agent work on your runners still uses g1t's model proxy, paid as before, unless the workspace has its own model provider." | |
| 4254 | + | "notes": "`agents_on_self_hosted` and `agent_labels` keep their names from before g1t ran agents of its own: they now send g1t's own work (checks, merge checks and the merge queue) to your runners with those labels." | |
| 4263 | 4255 | }, | |
| 4264 | 4256 | "list_runner_groups": { | |
| 4265 | 4257 | "params": { | |
| ⋯ | |||
| 9310 | 9302 | "syntaqx" | |
| 9311 | 9303 | ], | |
| 9312 | 9304 | "blocked_by": [], | |
| 9313 | − | "queued": false, | |
| 9314 | 9305 | "agent": null, | |
| 9315 | 9306 | "milestone": { | |
| 9316 | 9307 | "number": 3, | |
Binary or large file; its contents are not shown.
| 345 | 345 | /// worked on. | |
| 346 | 346 | #[serde(default)] | |
| 347 | 347 | pub blocked_by: Vec<u32>, | |
| 348 | − | /// Whether a g1t agent takes it as soon as it can: at once, or when | |
| 349 | − | /// what it is blocked by has merged. | |
| 350 | − | #[serde(default)] | |
| 351 | − | pub queued: bool, | |
| 352 | 348 | /// The agent working on it now: the one behind its newest pull request | |
| 353 | 349 | /// that is still in progress in a fork, such as `g1t`. | |
| 354 | 350 | #[serde(default)] | |
| ⋯ | |||
| 580 | 576 | /// Who is recorded as opening an issue or a pull request that `actor` | |
| 581 | 577 | /// opens, and who asked for it: `(author, requested_by)`. | |
| 582 | 578 | /// | |
| 583 | − | /// - g1t's agent, acting for someone through its token (an issue it files | |
| 584 | − | /// while at work): g1t, requested by that person. | |
| 585 | − | /// - A person having g1t make the change (`by_g1t`: a hosted g1t agent in | |
| 586 | − | /// a fork of its own): g1t, requested by them. | |
| 579 | + | /// - g1t's retired agent, acting for someone through a token of its own | |
| 580 | + | /// that still works: g1t, requested by that person. | |
| 587 | 581 | /// - Anyone else, and g1t's own work that nobody asked for: the actor, and | |
| 588 | 582 | /// nobody asking. | |
| 589 | − | pub fn authorship(actor: &User, by_g1t: bool) -> (User, Option<User>) { | |
| 583 | + | pub fn authorship(actor: &User) -> (User, Option<User>) { | |
| 590 | 584 | let person = |id: &str, username: &str| User { | |
| 591 | 585 | id: id.to_owned(), | |
| 592 | 586 | username: username.to_owned(), | |
| ⋯ | |||
| 601 | 595 | .filter(|on_behalf_of| !crate::system::is_system_id(&on_behalf_of.id)) | |
| 602 | 596 | .map(|on_behalf_of| person(&on_behalf_of.id, &on_behalf_of.username)); | |
| 603 | 597 | return (g1t_author(), asked); | |
| 604 | − | } | |
| 605 | − | if by_g1t && actor.kind != crate::PrincipalKind::System { | |
| 606 | − | return (g1t_author(), Some(person(&actor.id, &actor.username))); | |
| 607 | 598 | } | |
| 608 | 599 | let author = User { | |
| 609 | 600 | id: actor.id.clone(), | |
| ⋯ | |||
| 1220 | 1211 | NeedsYou, | |
| 1221 | 1212 | } | |
| 1222 | 1213 | ||
| 1223 | − | /// Where a pull request made by a g1t agent stands. See [`Stage`]. | |
| 1214 | + | /// Where a pull request g1t's retired agents made stands, for those still | |
| 1215 | + | /// open. See [`Stage`]. | |
| 1224 | 1216 | #[derive(Clone, Debug, Serialize, Deserialize)] | |
| 1225 | 1217 | pub struct Lifecycle { | |
| 1226 | 1218 | pub stage: Stage, | |
| ⋯ | |||
| 1253 | 1245 | #[derive(Clone, Debug, Serialize, Deserialize)] | |
| 1254 | 1246 | #[serde(rename_all = "camelCase", default)] | |
| 1255 | 1247 | pub struct RepoSettings { | |
| 1256 | − | /// Land a g1t agent's pull request without a person once it is ready: | |
| 1257 | − | /// required checks passed and approved as the settings below require. | |
| 1248 | + | /// Land a pull request g1t is seeing through without a person once it | |
| 1249 | + | /// is ready: required checks passed and approved as the settings below | |
| 1250 | + | /// require. | |
| 1258 | 1251 | pub auto_merge: bool, | |
| 1259 | 1252 | /// The checks that must pass on a pull request's head before it may | |
| 1260 | 1253 | /// merge into the default branch, by name: a workflow's name (`CI`), or | |
| ⋯ | |||
| 1268 | 1261 | /// How many approving reviews a pull request needs before it may | |
| 1269 | 1262 | /// merge. A reviewer who has since asked for changes blocks it. | |
| 1270 | 1263 | pub required_approvals: u32, | |
| 1271 | − | /// Whether a g1t agent's approval counts towards `required_approvals`. | |
| 1264 | + | /// Whether an agent's approval counts towards `required_approvals`. | |
| 1272 | 1265 | pub count_agent_approvals: bool, | |
| 1273 | 1266 | /// Whether someone who may merge can bypass required checks that have | |
| 1274 | 1267 | /// not passed, by saying so as they merge. | |
| ⋯ | |||
| 1315 | 1308 | pub settings: RepoSettings, | |
| 1316 | 1309 | } | |
| 1317 | 1310 | ||
| 1318 | − | /// `stall`: records that a step could not be carried out, so that g1t | |
| 1319 | − | /// stops and a person is asked. Returns `bool`. | |
| 1311 | + | /// What the work service records when a step could not be carried out, so | |
| 1312 | + | /// that g1t stops and a person is asked. Not served over RPC. | |
| 1320 | 1313 | #[derive(Debug, Serialize, Deserialize)] | |
| 1321 | 1314 | #[serde(rename_all = "camelCase")] | |
| 1322 | 1315 | pub struct StallArgs { | |
| ⋯ | |||
| 1639 | 1632 | /// Needs the Write role. | |
| 1640 | 1633 | #[serde(default)] | |
| 1641 | 1634 | pub base: Option<String>, | |
| 1642 | − | } | |
| 1643 | − | ||
| 1644 | − | /// `start_checks`: always refused now; a pull request's checks are the | |
| 1645 | − | /// workflows run on it. Kept so that a runner from before is answered. | |
| 1646 | − | /// Returns `Outcome<CheckJob>`. | |
| 1647 | − | #[derive(Debug, Serialize, Deserialize)] | |
| 1648 | − | #[serde(rename_all = "camelCase")] | |
| 1649 | − | pub struct StartChecksArgs { | |
| 1650 | − | pub pull_id: String, | |
| 1651 | 1635 | } | |
| 1652 | 1636 | ||
| 1653 | − | /// What a sandbox needs to carry out a check run. | |
| 1654 | − | #[derive(Debug, Serialize, Deserialize)] | |
| 1655 | − | #[serde(rename_all = "camelCase")] | |
| 1656 | − | pub struct CheckJob { | |
| 1657 | − | pub run_id: String, | |
| 1658 | − | /// Lets the sandbox, and nothing else, report this run's results. | |
| 1659 | − | pub token: String, | |
| 1660 | − | pub commands: Vec<String>, | |
| 1661 | − | /// The repository holding the commit: the fork, or the repository itself. | |
| 1662 | − | pub source: RepoPath, | |
| 1663 | − | pub commit: String, | |
| 1664 | − | /// Who the pull request is for ([`Pull::owner`]: whoever asked g1t for | |
| 1665 | − | /// it, or its author), and so can read its source. | |
| 1666 | − | pub author: User, | |
| 1667 | − | /// Username of whoever wrote the checks: the issue's author. | |
| 1668 | − | pub requested_by: String, | |
| 1669 | − | pub repo: RepoPath, | |
| 1670 | − | pub number: u32, | |
| 1671 | − | } | |
| 1672 | − | ||
| 1673 | 1637 | /// `report_checks`: what a sandbox says about its run. With no results and | |
| 1674 | 1638 | /// no error it has started. `skip` forgets the run, for one that will not | |
| 1675 | 1639 | /// be carried out. Returns `Outcome<CheckRun>`. | |
| ⋯ | |||
| 2258 | 2222 | pull.author = author; | |
| 2259 | 2223 | pull.requested_by = requested_by; | |
| 2260 | 2224 | pull | |
| 2261 | − | } | |
| 2262 | − | ||
| 2263 | − | #[test] | |
| 2264 | − | fn a_change_a_person_has_g1t_make_is_g1t_s_requested_by_them() { | |
| 2265 | − | let (author, asked) = authorship(&person(), true); | |
| 2266 | − | assert_eq!((author.id.as_str(), author.username.as_str(), author.kind), (AGENT_ID, "g1t", PrincipalKind::Agent)); | |
| 2267 | − | let asked = asked.expect("the person asked for it"); | |
| 2268 | − | assert_eq!((asked.id.as_str(), asked.username.as_str(), asked.kind), ("usr_1", "syntaqx", PrincipalKind::User)); | |
| 2269 | 2225 | } | |
| 2270 | 2226 | ||
| 2271 | 2227 | #[test] | |
| 2272 | 2228 | fn what_g1t_s_agent_files_at_work_is_g1t_s_requested_by_whoever_it_works_for() { | |
| 2273 | − | let (author, asked) = authorship(&agent_for("usr_1", "syntaqx"), false); | |
| 2229 | + | let (author, asked) = authorship(&agent_for("usr_1", "syntaqx")); | |
| 2274 | 2230 | assert_eq!(author.id, AGENT_ID); | |
| 2275 | 2231 | assert_eq!(asked.map(|user| user.username), Some("syntaqx".into())); | |
| 2276 | 2232 | } | |
| ⋯ | |||
| 2278 | 2234 | #[test] | |
| 2279 | 2235 | fn nobody_asked_for_g1t_s_own_work() { | |
| 2280 | 2236 | // A run g1t started itself acts for g1t, not for a person. | |
| 2281 | − | let (author, asked) = authorship(&agent_for(crate::system::ID, "g1t"), false); | |
| 2237 | + | let (author, asked) = authorship(&agent_for(crate::system::ID, "g1t")); | |
| 2282 | 2238 | assert_eq!(author.id, AGENT_ID); | |
| 2283 | 2239 | assert!(asked.is_none()); | |
| 2284 | 2240 | // A security update g1t opens is g1t's own, as before. | |
| 2285 | − | let (author, asked) = authorship(&User::system("acme"), true); | |
| 2241 | + | let (author, asked) = authorship(&User::system("acme")); | |
| 2286 | 2242 | assert_eq!((author.id.as_str(), author.kind), (crate::system::ID, PrincipalKind::System)); | |
| 2287 | 2243 | assert!(asked.is_none()); | |
| 2288 | 2244 | } | |
| 2289 | 2245 | ||
| 2290 | 2246 | #[test] | |
| 2291 | 2247 | fn anyone_else_opens_their_own() { | |
| 2292 | − | let (author, asked) = authorship(&person(), false); | |
| 2248 | + | let (author, asked) = authorship(&person()); | |
| 2293 | 2249 | assert_eq!((author.id.as_str(), author.kind), ("usr_1", PrincipalKind::User)); | |
| 2294 | 2250 | assert!(asked.is_none()); | |
| 2295 | 2251 | // Nothing but who they are is kept. | |
| 469 | 469 | call("add_comment", { actor, repo, number, ...comment }), | |
| 470 | 470 | editComment: (actor, repo, commentId, body) => call("edit_comment", { actor, repo, commentId, body }), | |
| 471 | 471 | deleteComment: (actor, repo, commentId) => call("delete_comment", { actor, repo, commentId }), | |
| 472 | − | startChecks: (pullId) => call("start_checks", { pullId }), | |
| 473 | 472 | reportChecks: (runId, token, report) => | |
| 474 | 473 | call("report_checks", { runId, token, ...report }), | |
| 475 | 474 | startMergecheck: (pullId) => call("start_mergecheck", { pullId }), | |
| 476 | 475 | failMergecheck: (pullId, token, error) => call("report_mergecheck", { pullId, token, error }), | |
| 477 | 476 | advance: (pullId) => call("advance", { pullId }), | |
| 478 | − | stall: (pullId, reason) => call("stall", { pullId, reason }), | |
| 479 | 477 | managedPulls: (repoId) => call("managed_pulls", { repoId }), | |
| 480 | 478 | queue: (repo, viewer) => call("queue", { repo, viewer }), | |
| 481 | 479 | queueBuild: (repoId) => call("queue_build", { repoId }), | |
| ⋯ | |||
| 520 | 518 | listActivePulls: (viewer) => call("list_active_pulls", { viewer }), | |
| 521 | 519 | byAuthor: (username, viewer, filter = {}) => call("by_author", { username, viewer, ...filter }), | |
| 522 | 520 | contributions: (username, viewer) => call("contributions", { username, viewer }), | |
| 523 | − | listAssignedIssues: (viewer) => call("list_assigned_issues", { viewer }), | |
| 524 | 521 | appendSession: (actor, repo, number, entries) => | |
| 525 | 522 | call("append_session", { actor, repo, number, entries }), | |
| 526 | 523 | readSession: (repo, number, viewer, afterSeq = 0) => | |
| 58 | 58 | /** The numbers of the issues that have to be merged before this one is worked on. */ | |
| 59 | 59 | blockedBy: number[]; | |
| 60 | 60 | /** | |
| 61 | − | * Whether a g1t agent takes it as soon as it can: at once, or when what it | |
| 62 | − | * is blocked by has merged. | |
| 63 | − | */ | |
| 64 | − | queued: boolean; | |
| 65 | − | /** | |
| 66 | 61 | * The agent working on it now: the one behind its newest pull request | |
| 67 | 62 | * that is still in progress in a fork, such as `g1t`. | |
| 68 | 63 | */ | |
| ⋯ | |||
| 335 | 330 | verdict?: Verdict; | |
| 336 | 331 | }; | |
| 337 | 332 | ||
| 338 | − | /** What a sandbox needs to carry out a check run. */ | |
| 339 | − | export type CheckJob = { | |
| 340 | − | runId: string; | |
| 341 | − | /** Lets the sandbox, and nothing else, report this run's results. */ | |
| 342 | − | token: string; | |
| 343 | − | commands: string[]; | |
| 344 | − | /** The repository holding the commit: the fork, or the repository itself. */ | |
| 345 | − | source: RepoPath; | |
| 346 | − | commit: string; | |
| 347 | − | /** Who the pull request is for (`workOwner`: whoever asked g1t for it, or its author), and so can read its source. */ | |
| 348 | − | author: User; | |
| 349 | − | /** Username of whoever wrote the checks: the issue's author. */ | |
| 350 | − | requestedBy: string; | |
| 351 | − | repo: RepoPath; | |
| 352 | − | number: number; | |
| 353 | − | }; | |
| 354 | − | ||
| 355 | 333 | export type CheckReport = { results?: CheckResult[]; error?: string; skip?: boolean }; | |
| 356 | 334 | ||
| 357 | 335 | export type SessionEntryKind = "prompt" | "message" | "tool_call" | "tool_result" | "note" | "skill"; | |
| ⋯ | |||
| 736 | 714 | deleteComment(actor: User, repo: RepoPath, commentId: string): Promise<Result<boolean>>; | |
| 737 | 715 | ||
| 738 | 716 | /** | |
| 739 | − | * Always refused now: a pull request's checks are the workflows run on | |
| 740 | − | * it. Kept for a runner from before. | |
| 741 | − | */ | |
| 742 | − | startChecks(pullId: string): Promise<Result<CheckJob>>; | |
| 743 | − | /** | |
| 744 | 717 | * What a sandbox says about a run from before checks were workflows: so | |
| 745 | 718 | * one still finishing is recorded. | |
| 746 | 719 | */ | |
| ⋯ | |||
| 760 | 733 | * however often this is called. For the runner service. | |
| 761 | 734 | */ | |
| 762 | 735 | advance(pullId: string): Promise<Advance>; | |
| 763 | − | /** Records that a step could not be carried out, so a person is asked. */ | |
| 764 | − | stall(pullId: string, reason: string): Promise<boolean>; | |
| 765 | 736 | /** Ids of the open pull requests g1t is seeing through. */ | |
| 766 | 737 | managedPulls(repoId?: string): Promise<string[]>; | |
| 767 | 738 | ||
| ⋯ | |||
| 881 | 852 | contributions(username: string, viewer: Viewer): Promise<Result<Contributions>>; | |
| 882 | 853 | ||
| 883 | 854 | ||
| 884 | − | /** Open issues assigned to the viewer, most recently changed first. */ | |
| 885 | − | listAssignedIssues(viewer: Viewer): Promise<Issue[]>; | |
| 886 | 855 | ||
| 887 | 856 | appendSession(actor: User, repo: RepoPath, number: number, entries: NewSessionEntry[]): Promise<Result<{ count: number }>>; | |
| 888 | 857 | readSession(repo: RepoPath, number: number, viewer: Viewer, afterSeq?: number): Promise<Result<SessionEntry[]>>; | |
| 112 | 112 | .collect()) | |
| 113 | 113 | } | |
| 114 | 114 | ||
| 115 | − | /// Commands written on issues are no longer run: a pull request's | |
| 116 | − | /// checks are the workflows run on it, and the default branch's | |
| 117 | − | /// protection says which must pass. Refused, for a runner from before. | |
| 118 | − | pub(crate) async fn start_checks(&self, _: StartChecksArgs) -> Result<Outcome<CheckJob>> { | |
| 119 | − | Ok(refused( | |
| 120 | − | "Checks are the workflows run on a pull request; there are no commands to run.", | |
| 121 | − | )) | |
| 122 | − | } | |
| 123 | − | ||
| 124 | 115 | /// Records what a sandbox reports for its run: that it has started, its | |
| 125 | 116 | /// results, that it could not run, or that the run should be forgotten. | |
| 126 | 117 | /// The run's token is the only credential, and a finished run accepts |
| 514 | 514 | let id = new_id("iss", now); | |
| 515 | 515 | let number = self.next_number(&repo.id).await?; | |
| 516 | 516 | let timestamp = rfc3339(now); | |
| 517 | − | let (author, requested_by) = authorship(&a.actor, false); | |
| 517 | + | let (author, requested_by) = authorship(&a.actor); | |
| 518 | 518 | self.db | |
| 519 | 519 | .prepare( | |
| 520 | 520 | "INSERT INTO issues | |
| ⋯ | |||
| 787 | 787 | assignees.push(name); | |
| 788 | 788 | } | |
| 789 | 789 | Ok(Outcome::Ok(assignees)) | |
| 790 | − | } | |
| 791 | − | ||
| 792 | − | /// Open issues assigned to the viewer, in every repository. Callers | |
| 793 | − | /// show only those in repositories the viewer can still see. | |
| 794 | − | async fn list_assigned_issues(&self, a: ViewerArgs) -> Result<Vec<Issue>> { | |
| 795 | − | let Some(viewer) = a.viewer else { | |
| 796 | − | return Ok(Vec::new()); | |
| 797 | − | }; | |
| 798 | − | let rows = self | |
| 799 | − | .db | |
| 800 | − | .prepare(format!( | |
| 801 | − | "SELECT {ISSUE_COLUMNS} FROM issues | |
| 802 | − | WHERE state = 'open' AND EXISTS ( | |
| 803 | − | SELECT 1 FROM json_each(issues.assignees) WHERE json_each.value = ?) | |
| 804 | − | ORDER BY updated_at DESC LIMIT 50" | |
| 805 | − | )) | |
| 806 | − | .bind(&[viewer.username.into()])? | |
| 807 | − | .all() | |
| 808 | − | .await? | |
| 809 | − | .results::<IssueRow>()?; | |
| 810 | − | Ok(rows.into_iter().map(Issue::from).collect()) | |
| 811 | 790 | } | |
| 812 | 791 | ||
| 813 | 792 | async fn close_issue(&self, a: IssueActionArgs) -> Result<Outcome<Issue>> { | |
| ⋯ | |||
| 1311 | 1290 | ||
| 1312 | 1291 | let number = self.next_number(&repo.id).await?; | |
| 1313 | 1292 | let timestamp = rfc3339(now); | |
| 1314 | − | let (author, requested_by) = authorship(&a.actor, false); | |
| 1293 | + | let (author, requested_by) = authorship(&a.actor); | |
| 1315 | 1294 | self.db | |
| 1316 | 1295 | .prepare( | |
| 1317 | 1296 | "INSERT INTO pulls | |
| ⋯ | |||
| 2735 | 2714 | "add_comment" => reply(&work.add_comment(args(body)?).await?), | |
| 2736 | 2715 | "edit_comment" => reply(&work.edit_comment(args(body)?).await?), | |
| 2737 | 2716 | "delete_comment" => reply(&work.delete_comment(args(body)?).await?), | |
| 2738 | − | "start_checks" => reply(&work.start_checks(args(body)?).await?), | |
| 2739 | 2717 | "seen_checks" => reply(&work.seen_checks(args(body)?).await?), | |
| 2740 | 2718 | "report_checks" => reply(&work.report_checks(args(body)?).await?), | |
| 2741 | 2719 | "set_commit_status" => reply(&work.set_commit_status(args(body)?).await?), | |
| ⋯ | |||
| 2754 | 2732 | "request_check_action" => reply(&work.request_check_action(args(body)?).await?), | |
| 2755 | 2733 | "commit_checks" => reply(&work.commit_checks(args(body)?).await?), | |
| 2756 | 2734 | "advance" => reply(&work.advance(args(body)?).await?), | |
| 2757 | − | "stall" => reply(&work.stall(args(body)?).await?), | |
| 2758 | 2735 | "managed_pulls" => reply(&work.managed_pulls(args(body)?).await?), | |
| 2759 | 2736 | "queue" => reply(&work.queue(args(body)?).await?), | |
| 2760 | 2737 | "queue_build" => reply(&work.queue_build(args(body)?).await?), | |
| ⋯ | |||
| 2779 | 2756 | "list_active_pulls" => reply(&work.list_active_pulls(args(body)?).await?), | |
| 2780 | 2757 | "by_author" => reply(&work.by_author(args(body)?).await?), | |
| 2781 | 2758 | "contributions" => reply(&work.contributions(args(body)?).await?), | |
| 2782 | − | "list_assigned_issues" => reply(&work.list_assigned_issues(args(body)?).await?), | |
| 2783 | 2759 | "append_session" => reply(&work.append_session(args(body)?).await?), | |
| 2784 | 2760 | "read_session" => reply(&work.read_session(args(body)?).await?), | |
| 2785 | 2761 | // Decision records (decisions.rs). | |
| 60 | 60 | pub assignees: String, | |
| 61 | 61 | /// JSON array of issue numbers. | |
| 62 | 62 | pub blocked_by: String, | |
| 63 | − | /// JSON of who queued it for a g1t agent, if anyone has. | |
| 64 | − | pub queued_by: Option<String>, | |
| 65 | 63 | pub agent: Option<String>, | |
| 66 | 64 | /// The number of its milestone, and that milestone's title. | |
| 67 | 65 | #[serde(default)] | |
| ⋯ | |||
| 97 | 95 | comment_count: row.comment_count, | |
| 98 | 96 | assignees: serde_json::from_str(&row.assignees).unwrap_or_default(), | |
| 99 | 97 | blocked_by: serde_json::from_str(&row.blocked_by).unwrap_or_default(), | |
| 100 | − | queued: row.queued_by.is_some(), | |
| 101 | 98 | agent: row.agent, | |
| 102 | 99 | milestone: milestone_ref(row.milestone, row.milestone_title), | |
| 103 | 100 | } | |
| 1 | − | //! A repository's settings for how g1t's agents handle its pull requests, | |
| 1 | + | //! A repository's settings for how its pull requests are handled, | |
| 2 | 2 | //! and the branch protection settings that are now its "Default branch | |
| 3 | 3 | //! protection" ruleset (rulesets.rs). | |
| 4 | 4 | //! | |
| ⋯ | |||
| 57 | 57 | } | |
| 58 | 58 | ||
| 59 | 59 | impl Work { | |
| 60 | − | /// A repository's stored settings, by its id: how g1t's agents handle | |
| 61 | − | /// its pull requests. Defaults if none were set. Branch protection is | |
| 60 | + | /// A repository's stored settings, by its id: how its pull requests are | |
| 61 | + | /// handled. Defaults if none were set. Branch protection is | |
| 62 | 62 | /// its rules': see `settings_on`. | |
| 63 | 63 | pub(crate) async fn settings(&self, repo_id: &str) -> Result<RepoSettings> { | |
| 64 | 64 | if let Some(found) = self.prefetched_repo(repo_id) { | |
| ⋯ | |||
| 84 | 84 | Ok(Outcome::Ok(self.timing.db(3, self.default_branch_settings(&repo)).await?)) | |
| 85 | 85 | } | |
| 86 | 86 | ||
| 87 | − | /// Replaces a repository's settings: how g1t's agents work, kept here, | |
| 87 | + | /// Replaces a repository's settings: how pull requests are handled, kept here, | |
| 88 | 88 | /// and the branch protection ones, written to its "Default branch | |
| 89 | 89 | /// protection" ruleset (made when it has none and they protect | |
| 90 | 90 | /// anything). Rules that only rulesets have stay as they are. | |
Comments
Sign in to comment.