feat: .github/policies/ テンプレート群を追加 (closes #723) - #725
Conversation
setup-team-protection と CI ワークフローで参照する判定基準を一元管理する ためのポリシーテンプレート (issue #723)。 - templates/github/policies/complexity-thresholds.json: McCabe / 認知的 複雑度・関数行数・ネスト深さ・ファイル行数の warning/error 閾値 - templates/github/policies/allowed-licenses.json: 許可・禁止・例外 ライセンスポリシー (複合ライセンス対応) - templates/github/policies/severity-definitions.md: セキュリティ重大度 (Critical/High/Medium/Low) と SLA・対応フローの定義 repo-maintenance.md section 3.22 に「テンプレート (欠落ファイルのみ追加)」 として登録。templates/github/policies/ → .github/policies/ の path mapping で配布される。 ソース: Elu-co-jp/job_description, Elu-co-jp/job-post-generator Refs: #723
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR establishes three reusable GitHub policy templates for managing license compliance, code complexity standards, and security vulnerability response. It registers these templates with the Config Template Sync workflow so they distribute missing files to target repositories, and validates all three templates with comprehensive test coverage. ChangesPolicy Templates Addition
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @keito4's task in 1m 39s —— View job PR レビュー
総評Verdict: APPROVE (minor / recommendation レベルの指摘のみ) 新規テンプレート3ファイル + 指摘事項minor:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce400b7124
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "LGPL-2.0", | ||
| "LGPL-2.1", | ||
| "LGPL-3.0", |
There was a problem hiding this comment.
Block LGPL SPDX variants explicitly
Add the -only / -or-later SPDX variants for LGPL to the blocked list, otherwise exact-string license checks can miss common identifiers such as LGPL-2.1-or-later and LGPL-3.0-or-later. This file already enumerates those variants for GPL/AGPL, so leaving LGPL as only LGPL-2.0, LGPL-2.1, and LGPL-3.0 creates an inconsistency that can let copyleft dependencies slip through policy enforcement.
Useful? React with 👍 / 👎.
|
(aside) |
|
Claude finished @keito4's task in 12m 23s —— View job CI 修正完了 ✅
調査結果と修正内容根本原因CI自体は失敗していないが、Lint & Format / Unit Tests / Integration Tests がすべて SKIPPING 状態でした。 原因は
PRで変更されたファイル( また 実施した修正
CI結果
|
templates/github/policies/ 以下のJSONとMarkdownファイルは dorny/paths-filter の code/scripts/dependencies フィルタに マッチしないためCIジョブがすべてSKIPしていた。 テストファイル追加により: - CI Lint & Format / Unit Tests が実際に実行される - policy JSON のスキーマ・閾値一貫性を自動検証 - severity-definitions.md のSLA定義存在確認 Co-authored-by: keito4 <keito4@users.noreply.github.com>
…templates # Conflicts: # .claude/commands/repo-maintenance.md
…eito4/config into feat/github-policies-templates
|
🎉 This PR is included in version 1.112.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Why
config-contribution-discoverの網羅的スキャン (Issue #723) で発見した、複数 repo (Elu-co-jp/job_description, Elu-co-jp/job-post-generator) で共通の.github/policies/設定を keito4/config に取り込む。判定基準を一元管理することで:
--failOnハードコードでは不可)What
新規テンプレート 3 ファイル + repo-maintenance section 3.22 への配布登録:
新規ファイル
templates/github/policies/complexity-thresholds.jsontemplates/github/policies/allowed-licenses.jsontemplates/github/policies/severity-definitions.mdrepo-maintenance.md 変更
.github/policies/*をテンプレート行として追加templates/github/policies/→.github/policies/)How
/repo-maintenance --mode full実行時、以下が起きる:templates/github/policies/*.{json,md}を.github/policies/へコピー (欠落のみ)Risk
Test plan
prettier --checkパスpre-commithooks (test 95 件) パス/repo-maintenance --mode fullを実行し、.github/policies/3 ファイルが配置されることを確認Follow-up
.github/workflows/security.ymlの license-check を policy ファイル参照方式にリファクタ (別 PR、issue feat: Add .github/policies/ templates (complexity / license / severity definitions) #723 内に記載)eslint-plugin-sonarjsベースで templates 化 (別 PR)Closes #723
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests
Chores