@@ -574,30 +574,29 @@ async function getCIReportsFromPR(prUrl) {
574574
575575 console . log ( `Fetching CI reports for PR #${ prNumber } ...\n` ) ;
576576
577- // Fetch PR comments to find CI bot comment.
577+ // Report URLs are the signal — do not filter by bot login.
578+ // Altinity posts via github-actions[bot] with the virtual-hosted S3 URL;
579+ // older comments used clickhouse-gh[bot] and path-style S3.
578580 // Drop GH_CONFIG_DIR before spawning gh: some agent/runner checkouts set it to a poisoned
579581 // config dir (no/expired auth) that makes `gh api` fail, while the default config is fine.
580582 // Other repo tooling (patch-release-check) does the same via `env -u GH_CONFIG_DIR gh`.
581583 const ghEnv = { ...process . env } ;
582584 delete ghEnv . GH_CONFIG_DIR ;
583585 try {
584- const commentsJson = execSync ( `gh api repos/Altinity/ClickHouse/issues/${ prNumber } /comments --paginate --jq '.[] | select(.user.login == "clickhouse-gh[bot]") | {body, created_at}'` , {
586+ const commentsJson = execSync ( `gh api repos/Altinity/ClickHouse/issues/${ prNumber } /comments --paginate --jq '.[] | {body, created_at}'` , {
585587 encoding : 'utf8' ,
586588 stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
587589 env : ghEnv
588590 } ) ;
589591
590592 const comments = commentsJson . trim ( ) . split ( '\n' ) . filter ( l => l . trim ( ) ) . map ( l => JSON . parse ( l ) ) ;
591593 comments . sort ( ( a , b ) => ( b . created_at || '' ) . localeCompare ( a . created_at || '' ) ) ;
592- if ( ! comments || comments . length === 0 ) {
593- throw new Error ( 'No CI bot comment found' ) ;
594- }
595594
596- // Search through all bot comments for CI report URLs (not just the latest). Exclude backtick and
595+ // Search through all comments for CI report URLs (not just the latest). Exclude backtick and
597596 // quote chars so a URL quoted in markdown (e.g. inside the AI-review text) is not captured with
598597 // trailing junk, strip trailing punctuation, and dedupe -- otherwise the same report is fetched
599- // twice and the summary is doubled.
600- const reportUrlPattern = / h t t p s : \/ \/ s 3 \. a m a z o n a w s \. c o m \/ a l t i n i t y - b u i l d - a r t i f a c t s \/ j s o n \. h t m l \? [ ^ \s ) ` ' " ] + / g;
598+ // twice and the summary is doubled. Match both path-style and virtual-hosted S3 URLs.
599+ const reportUrlPattern = / h t t p s : \/ \/ (?: s 3 \. a m a z o n a w s \. c o m \/ a l t i n i t y - b u i l d - a r t i f a c t s | a l t i n i t y - b u i l d - a r t i f a c t s \. s 3 \. a m a z o n a w s \. c o m ) \/ j s o n \. h t m l \? [ ^ \s ) ` ' " ] + / g;
601600 for ( const comment of comments ) {
602601 if ( ! comment . body ) continue ;
603602 let urls = comment . body . match ( reportUrlPattern ) ;
@@ -607,9 +606,9 @@ async function getCIReportsFromPR(prUrl) {
607606 }
608607 }
609608
610- throw new Error ( 'No CI report URLs found in bot comments' ) ;
609+ throw new Error ( 'No CI report URLs found in PR comments' ) ;
611610 } catch ( error ) {
612- if ( error . message . includes ( 'No CI bot comment found' ) || error . message . includes ( 'No CI report URLs found') ) {
611+ if ( error . message . includes ( 'No CI report URLs found' ) ) {
613612 throw error ;
614613 }
615614 throw new Error ( `Failed to fetch PR comments: ${ error . message } ` ) ;
0 commit comments