Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/dependabot-pr-gate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { inspectAndroidTestImpact } from "./ci-test-plan.mjs";
export const GATE_MARKER = "<!-- dependabot-pr-gate:v1 -->";
export const DEPENDABOT_LOGIN = "dependabot[bot]";
export const ISSUE_LABELS = ["maintenance", "area:platform"];
export const ISSUE_ASSIGNEES = ["1hyok"];
export const ISSUE_ASSIGNEES = ["OnlyReadOneBook"];

const TITLE_ISSUE_PATTERN = /\(#(\d+)\)\s*$/;

Expand Down
12 changes: 6 additions & 6 deletions .github/scripts/dependabot-pr-gate.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ test("봇 범프가 androidTest 경계 경로를 건드리면 자동으로 정
);
});

test("대표 이슈는 issue.yml 양식이고 platform maintenance 로 1hyok 에게 간다", () => {
test("대표 이슈는 issue.yml 양식이고 platform maintenance 로 OnlyReadOneBook 에게 간다", () => {
const plan = buildPlan([".github/workflows/codeql.yml"]);
const issue = buildIssue({ title: BOT_TITLE, prNumber: 2106, changedPaths: [".github/workflows/codeql.yml"], plan });

assert.equal(issue.title, "chore(ci): dependabot 범프 수용: bump the github-actions-updates group with 3 updates");
assert.deepEqual(issue.labels, ISSUE_LABELS);
assert.deepEqual(issue.assignees, ISSUE_ASSIGNEES);
assert.deepEqual(ISSUE_LABELS, ["maintenance", "area:platform"]);
assert.deepEqual(ISSUE_ASSIGNEES, ["1hyok"]);
assert.deepEqual(ISSUE_ASSIGNEES, ["OnlyReadOneBook"]);
assert.match(issue.body, /^### 작업 유형\n\nmaintenance — /);
assert.match(issue.body, /### 주 담당 모듈\n\nplatform — /);
assert.match(issue.body, /PR #2106/);
Expand Down Expand Up @@ -97,7 +97,7 @@ test("게이트가 채운 봇 PR 은 Repository Quality 의 대표 이슈 연결
const result = await validatePullRequestIssueLink({
pullRequest: { number: 2106, ...next, user: { login: DEPENDABOT_LOGIN, type: "Bot" }, labels: [] },
repository: "Afternote/Afternote-FE",
loadIssue: async (number) => ({ number, state: "open", assignees: [{ login: "1hyok" }] }),
loadIssue: async (number) => ({ number, state: "open", assignees: [{ login: "OnlyReadOneBook" }] }),
});
assert.deepEqual(result, { issues: [2111], rejected: [] }, `reusedIssue=${reusedIssue}`);
}
Expand Down Expand Up @@ -178,7 +178,7 @@ test("await 는 기다릴 이유가 없으면 첫 조회로 끝난다", async ()
for (const pullRequest of [
FILLED,
handFilled,
{ ...UNFILLED, user: { login: "1hyok" } },
{ ...UNFILLED, user: { login: "OnlyReadOneBook" } },
{ ...UNFILLED, state: "closed" },
]) {
const live = sequence(pullRequest);
Expand Down Expand Up @@ -328,11 +328,11 @@ test("await 명령은 live PR JSON 을 파일에 쓰고, 제한 시간을 넘겨
test("인자 없이 부르면 채우기다: live PR 을 읽고 봇 PR 이 아니면 아무것도 쓰지 않는다", async () => {
const result = await runGateCli([], {
env: { GITHUB_TOKEN: "t", PR_NUMBER: "2138" },
pullRequest: { user: { login: "1hyok" }, state: "open", title: "x", body: "" },
pullRequest: { user: { login: "OnlyReadOneBook" }, state: "open", title: "x", body: "" },
});
assert.equal(result.code, 0, result.stderr);
assert.deepEqual(result.requests, ["GET /repos/Afternote/Afternote-FE/pulls/2138"]);
assert.match(result.stdout, /작성자가 1hyok 이라 건너뜀/);
assert.match(result.stdout, /작성자가 OnlyReadOneBook 이라 건너뜀/);
});

test("모르는 명령은 채우기로 떨어지지 않는다", async () => {
Expand Down
16 changes: 8 additions & 8 deletions .github/scripts/find-viewed-auto-merge-targets.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ test("Draft·이미 예약·큐에 있는 PR 은 건드리지 않는다", () =>
const scheduled = { autoMergeRequest: { enabledAt: "2026-10-04T00:00:00Z" } };

test("VIEWED_BY 본인이 작성한 PR 만 대상이다 — 대소문자 무시, 작성자 없음은 제외", () => {
assert.equal(isAuthoredByViewer({ author: { login: "1hyok" } }, "1hyok"), true);
assert.equal(isAuthoredByViewer({ author: { login: "1Hyok" } }, "1hyok"), true);
assert.equal(isAuthoredByViewer({ author: { login: "OnlyReadOneBook" } }, "OnlyReadOneBook"), true);
assert.equal(isAuthoredByViewer({ author: { login: "onlyreadonebook" } }, "OnlyReadOneBook"), true);
for (const author of [{ login: "koongmai" }, { login: "Sadturtleman" }, { login: "dependabot" }, null, undefined]) {
assert.equal(isAuthoredByViewer({ author }, "1hyok"), false, JSON.stringify(author));
assert.equal(isAuthoredByViewer({ author }, "OnlyReadOneBook"), false, JSON.stringify(author));
}
});

Expand Down Expand Up @@ -86,18 +86,18 @@ test("팀원·봇 PR 은 Viewed 가 다 차도 예약하지 않는다", async ()
listedPullRequest(2301, null),
listedPullRequest(2302, "koongmai"),
];
const actions = await collectViewedAutoMergeActions(noRequest, "Afternote", "Afternote-FE", "1hyok", pullRequests);
const actions = await collectViewedAutoMergeActions(noRequest, "Afternote", "Afternote-FE", "OnlyReadOneBook", pullRequests);
assert.deepEqual(actions, { targets: [] });
});

test("본인 PR 은 Viewed 가 다 차면 예약하고, 덜 찬 채 예약·큐에 있어도 빼지 않는다", async () => {
const pullRequests = [
listedPullRequest(10, "1hyok", { isInMergeQueue: true }, ["UNVIEWED", "UNVIEWED"]),
listedPullRequest(11, "1Hyok", scheduled, ["VIEWED", "DISMISSED"]),
listedPullRequest(12, "1hyok"),
listedPullRequest(10, "OnlyReadOneBook", { isInMergeQueue: true }, ["UNVIEWED", "UNVIEWED"]),
listedPullRequest(11, "OnlyReadOneBook", scheduled, ["VIEWED", "DISMISSED"]),
listedPullRequest(12, "OnlyReadOneBook"),
listedPullRequest(13, "dependabot", { isInMergeQueue: true }, ["UNVIEWED", "UNVIEWED"]),
];
const actions = await collectViewedAutoMergeActions(noRequest, "Afternote", "Afternote-FE", "1hyok", pullRequests);
const actions = await collectViewedAutoMergeActions(noRequest, "Afternote", "Afternote-FE", "OnlyReadOneBook", pullRequests);
assert.deepEqual(actions, { targets: [{ number: 12, headSha: pullRequest().headRefOid }] });
});

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/publish-dependency-audit-issues.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ async function main() {
findings,
token,
repository,
assignee: process.env.DEPENDENCY_AUDIT_ASSIGNEE ?? "1hyok",
assignee: process.env.DEPENDENCY_AUDIT_ASSIGNEE ?? "OnlyReadOneBook",
});
for (const result of results) {
console.log(`${result.action}: #${result.number} ${result.url}`);
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/publish-dependency-audit-issues.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function publish(finding, issues, commentsByNumber) {
findings: [finding],
token: "test-token",
repository: "Afternote/Afternote-FE",
assignee: "1hyok",
assignee: "OnlyReadOneBook",
api,
});
return { actions: results.map((item) => item.action), calls };
Expand Down
12 changes: 6 additions & 6 deletions .github/scripts/reconcile-issue-metadata.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ export const AREA_LABEL_BY_MODULE = Object.freeze({
});

export const ASSIGNEE_BY_MODULE = Object.freeze({
afternote: "1hyok",
afternote: "OnlyReadOneBook",
onboarding: "Sadturtleman",
core: "1hyok",
receiver: "1hyok",
setting: "1hyok",
core: "OnlyReadOneBook",
receiver: "OnlyReadOneBook",
setting: "OnlyReadOneBook",
timeletter: "koongmai",
mindrecord: "Sadturtleman",
home: "Sadturtleman",
app: "1hyok",
platform: "1hyok",
app: "OnlyReadOneBook",
platform: "OnlyReadOneBook",
});

// #1910: 담당 이관은 모듈마다 소급 범위를 고를 수 있다. 경계(fromIssue)를 두면 그 번호 미만의
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/reconcile-issue-metadata.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ test("replaces wrong type, area, legacy internal labels and assignees while pres
{ name: "area:core" },
{ name: "area:home" },
],
assignees: [{ login: "1hyok" }, { login: "Sadturtleman" }],
assignees: [{ login: "OnlyReadOneBook" }, { login: "Sadturtleman" }],
}));
assert.equal(inspection.status, "valid");
assert.equal(inspection.needsUpdate, true);
Expand Down
12 changes: 6 additions & 6 deletions .github/scripts/recover-base-deleted-pull-requests.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function recover(api, overrides = {}) {
repository: REPO,
ref: REF,
refType: "branch",
deletedBy: "1hyok",
deletedBy: "OnlyReadOneBook",
runUrl: RUN_URL,
observedAt: OBSERVED_AT,
sleep: noWait,
Expand Down Expand Up @@ -214,7 +214,7 @@ test("base 가 같은 이름으로 돌아와 있으면 PR 을 다시 열고 경
assert.equal(writes[1].apiPath, `/repos/${REPO}/issues/1626/comments`);
assert.ok(writes[1].body.body.startsWith(reopenMarker(REF)));
assert.match(writes[1].body.body, /base 브랜치 `feat\/1762-draft-resume` 가 삭제되면서/);
assert.match(writes[1].body.body, /@1hyok/);
assert.match(writes[1].body.body, /@OnlyReadOneBook/);
assert.ok(writes[1].body.body.includes(RUN_URL));
assert.ok(!api.calls.some((call) => call.method === "POST" && call.apiPath === `/repos/${REPO}/issues`));
});
Expand All @@ -241,7 +241,7 @@ test("삭제 이벤트가 자동 폐쇄보다 먼저 도착하면 반영을 기
repository: REPO,
ref: REF,
refType: "branch",
deletedBy: "1hyok",
deletedBy: "OnlyReadOneBook",
runUrl: RUN_URL,
observedAt: OBSERVED_AT,
sleep: noWait,
Expand Down Expand Up @@ -367,7 +367,7 @@ test("태그 삭제와 base 가 다른 PR 만 있는 삭제에는 아무것도
// ---- 문구 ----

test("경위 코멘트는 마커로 시작하고 닫힌 원인과 확인할 것을 적는다", () => {
const body = renderReopenComment({ ref: REF, deletedBy: "1hyok", runUrl: RUN_URL });
const body = renderReopenComment({ ref: REF, deletedBy: "OnlyReadOneBook", runUrl: RUN_URL });

assert.ok(body.startsWith(reopenMarker(REF)));
assert.match(body, /자동으로 닫혔다/);
Expand All @@ -380,7 +380,7 @@ test("추적 이슈는 복구 명령과 사슬을 함께 적는다", () => {
const issue = renderTrackingIssue({
ref: REF,
repository: REPO,
deletedBy: "1hyok",
deletedBy: "OnlyReadOneBook",
runUrl: RUN_URL,
lost: [{ pullRequest: lostPullRequest(), dependents: [1839] }],
});
Expand All @@ -398,7 +398,7 @@ test("추적 이슈는 이슈 양식 판정을 통과한다. 열리자마자 닫
const issue = renderTrackingIssue({
ref: REF,
repository: REPO,
deletedBy: "1hyok",
deletedBy: "OnlyReadOneBook",
runUrl: RUN_URL,
lost: [{ pullRequest: lostPullRequest(), dependents: [1839] }],
});
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/validate-pr-module-owner.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ test("남의 모듈 프로덕션 파일이 섞이면 모듈·담당자와 함께
{ path: "app/src/main/res/values/themes.xml", module: "app", owner: ASSIGNEE_BY_MODULE.app },
]);
const message = formatViolations(pr("Sadturtleman"), violations);
assert.match(message, /core\(담당 @1hyok\) 1건/);
assert.match(message, /app\(담당 @1hyok\) 1건/);
assert.match(message, /core\(담당 @OnlyReadOneBook\) 1건/);
assert.match(message, /app\(담당 @OnlyReadOneBook\) 1건/);
assert.match(message, /issue-assignee-exempt/);
});

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-queue-requeue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# GITHUB_TOKEN 으로 큐에 넣으면 GitHub 이 그 이벤트로 워크플로를 띄우지 않아 merge_group CI 가 하나도 돌지 않는다.
# 큐는 check timeout(60분)까지 기다렸다가 CI_TIMEOUT 으로 빼고, 그 뒤에 쌓인 PR 들도 다시 검증한다.
# 그래서 투입은 사람 토큰(MERGE_QUEUE_TOKEN, 1hyok 의 fine-grained PAT)으로 한다. 시크릿이 없으면 넣지 않고
# 그래서 투입은 사람 토큰(MERGE_QUEUE_TOKEN, OnlyReadOneBook 의 fine-grained PAT)으로 한다. 시크릿이 없으면 넣지 않고
# 직접 투입하라는 코멘트를 남긴다.
#
# 방출 판정과 마커 코멘트는 방출 처리 job 이 끝냈다. 여기서는 live 상태를 다시 보고 판정한 head 그대로 열려 있고
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/viewed-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Viewed 체크는 webhook 이벤트가 없어 주기 실행으로 훑는다. viewerViewedState 는 토큰 주인 본인 것만 보이므로 VIEWED_BY 의 읽기 전용 토큰을 VIEWED_TOKEN
# 시크릿으로 둔다. 시크릿이 없으면 아무것도 하지 않는다.
#
# 예약 쓰기는 MERGE_QUEUE_TOKEN(1hyok 의 fine-grained PAT)이 한다. GITHUB_TOKEN 으로 예약하거나 큐에 넣으면 GitHub 이
# 예약 쓰기는 MERGE_QUEUE_TOKEN(OnlyReadOneBook 의 fine-grained PAT)이 한다. GITHUB_TOKEN 으로 예약하거나 큐에 넣으면 GitHub 이
# 그 이벤트로 워크플로를 띄우지 않아 merge_group CI 가 하나도 돌지 않는다. 큐는 check timeout(60분)까지 맨 앞을 붙잡았다가
# CI_TIMEOUT 으로 빼고, 뒤에 쌓인 PR 들도 다시 검증한다(1005 #2208 실측). 시크릿이 없으면 예약하지 않는다.
name: Viewed Auto Merge
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
id: find
env:
VIEWED_TOKEN: ${{ secrets.VIEWED_TOKEN }}
VIEWED_BY: 1hyok
VIEWED_BY: OnlyReadOneBook
BASE_BRANCH: ${{ github.event.repository.default_branch }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_API_URL: ${{ github.api_url }}
Expand Down
Loading