The API opens a pull request as a draft with "draft": true
3 files+3−00/3 viewed
| 4692 | 4692 | .unwrap_or_else(|| if g1t_contracts::rules::is_agent(&user) { "agent".into() } else { user.username.clone() }), | |
| 4693 | 4693 | runtime: Runtime::External, | |
| 4694 | 4694 | base: optional_text(input, "base"), | |
| 4695 | + | draft: input.get("draft").and_then(|value| value.as_bool()).unwrap_or(false), | |
| 4695 | 4696 | }, | |
| 4696 | 4697 | ) | |
| 4697 | 4698 | .await?; |
| 514 | 514 | runtime: Runtime::External, | |
| 515 | 515 | // Security updates are for the default branch. | |
| 516 | 516 | base: None, | |
| 517 | + | draft: false, | |
| 517 | 518 | }, | |
| 518 | 519 | ) | |
| 519 | 520 | .await?; |
| 924 | 924 | runtime: Runtime::External, | |
| 925 | 925 | // Into `target-branch`, which it was made from. | |
| 926 | 926 | base: row.bump().and_then(|bump| bump.base), | |
| 927 | + | draft: false, | |
| 927 | 928 | }, | |
| 928 | 929 | ) | |
| 929 | 930 | .await?; |