Skip to content

Commit b115ea2

Browse files
Auto merge of #150959 - Kobzol:bors-email-3, r=marcoieni
Use the old homu bors e-mail address again Now that new bors knows how to use the old homu e-mail address (rust-lang/bors#614), we can revert to the old address. I modified the code to keep compatibility with both addresses, so that everything should still work for every merged commit in the past few days. In a few weeks/months, we could remove the temporary bors e-mail address, as at that point no one will likely care about these few merged commits anymore. Should not be merged until rust-lang/bors#614 is deployed, although the current version in `main` should already mostly work with both addresses, except for CI postprocessing statistics. Should be backported.
2 parents 561364e + ad713ab commit b115ea2

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ jobs:
289289
fi
290290
291291
# Get closest bors merge commit
292-
PARENT_COMMIT=`git rev-list --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
292+
PARENT_COMMIT=`git rev-list --author='bors@rust-lang.org' --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
293293
294294
./build/citool/debug/citool postprocess-metrics \
295295
--job-name ${CI_JOB_NAME} \

‎.github/workflows/post-merge.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sleep 60
3030
3131
# Get closest bors merge commit
32-
PARENT_COMMIT=`git rev-list --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
32+
PARENT_COMMIT=`git rev-list --author='bors@rust-lang.org' --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
3333
echo "Parent: ${PARENT_COMMIT}"
3434
3535
# Find PR for the current commit

‎src/build_helper/src/git.rs‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ pub fn has_changed_since(git_dir: &Path, base: &str, paths: &[&str]) -> bool {
152152
})
153153
}
154154

155-
const LEGACY_BORS_EMAIL: &str = "bors@rust-lang.org";
155+
// Temporary e-mail used by new bors for merge commits for a few days, until it learned how to reuse
156+
// the original homu e-mail
157+
// FIXME: remove in Q2 2026
158+
const TEMPORARY_BORS_EMAIL: &str = "122020455+rust-bors[bot]@users.noreply.github.com";
156159

157160
/// Escape characters from the git user e-mail, so that git commands do not interpret it as regex
158161
/// special characters.
@@ -193,10 +196,9 @@ fn get_latest_upstream_commit_that_modified_files(
193196
&escape_email_git_regex(git_config.git_merge_commit_email),
194197
]);
195198

196-
// Also search for legacy bors account, before we accrue enough commits to
197-
// have changes to all relevant file paths done by new bors.
198-
if git_config.git_merge_commit_email != LEGACY_BORS_EMAIL {
199-
git.args(["--author", LEGACY_BORS_EMAIL]);
199+
// Also search for temporary bors account
200+
if git_config.git_merge_commit_email != TEMPORARY_BORS_EMAIL {
201+
git.args(["--author", &escape_email_git_regex(TEMPORARY_BORS_EMAIL)]);
200202
}
201203

202204
if !target_paths.is_empty() {
@@ -248,10 +250,9 @@ pub fn get_closest_upstream_commit(
248250
base,
249251
]);
250252

251-
// Also search for legacy bors account, before we accrue enough commits to
252-
// have changes to all relevant file paths done by new bors.
253-
if config.git_merge_commit_email != LEGACY_BORS_EMAIL {
254-
git.args(["--author", LEGACY_BORS_EMAIL]);
253+
// Also search for temporary bors account
254+
if config.git_merge_commit_email != TEMPORARY_BORS_EMAIL {
255+
git.args(["--author", &escape_email_git_regex(TEMPORARY_BORS_EMAIL)]);
255256
}
256257

257258
let output = output_result(&mut git)?.trim().to_owned();

‎src/ci/github-actions/jobs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ try:
152152
- <<: *job-dist-x86_64-linux
153153

154154
# Jobs that only run when explicitly invoked in one of the following ways:
155-
# - comment `@bors2 try jobs=<job-name>`
156-
# - `try-job: <job-name>` in the PR description and comment `@bors try` or `@bors2 try`.
155+
# - comment `@bors try jobs=<job-name>`
156+
# - `try-job: <job-name>` in the PR description and comment `@bors try`.
157157
optional:
158158
# This job is used just to test optional jobs.
159159
# It will be replaced by tier 2 and tier 3 jobs in the future.

‎src/stage0‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dist_server=https://static.rust-lang.org
22
artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds
33
artifacts_with_llvm_assertions_server=https://ci-artifacts.rust-lang.org/rustc-builds-alt
4-
git_merge_commit_email=122020455+rust-bors[bot]@users.noreply.github.com
4+
git_merge_commit_email=bors@rust-lang.org
55
nightly_branch=main
66

77
# The configuration above this comment is editable, and can be changed

0 commit comments

Comments
 (0)