Skip to content

Commit 1c550e3

Browse files
committed
Remove summary
1 parent 261ee3d commit 1c550e3

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ directories = "6"
1414
toml = "0.8"
1515
serde = { version = "1", features = ["derive"] }
1616
which = "8"
17-
regex = "1"
1817

1918
[profile.release]
2019
debug = "line-tables-only"

src/sync.rs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use crate::SyncContext;
22
use crate::josh::JoshProxy;
3-
use crate::utils::{ensure_clean_git_state, replace_references, run_command, run_command_at};
3+
use crate::utils::ensure_clean_git_state;
4+
use crate::utils::run_command;
5+
use crate::utils::run_command_at;
46
use anyhow::{Context, Error};
57
use std::path::{Path, PathBuf};
68

@@ -91,23 +93,10 @@ impl GitSync {
9193
)
9294
})?;
9395

94-
// Fetch the latest upstream HEAD so we can get a summary. Use the Josh URL for caching.
95-
run_command([
96-
"git",
97-
"fetch",
98-
&josh.git_url(UPSTREAM_REPO, Some(&upstream_sha), ":/"),
99-
&upstream_sha,
100-
"--depth=1",
101-
])?;
102-
let summary = run_command(["git", "log", "-1", "--format=%h %s", "FETCH_HEAD"])?;
103-
let summary = replace_references(&summary, UPSTREAM_REPO);
104-
10596
let prep_message = format!(
106-
r#"Update the upstream Rust version to `{upstream_sha}`.
107-
108-
To prepare for merging from {UPSTREAM_REPO}, the rust-version file was set to the following commit:
97+
r#"Prepare for merging from {UPSTREAM_REPO}
10998
110-
{summary}"#,
99+
This updates the rust-version file to {upstream_sha}."#,
111100
);
112101

113102
let config_path = self

src/utils.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use regex::Regex;
2-
use std::borrow::Cow;
31
use std::path::Path;
42
use std::process::Command;
53

@@ -58,10 +56,3 @@ pub fn read_line() -> String {
5856
.expect("cannot read line from stdin");
5957
line.trim().to_string()
6058
}
61-
62-
/// Replace `#1234`-style issue/PR references with `repo#1234` to ensure links work across
63-
/// repositories.
64-
pub fn replace_references<'a>(text: &'a str, repo: &str) -> Cow<'a, str> {
65-
let regex = Regex::new(r"\B(?P<id>#\d+)\b").unwrap();
66-
regex.replace(text, &format!("{repo}$id"))
67-
}

0 commit comments

Comments
 (0)