Skip to content

Commit 83e4f1c

Browse files
lacolacoclaude
andauthored
fix: bot PR対応とnotion-sync channels抽出の堅牢化 (#1377)
- content-review/code-review: lacolaco-actions-worker[bot]をスキップ対象に追加 notion-sync PRはbot生成のため、claude-code-actionレビューをスキップ - notion-sync: channels抽出をtry-catchで保護(dry-run失敗防止) https://claude.ai/code/session_01Kzdqksm8Q9rpF9yPQSVRyz Co-authored-by: Claude <noreply@anthropic.com>
1 parent 89bec05 commit 83e4f1c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ jobs:
232232
uses: anthropics/claude-code-action@6062f3709600659be5e47fcddf2cf76993c235c2 # v1.0.76
233233
with:
234234
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
235+
allowed_bots: 'lacolaco-actions-worker[bot]'
235236
prompt: |
236237
このPRに含まれるブログ記事コンテンツの変更をレビューしてください。
237238
`gh pr diff ${{ github.event.pull_request.number }}` でdiffを取得し、コンテンツファイル(src/content/**, public/images/**)の変更のみを対象に文面チェックを行ってください。
@@ -320,6 +321,7 @@ jobs:
320321
uses: anthropics/claude-code-action@6062f3709600659be5e47fcddf2cf76993c235c2 # v1.0.76
321322
with:
322323
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
324+
allowed_bots: 'lacolaco-actions-worker[bot]'
323325
prompt: |
324326
このPRのコード変更をレビューしてください。
325327
`gh pr diff ${{ github.event.pull_request.number }}` でdiffを取得し、コードファイルの変更のみを対象にレビューを行ってください。

tools/notion-sync/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ const result = await syncNotionBlog({
7777
const icon = page.icon && page.icon.type === 'emoji' ? page.icon.emoji : '';
7878

7979
// channels マルチセレクトの読み取り
80-
const channels: string[] = extractMultiSelectNames(page.properties, 'channels');
80+
let channels: string[] = [];
81+
try {
82+
channels = extractMultiSelectNames(page.properties, 'channels');
83+
} catch {
84+
// channelsプロパティが存在しない場合は空配列
85+
}
8186

8287
// category=diaryかつslugがページID(空デフォルト)の場合、作成日時をslugとする
8388
let slug = metadata.slug;

0 commit comments

Comments
 (0)