@@ -314,25 +314,49 @@ jobs:
314314 per_page: 100
315315 });
316316
317- // 빌드 타입에 따라 해당 트리거 요청 댓글 카운트 (플랫폼별 분리)
318- let searchKeyword = '';
319- if (buildType === 'app') {
320- searchKeyword = 'build app'; // @suh-lab build app
317+ // 빌드 타입에 따라 플랫폼별 빌드 카운트 (app build는 iOS/Android 모두 포함하므로 통합 카운트)
318+ // - iOS 빌드 번호: 'ios build' + 'build app' (app build도 iOS 빌드 포함)
319+ // - Android 빌드 번호: 'apk build' + 'build app' (app build도 Android 빌드 포함)
320+ // - App 빌드 번호: 'build app' + 'ios build' + 'apk build' (모든 빌드 통합)
321+
322+ let buildCount = 0;
323+
324+ if (buildType === 'ios') {
325+ // iOS 빌드: 'ios build' + 'build app' 모두 카운트
326+ buildCount = comments.data.filter(c => {
327+ const body = c.body.toLowerCase();
328+ return body.includes('@suh-lab') && (
329+ body.includes('ios build') ||
330+ (body.includes('build') && body.includes('app'))
331+ );
332+ }).length;
333+ console.log(`📊 iOS 빌드 카운트: 'ios build' + 'build app' = ${buildCount}개`);
321334 } else if (buildType === 'apk') {
322- searchKeyword = 'apk build'; // @suh-lab apk build
323- } else if (buildType === 'ios') {
324- searchKeyword = 'ios build'; // @suh-lab ios build
335+ // Android 빌드: 'apk build' + 'build app' 모두 카운트
336+ buildCount = comments.data.filter(c => {
337+ const body = c.body.toLowerCase();
338+ return body.includes('@suh-lab') && (
339+ body.includes('apk build') ||
340+ (body.includes('build') && body.includes('app'))
341+ );
342+ }).length;
343+ console.log(`📊 Android 빌드 카운트: 'apk build' + 'build app' = ${buildCount}개`);
344+ } else if (buildType === 'app') {
345+ // App 빌드 (iOS + Android 동시): 모든 빌드 명령어 통합 카운트
346+ buildCount = comments.data.filter(c => {
347+ const body = c.body.toLowerCase();
348+ return body.includes('@suh-lab') && (
349+ body.includes('ios build') ||
350+ body.includes('apk build') ||
351+ (body.includes('build') && body.includes('app'))
352+ );
353+ }).length;
354+ console.log(`📊 App 빌드 카운트: 'build app' + 'ios build' + 'apk build' = ${buildCount}개`);
325355 }
326356
327- const buildCount = comments.data.filter(c =>
328- c.body.toLowerCase().includes('@suh-lab') &&
329- c.body.toLowerCase().includes(searchKeyword)
330- ).length;
331-
332357 // 빌드 번호: 소스번호 + 2자리 카운트 (38800, 38801, 38802...)
333358 const buildNumber = `${sourceNumber}${String(buildCount).padStart(2, '0')}`;
334359
335- console.log(`📊 카운트 키워드: "${searchKeyword}"`);
336360 console.log(`📊 ${sourceType} #${sourceNumber}: ${buildType} ${buildCount}번째 빌드`);
337361 console.log(`📦 생성된 빌드 번호: ${buildNumber}`);
338362
0 commit comments