chore(ci): GitHub Actions 중복 크론을 제거하고 이슈·자동화를 Gitea로 이관한다
Check / Plugin Marketplace Lint (push) Waiting to run
Check / Web Check (push) Waiting to run
Deploy Blog / Build & Deploy dev.goraebap.xyz (push) Canceled after 0s

- audit-l1, audit-l2, audit-quality, weekly-triage 워크플로의 schedule 트리거 제거 (수동 workflow_dispatch 전용)
- 외부 의존성 없는 Gitea 이슈·PR CLI 헬퍼(scripts/gitea.mjs) 추가
- docs/agents/issue-tracker.md, triage-labels.md, AGENTS.md를 Gitea(goraebap.xyz/studio/dev.goraebap) 기준으로 갱신
This commit is contained in:
goraebap committed 2026-11-30 21:12:39 +09:00
1 parent 0edb9eef39
commit 6a1ce5e4c4
8 files changed
+266 -48

No files matched your search

+1 -3
View File
@@ -1,8 +1,6 @@
name: L1 Static Audit
on:
schedule:
# 매주 월요일 09:00 KST (00:00 UTC)
- cron: "0 0 * * 1"
# 정기 실행은 홈서버 Paseo 스케줄(weekly-l1-audit · Gitea 이슈 연동)로 이관됨. 수동 실행 전용.
workflow_dispatch:
permissions:
+1 -3
View File
@@ -1,8 +1,6 @@
name: L2 Monthly Official Docs Audit
on:
schedule:
# 매월 1일 09:30 KST (00:30 UTC)
- cron: "30 0 1 * *"
# 정기 실행은 홈서버 Paseo 스케줄(monthly-docs-audit · Gitea 이슈 연동)로 이관됨. 수동 실행 전용.
workflow_dispatch:
permissions:
+1 -3
View File
@@ -1,8 +1,6 @@
name: Weekly AI Quality & Fact Audit
on:
schedule:
# 매주 토요일 10:00 KST (01:00 UTC) — 일요일 주간 트리아지 전날 증분 평가
- cron: "0 1 * * 6"
# 정기 실행은 홈서버 Paseo 스케줄(weekly-quality-audit · Gitea PR 연동)로 이관됨. 수동 실행 전용.
workflow_dispatch:
inputs:
batch_size:
+1 -5
View File
@@ -1,11 +1,7 @@
name: Weekly Inbox Triage & PR Revision
on:
schedule:
# 매주 일요일 10:00 KST (01:00 UTC)
- cron: "0 1 * * 0"
# 정기 실행과 이슈 트래커는 홈서버 Paseo 스케줄(weekly-inbox-triage · Gitea)로 이관됨. 수동 실행 전용.
workflow_dispatch:
issue_comment:
types: [created]
concurrency:
group: weekly-triage-${{ github.event.issue.number || 'batch' }}
+1 -1
View File
@@ -23,7 +23,7 @@
| `skills/` 스킬 작성 · 3계층 단방향 · `scripts/market/` 동기화·린트 | `docs/guides/guidelines.md` |
| Diátaxis 분면(플레이북·아티클·레퍼런스·용어집·품질 점수) 문서 작성 | `docs/guides/diataxis.md` |
| `web/apps/blog/` 마켓플레이스·스킬북·블로그·검색·프리렌더·빌드·배포 | `docs/guides/blog.md` |
| 이슈 생성·조회 (`gh`) | `docs/agents/issue-tracker.md` |
| 이슈 생성·조회 (Gitea `scripts/gitea.mjs`) | `docs/agents/issue-tracker.md` |
| 이슈 Triage 라벨 | `docs/agents/triage-labels.md` |
| 용어집(`glossary/index.md`) · ADR(`docs/adr/`) 작성 | `docs/agents/domain.md` |
+14 -32
View File
@@ -1,46 +1,28 @@
# 이슈 트래커: GitHub
# 이슈 트래커: Gitea
이 저장소의 이슈와 명세는 GitHub Issues(`dev-goraebap/dev.goraebap`)에 둡니다. 모든 작업은 `gh` CLI로 합니다. `gitea` 원격은 미러이므로 이슈를 남기지 않습니다.
이 저장소의 이슈와 PR은 자체 호스팅 Gitea([goraebap.xyz/studio/dev.goraebap](https://goraebap.xyz/studio/dev.goraebap))에서 관리합니다. 모든 이슈·PR 작업은 저장소에 포함된 [scripts/gitea.mjs](../../scripts/gitea.mjs)로 수행합니다(토큰은 `GITEA_TOKEN` 환경변수 또는 `~/.gitea-token` 자동 탐색).
## 사용법
- **이슈 만들기**: `gh issue create --title "..." --body "..."`. 여러 줄 본문은 heredoc으로 넘깁니다.
- **이슈 읽기**: `gh issue view <번호> --json number,title,body,labels,comments`.
- **이슈 목록**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'`에 필요한 `--label`, `--state` 필터를 붙입니다.
- **하위 이슈로 잇기**: `gh issue create --parent <부모> ...`로 만들거나, 만든 뒤 `gh issue edit <부모> --add-sub-issue <자식>`으로 잇습니다(`gh` 2.94 이상). 그보다 낮은 `gh`에서는 `gh api --method POST repos/<owner>/<repo>/issues/<부모>/sub_issues -F sub_issue_id=<자식 데이터베이스 id>`를 씁니다(id는 아래 **막힘**과 같은 데이터베이스 id). 하위 이슈를 쓸 수 없으면 자식 본문 맨 위에 `Part of #<부모>`를 적습니다.
- **댓글 달기**: `gh issue comment <번호> --body "..."`.
- **라벨 붙이기·떼기**: `gh issue edit <번호> --add-label "..."` / `--remove-label "..."`.
- **닫기**: `gh issue close <번호> --comment "..."`.
- **이슈 만들기**: `node scripts/gitea.mjs issue create --title "..." --body "..." --label "inbox:bug"` (긴 본문은 `--body-file <경로>`)
- **이슈 읽기**: `node scripts/gitea.mjs issue view <번호>` (`--json` 지원)
- **이슈 목록**: `node scripts/gitea.mjs issue list --state open --label "inbox:audit" --json`
- **댓글 달기**: `node scripts/gitea.mjs issue comment <번호> --body "..."`
- **라벨 붙이기 · 닫기**: `node scripts/gitea.mjs issue edit <번호> --add-label "..." --close --comment "..."`
- **PR 목록 · 생성**: `node scripts/gitea.mjs pr list` / `node scripts/gitea.mjs pr create --title "..." --head <브랜치> --base main --draft`
저장소는 `git remote -v`에서 정해지며, 클론 안에서 실행하면 `gh`가 알아서 찾습니다.
## 신뢰 작성자 가드레일 (자동화 스케줄)
공개 저장소이므로 홈서버 Paseo 자동화 스케줄은 **소유자(`goraebap`)가 작성한 `inbox:*` 이슈만** 자동 처리합니다.
## PR을 triage 대상으로 보기
**PR을 요청 창구로 봄: no.** _(외부 PR을 기능 요청으로 다루려면 `yes`로 바꿉니다. `/triage`가 이 값을 읽습니다.)_
`yes`이면 PR도 이슈와 같은 라벨과 상태를 거치며 `gh pr` 명령을 씁니다.
- **PR 읽기**: `gh pr view <번호> --comments`, 변경은 `gh pr diff <번호>`.
- **triage할 외부 PR 목록**: `gh api --paginate 'repos/{owner}/{repo}/pulls?state=open' --jq '.[] | select(.author_association | IN("OWNER","MEMBER","COLLABORATOR") | not) | {number, title, author: .user.login, author_association, labels: [.labels[].name]}'`.
- **댓글·라벨·닫기**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
GitHub는 이슈와 PR이 번호를 함께 쓰므로 `#42`만으로는 어느 쪽인지 모릅니다. `gh pr view 42`로 확인하고, 없으면 `gh issue view 42`를 봅니다.
**PR을 요청 창구로 봄: no.** _(외부 PR을 기능 요청으로 다루려면 `yes`로 바꿉니다.)_
## 스킬이 "이슈 트래커에 올리라"고 할 때
GitHub 이슈를 만듭니다.
`node scripts/gitea.mjs issue create`로 Gitea 이슈를 만듭니다.
## 스킬이 "관련 티켓을 가져오라"고 할 때
위 **이슈 읽기**대로 읽습니다.
## 길찾기 운영
`/wayfinder`가 씁니다. **지도**는 이슈 하나이고, 그 **자식** 이슈가 티켓입니다.
- **지도**: `wayfinder:map` 라벨을 단 이슈 하나에 Notes / Decisions-so-far / Fog 본문을 둡니다. `gh issue create --label wayfinder:map`.
- **자식 티켓**: GitHub 하위 이슈로 지도에 잇습니다(**하위 이슈로 잇기** 참고). 하위 이슈를 쓸 수 없으면 지도 본문의 작업 목록에 넣고 자식 본문 맨 위에 `Part of #<지도>`를 적습니다. 라벨은 `wayfinder:<유형>`(`research`/`prototype`/`grilling`/`task`)입니다. 맡으면 작업하는 개발자에게 배정합니다.
- **막힘**: GitHub **기본 이슈 의존 관계**가 원본이며 화면에도 보입니다. `gh api --method POST repos/<owner>/<repo>/issues/<자식>/dependencies/blocked_by -F issue_id=<막는 이슈 데이터베이스 id>`로 잇습니다. 데이터베이스 id는 `gh api repos/<owner>/<repo>/issues/<n> --jq .id`로 얻으며 `#번호`나 `node_id`가 아닙니다. GitHub는 `issue_dependencies_summary.blocked_by`(열린 막는 이슈 수)를 알려 주며, 이것이 실제 관문입니다. 의존 관계를 쓸 수 없으면 자식 본문 맨 위에 `Blocked by: #<n>, #<n>`을 적습니다. 막는 이슈가 모두 닫히면 풀립니다.
- **다음 일 찾기**: 지도의 열린 자식(`gh issue list --state open`, 지도의 하위 이슈·작업 목록 범위)에서 열린 막는 이슈가 있거나(`issue_dependencies_summary.blocked_by > 0`, 또는 `Blocked by` 줄에 열린 이슈) 담당자가 있는 것을 뺍니다. 지도 순서로 첫 번째를 고릅니다.
- **맡기**: `gh issue edit <n> --add-assignee @me`를 세션의 첫 쓰기로 합니다.
- **풀기**: `gh issue comment <n> --body "<답>"` 후 `gh issue close <n>`을 하고, 지도의 Decisions-so-far에 요지와 링크를 덧붙입니다.
`node scripts/gitea.mjs issue view <번호>`로 읽습니다.
+1 -1
View File
@@ -16,7 +16,7 @@
## 자율 개선 인박스 라벨 (`inbox:*`)
`fullstack:feedback` 스킬과 L1/L2 자동 감사 워크플로가 수집하는 피드백 라벨입니다.
`kit:feedback` 스킬과 홈서버 Paseo 자동 감사 스케줄이 수집하는 피드백 라벨입니다.
| 라벨 | 용도 | 주간 배치 처리 방식 |
| :--- | :--- | :--- |
+246
View File
@@ -0,0 +1,246 @@
#!/usr/bin/env node
/**
* Gitea (https://goraebap.xyz/studio/dev.goraebap) 이슈·PR 관리 초경량 CLI (외부 의존성 0).
*
* 토큰 탐색 순서:
* 1. process.env.GITEA_TOKEN
* 2. ~/.gitea-token
*
* 주요 명령:
* node scripts/gitea.mjs issue list [--state open|closed|all] [--label a,b] [--json]
* node scripts/gitea.mjs issue view <number> [--json]
* node scripts/gitea.mjs issue create --title "..." [--body "..."] [--body-file path] [--label a,b]
* node scripts/gitea.mjs issue edit <number> [--title "..."] [--body "..."] [--body-file path] [--add-label a,b] [--close|--reopen]
* node scripts/gitea.mjs issue comment <number> (--body "..." | --body-file path)
* node scripts/gitea.mjs pr list [--state open|closed|all] [--json]
* node scripts/gitea.mjs pr create --title "..." --head <branch> [--base main] [--body "..."] [--body-file path] [--draft]
*/
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
const BASE_URL = (process.env.GITEA_URL || 'https://goraebap.xyz').replace(/\/+$/, '');
const OWNER = process.env.GITEA_OWNER || 'studio';
const REPO = process.env.GITEA_REPO || 'dev.goraebap';
function loadToken() {
if (process.env.GITEA_TOKEN) return process.env.GITEA_TOKEN.trim();
const candidates = [path.join(os.homedir(), '.gitea-token')];
for (const file of candidates) {
if (fs.existsSync(file)) {
const val = fs.readFileSync(file, 'utf8').trim();
if (val) return val;
}
}
return '';
}
function parseArgs(argv) {
const positionals = [];
const flags = {};
for (let i = 0; i < argv.length; i++) {
const arg = argv[i];
if (!arg.startsWith('--')) {
positionals.push(arg);
continue;
}
const key = arg.slice(2);
const next = argv[i + 1];
if (!next || next.startsWith('--')) {
flags[key] = true;
} else {
flags[key] = next;
i++;
}
}
return { positionals, flags };
}
function readBody(flags) {
if (flags['body-file']) return fs.readFileSync(String(flags['body-file']), 'utf8');
if (typeof flags.body === 'string') return flags.body;
return undefined;
}
async function api(method, endpoint, body) {
const token = loadToken();
const headers = { Accept: 'application/json' };
if (token) headers.Authorization = `token ${token}`;
if (body !== undefined) headers['Content-Type'] = 'application/json';
const res = await fetch(`${BASE_URL}/api/v1${endpoint}`, {
method,
headers,
body: body !== undefined ? JSON.stringify(body) : undefined,
});
const text = await res.text();
let data = null;
try {
data = text ? JSON.parse(text) : null;
} catch {
data = text;
}
if (!res.ok) {
const msg = typeof data === 'object' && data?.message ? data.message : text;
throw new Error(`Gitea API ${method} ${endpoint} failed (${res.status}): ${msg}`);
}
return data;
}
async function resolveLabelIds(csv) {
if (!csv) return [];
const names = String(csv)
.split(',')
.map(s => s.trim())
.filter(Boolean);
if (names.length === 0) return [];
const all = await api('GET', `/repos/${OWNER}/${REPO}/labels?limit=100`);
const byName = new Map(all.map(l => [l.name, l.id]));
const ids = [];
for (const name of names) {
const id = byName.get(name);
if (!id) throw new Error(`라벨을 찾을 수 없습니다: ${name}`);
ids.push(id);
}
return ids;
}
function printIssueSummary(issue) {
const labels = (issue.labels || []).map(l => l.name).join(', ');
const author = issue.user?.login || '?';
console.log(`#${issue.number} [${issue.state}] ${issue.title} (${author})${labels ? ` [${labels}]` : ''}`);
}
async function main() {
const { positionals, flags } = parseArgs(process.argv.slice(2));
const [resource, action, target] = positionals;
if (resource === 'issue') {
if (action === 'list') {
const params = new URLSearchParams({
type: 'issues',
state: String(flags.state || 'open'),
limit: String(flags.limit || '50'),
});
if (flags.label) params.set('labels', String(flags.label));
const issues = await api('GET', `/repos/${OWNER}/${REPO}/issues?${params.toString()}`);
if (flags.json) {
console.log(JSON.stringify(issues, null, 2));
} else if (issues.length === 0) {
console.log('(열린 이슈 없음)');
} else {
for (const issue of issues) printIssueSummary(issue);
}
return;
}
if (action === 'view') {
if (!target) throw new Error('이슈 번호가 필요합니다.');
const [issue, comments] = await Promise.all([
api('GET', `/repos/${OWNER}/${REPO}/issues/${target}`),
api('GET', `/repos/${OWNER}/${REPO}/issues/${target}/comments`),
]);
const full = { ...issue, comments };
if (flags.json) {
console.log(JSON.stringify(full, null, 2));
} else {
printIssueSummary(issue);
console.log(issue.html_url);
console.log('\n' + (issue.body || ''));
if (comments.length > 0) {
console.log('\n--- 댓글 ---');
for (const c of comments) {
console.log(`@${c.user?.login || '?'}: ${c.body}`);
}
}
}
return;
}
if (action === 'create') {
if (!flags.title) throw new Error('--title이 필요합니다.');
const payload = {
title: String(flags.title),
body: readBody(flags) ?? '',
};
if (flags.label) payload.labels = await resolveLabelIds(flags.label);
const created = await api('POST', `/repos/${OWNER}/${REPO}/issues`, payload);
console.log(flags.json ? JSON.stringify(created, null, 2) : `Created #${created.number}: ${created.html_url}`);
return;
}
if (action === 'edit') {
if (!target) throw new Error('이슈 번호가 필요합니다.');
const payload = {};
if (flags.title) payload.title = String(flags.title);
const body = readBody(flags);
if (body !== undefined) payload.body = body;
if (flags.close) payload.state = 'closed';
if (flags.reopen) payload.state = 'open';
let updated = null;
if (Object.keys(payload).length > 0) {
updated = await api('PATCH', `/repos/${OWNER}/${REPO}/issues/${target}`, payload);
}
if (flags['add-label']) {
const ids = await resolveLabelIds(flags['add-label']);
await api('POST', `/repos/${OWNER}/${REPO}/issues/${target}/labels`, { labels: ids });
}
if (flags.comment) {
await api('POST', `/repos/${OWNER}/${REPO}/issues/${target}/comments`, { body: String(flags.comment) });
}
console.log(flags.json ? JSON.stringify(updated ?? { number: Number(target), ok: true }, null, 2) : `Updated #${target}`);
return;
}
if (action === 'comment') {
if (!target) throw new Error('이슈 번호가 필요합니다.');
const body = readBody(flags);
if (!body) throw new Error('--body 또는 --body-file이 필요합니다.');
const res = await api('POST', `/repos/${OWNER}/${REPO}/issues/${target}/comments`, { body });
console.log(flags.json ? JSON.stringify(res, null, 2) : `Commented on #${target}`);
return;
}
}
if (resource === 'pr') {
if (action === 'list') {
const params = new URLSearchParams({
state: String(flags.state || 'open'),
limit: String(flags.limit || '30'),
});
const prs = await api('GET', `/repos/${OWNER}/${REPO}/pulls?${params.toString()}`);
if (flags.json) {
console.log(JSON.stringify(prs, null, 2));
} else if (prs.length === 0) {
console.log('(열린 PR 없음)');
} else {
for (const pr of prs) console.log(`#${pr.number} [${pr.state}] ${pr.title} (${pr.head?.label} -> ${pr.base?.label})`);
}
return;
}
if (action === 'create') {
if (!flags.title || !flags.head) throw new Error('--title과 --head가 필요합니다.');
const rawTitle = String(flags.title);
const title = flags.draft && !/^WIP:/i.test(rawTitle) ? `WIP: ${rawTitle}` : rawTitle;
const payload = {
title,
head: String(flags.head),
base: String(flags.base || 'main'),
body: readBody(flags) ?? '',
};
const pr = await api('POST', `/repos/${OWNER}/${REPO}/pulls`, payload);
console.log(flags.json ? JSON.stringify(pr, null, 2) : `Created PR #${pr.number}: ${pr.html_url}`);
return;
}
}
console.error('사용법: node scripts/gitea.mjs <issue|pr> <list|view|create|edit|comment> [args]');
process.exit(1);
}
main().catch(err => {
console.error(err.message || err);
process.exit(1);
});