@@ -18,7 +18,6 @@ use crate::github::api::client::GithubRepositoryClient;
1818use crate :: permissions:: UserPermissions ;
1919#[ cfg( test) ]
2020use crate :: tests:: TestSyncMarker ;
21- use crate :: utils:: text:: suppress_github_mentions;
2221
2322mod command;
2423pub mod comment;
@@ -128,25 +127,20 @@ pub fn create_merge_commit_message(pr: handlers::PullRequestData, merge_type: Me
128127 MergeType :: Auto => pr. db . approver ( ) . unwrap_or ( "<unknown>" ) ,
129128 } ;
130129
131- let mut pr_description = suppress_github_mentions ( & pr. github . message ) ;
132- match & merge_type {
133- // Strip all PR text for try builds, to avoid useless issue pings on the repository.
130+ let pr_description = match & merge_type {
134131 // Only keep any lines starting with `CUSTOM_TRY_JOB_PREFIX`.
135- MergeType :: Try { try_jobs } => {
136- // If we do not have any custom try jobs, keep the ones that might be in the PR
137- // description.
138- pr_description = if try_jobs. is_empty ( ) {
139- pr_description
140- . lines ( )
141- . map ( |l| l. trim ( ) )
142- . filter ( |l| l. starts_with ( CUSTOM_TRY_JOB_PREFIX ) )
143- . join ( "\n " )
144- } else {
145- // If we do have custom jobs, ignore the original description completely
146- String :: new ( )
147- } ;
148- }
149- MergeType :: Auto => { }
132+ // If we do not have any custom try jobs, keep the ones that might be in the PR
133+ // description.
134+ MergeType :: Try { try_jobs } if try_jobs. is_empty ( ) => pr
135+ . github
136+ . message
137+ . lines ( )
138+ . map ( |l| l. trim ( ) )
139+ . filter ( |l| l. starts_with ( CUSTOM_TRY_JOB_PREFIX ) )
140+ . join ( "\n " ) ,
141+ // If we do have custom jobs, ignore the original description completely
142+ MergeType :: Try { .. } => String :: new ( ) ,
143+ MergeType :: Auto => pr. github . message . clone ( ) ,
150144 } ;
151145
152146 let mut message = format ! (
0 commit comments