diff options
Diffstat (limited to 'llvm_tools/patch_sync/src/version_control.rs')
-rw-r--r-- | llvm_tools/patch_sync/src/version_control.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm_tools/patch_sync/src/version_control.rs b/llvm_tools/patch_sync/src/version_control.rs index dc43523e..e07d39d6 100644 --- a/llvm_tools/patch_sync/src/version_control.rs +++ b/llvm_tools/patch_sync/src/version_control.rs @@ -20,6 +20,7 @@ pub struct RepoSetupContext { /// Run `repo sync` before doing any comparisons. pub sync_before: bool, pub wip_mode: bool, + pub enable_cq: bool, } impl RepoSetupContext { @@ -52,7 +53,7 @@ impl RepoSetupContext { llvm_dir.display() ); Self::rev_bump_llvm(&llvm_dir)?; - let mut extra_args = vec!["--label=Commit-Queue+1"]; + let mut extra_args = Vec::new(); for reviewer in reviewers { extra_args.push("--re"); extra_args.push(reviewer.as_ref()); @@ -61,6 +62,9 @@ impl RepoSetupContext { extra_args.push("--wip"); extra_args.push("--no-emails"); } + if self.enable_cq { + extra_args.push("--label=Commit-Queue+1"); + } Self::repo_upload( &self.cros_checkout, CHROMIUMOS_OVERLAY_REL_PATH, @@ -76,9 +80,6 @@ impl RepoSetupContext { pub fn android_repo_upload<S: AsRef<str>>(&self, reviewers: &[S]) -> Result<()> { let mut extra_args = Vec::new(); - // TODO(ajordanr): Presubmit ready can only be enabled if we - // have the permissions. - // extra_args.push("--label=Presubmit-Ready+1"); for reviewer in reviewers { extra_args.push("--re"); extra_args.push(reviewer.as_ref()); @@ -87,6 +88,9 @@ impl RepoSetupContext { extra_args.push("--wip"); extra_args.push("--no-emails"); } + if self.enable_cq { + extra_args.push("--label=Presubmit-Ready+1"); + } Self::repo_upload( &self.android_checkout, ANDROID_LLVM_REL_PATH, |