paginate app operations and refine runtime settings layout
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-07 17:48:09 +09:00
parent 36acfedaee
commit d55fe0c251
2 changed files with 29 additions and 15 deletions
+9 -15
View File
@@ -669,8 +669,6 @@ export class AppsService {
targetBranch,
], { cwd: workDir }).catch(() => undefined);
const pushArgs: string[] = ['push', 'origin', `HEAD:refs/heads/${targetBranch}`];
const targetExists = await gitRefExists(workDir, `refs/remotes/origin/${targetBranch}`, gitBin);
if (targetExists) {
await execFileAsync(gitBin, [
@@ -679,7 +677,6 @@ export class AppsService {
targetBranch,
`origin/${targetBranch}`,
], { cwd: workDir });
let forcePush = false;
try {
await execFileAsync(gitBin, [
'merge',
@@ -691,17 +688,10 @@ export class AppsService {
if (!isUnrelatedHistoryError(message)) {
throw error;
}
forcePush = true;
await execFileAsync(gitBin, [
'checkout',
'-B',
targetBranch,
commitSha,
], { cwd: workDir });
}
if (forcePush) {
pushArgs.splice(0, pushArgs.length, 'push', '--force-with-lease', 'origin', `HEAD:refs/heads/${targetBranch}`);
throw new BadRequestException(
`${repository} release 브랜치 승격 실패: ${message}.` +
' release 브랜치가 다른 시작점 히스토리를 가지고 있어 fast-forward로 병합할 수 없습니다.',
);
}
} else {
await execFileAsync(gitBin, [
@@ -712,7 +702,11 @@ export class AppsService {
], { cwd: workDir });
}
await execFileAsync(gitBin, pushArgs, { cwd: workDir });
await execFileAsync(gitBin, [
'push',
'origin',
`HEAD:refs/heads/${targetBranch}`,
], { cwd: workDir });
} catch (error) {
const message = error instanceof Error ? error.message : 'Unknown git promotion failure';
throw new BadRequestException(`${repository} release 브랜치 승격 실패: ${message}`);