feat(design): 디자인 시스템 토큰 적용 및 Float 카탈로그 추가 #161
@ -1,52 +0,0 @@
|
||||
import https from 'https';
|
||||
|
||||
const prNumber = 161;
|
||||
const giteaToken = process.env.GITEA_TOKEN;
|
||||
const botToken = process.env.CLAUDE_BOT_TOKEN;
|
||||
|
||||
function req(method, path, token, body) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const data = body ? JSON.stringify(body) : '';
|
||||
const r = https.request({
|
||||
hostname: 'gitea.gc-si.dev',
|
||||
path,
|
||||
method,
|
||||
headers: {
|
||||
'Authorization': `token ${token}`,
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Length': Buffer.byteLength(data),
|
||||
},
|
||||
}, (res) => {
|
||||
let buf = '';
|
||||
res.on('data', (c) => buf += c);
|
||||
res.on('end', () => resolve({ status: res.statusCode, body: buf }));
|
||||
});
|
||||
r.on('error', reject);
|
||||
if (data) r.write(data);
|
||||
r.end();
|
||||
});
|
||||
}
|
||||
|
||||
(async () => {
|
||||
if (!botToken) {
|
||||
console.log('NO_BOT_TOKEN: skipping approval/merge');
|
||||
process.exit(0);
|
||||
}
|
||||
// 1. approve
|
||||
const ap = await req('POST', `/api/v1/repos/gc/wing-ops/pulls/${prNumber}/reviews`, botToken, {
|
||||
event: 'APPROVED',
|
||||
body: 'MR 승인 (via /mr skill)',
|
||||
});
|
||||
console.log(`APPROVE_STATUS=${ap.status}`);
|
||||
if (ap.status >= 300) { console.error(ap.body); process.exit(1); }
|
||||
|
||||
// 2. merge
|
||||
const mg = await req('POST', `/api/v1/repos/gc/wing-ops/pulls/${prNumber}/merge`, giteaToken, {
|
||||
Do: 'merge',
|
||||
merge_message_field: 'feat(design): 디자인 시스템 토큰 적용 및 Float 카탈로그 추가',
|
||||
delete_branch_after_merge: true,
|
||||
});
|
||||
console.log(`MERGE_STATUS=${mg.status}`);
|
||||
if (mg.status >= 300) { console.error(mg.body); process.exit(1); }
|
||||
console.log('MERGE_DONE');
|
||||
})();
|
||||
@ -1,52 +0,0 @@
|
||||
import https from 'https';
|
||||
|
||||
const token = process.env.GITEA_TOKEN;
|
||||
if (!token) { console.error('NO_TOKEN'); process.exit(1); }
|
||||
|
||||
const body = {
|
||||
title: 'feat(design): 디자인 시스템 토큰 적용 및 Float 카탈로그 추가',
|
||||
body: `## 변경 사항
|
||||
- 디자인 시스템 Float 카탈로그 추가 (Modal / Dropdown / Overlay / Toast)
|
||||
- 디자인 시스템 폰트/색상 토큰을 전 탭 컴포넌트(admin, aerial, assets, board, hns, incidents, prediction, reports, rescue, scat, weather)에 전면 적용
|
||||
- 릴리즈 노트 업데이트
|
||||
|
||||
## 관련 이슈
|
||||
- (없음)
|
||||
|
||||
## 테스트
|
||||
- [x] TypeScript 타입 체크 통과 (pre-commit)
|
||||
- [x] ESLint 통과 (pre-commit)
|
||||
- [ ] 기존 기능 동작 확인
|
||||
`,
|
||||
head: 'feature/design-system-refactoring',
|
||||
base: 'develop',
|
||||
};
|
||||
|
||||
const data = JSON.stringify(body);
|
||||
const req = https.request({
|
||||
hostname: 'gitea.gc-si.dev',
|
||||
path: '/api/v1/repos/gc/wing-ops/pulls',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `token ${token}`,
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Length': Buffer.byteLength(data),
|
||||
},
|
||||
}, (res) => {
|
||||
let buf = '';
|
||||
res.on('data', (c) => buf += c);
|
||||
res.on('end', () => {
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
const pr = JSON.parse(buf);
|
||||
console.log(`PR_NUMBER=${pr.number}`);
|
||||
console.log(`PR_URL=${pr.html_url}`);
|
||||
} else {
|
||||
console.error(`STATUS=${res.statusCode}`);
|
||||
console.error(buf);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
req.on('error', (e) => { console.error(e); process.exit(1); });
|
||||
req.write(data);
|
||||
req.end();
|
||||
불러오는 중...
Reference in New Issue
Block a user