diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 8075dcda..ca99b821 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -5,7 +5,7 @@ on: types: [opened, reopened, ready_for_review] issue_comment: types: [created] - workflow_call: + workflow_dispatch: # デフォルトのシェルをbashに設定 defaults: @@ -14,6 +14,9 @@ defaults: jobs: pr-agent: + # ボットからのイベントは無視 + if: ${{ github.event.sender.type != 'Bot' }} + runs-on: ubuntu-latest timeout-minutes: 10 @@ -29,6 +32,6 @@ jobs: env: OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_REVIEWER.EXTRA_INSTRUCTIONS: "プルリクエストのレビューを日本語で行ってください。コードの品質、改善点、潜在的な問題に焦点を当ててください。" - PR_DESCRIPTION.EXTRA_INSTRUCTIONS: "日本語で詳細な説明を提供してください。コミットリントのパターン(`feat:`, `chore:`, `test:`, `fix:`, `ci:`, `docs:` など)に従ってタイトルを付けてください。" - PR_TITLE.EXTRA_INSTRUCTIONS: "日本語でタイトルを作成し、コミットリントのパターン(`feat:`, `chore:`, `test:`, `fix:`, `ci:`, `docs:` など)に従ってください。" + github_action_config.auto_review: "true" # enable\disable auto review + github_action_config.auto_describe: "true" # enable\disable auto describe + github_action_config.auto_improve: "true" # enable\disable auto improve diff --git a/.gitignore b/.gitignore index 97987d23..c72ef14a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,9 @@ src/backend/lambda/**/__pycache__/** .DS_Store node_modules +.pytest_cache/ +.ruff_cache/ +.tox/ +.coverage +.cache/ +pytestdebug.log diff --git a/.pr_agent.toml b/.pr_agent.toml new file mode 100644 index 00000000..e1ac11dc --- /dev/null +++ b/.pr_agent.toml @@ -0,0 +1,40 @@ +# https://pr-agent-docs.codium.ai/ +# https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml + +[config] +ignore_pr_labels = ['renovate'] +model = 'gpt-4o-mini-2024-07-18' + +[ignore] +glob = ['*.lock.hcl', '*.sops.yaml', '*.toml'] + +[pr_description] +generate_ai_title = true +final_update_message = true +extra_instructions = """\ +Emphasize the following: +- Please use Japanese for everything. +- Titles should have a prefix following the commitlint pattern, such as feat:, chore:, test:, fix:, docs:, style:, refactor:, perf:, etc. +""" + +[pr_reviewer] +require_tests_review = false +require_can_be_split_review = true +num_code_suggestions = 3 +inline_code_comments = true +enable_auto_approval = true +maximal_review_effort = 3 +extra_instructions = """\ +Emphasize the following: +- Please use Japanese for everything. +""" + +[pr_code_suggestions] +num_code_suggestions = 3 +rank_suggestions = true +commitable_code_suggestions = true +demand_code_suggestions_self_review = true +extra_instructions = """\ +Emphasize the following: +- Please use Japanese for everything. +""" diff --git a/src/frontend/src/components/layout/ContentLayout.tsx b/src/frontend/src/components/layout/ContentLayout.tsx index d9792171..e36139b1 100644 --- a/src/frontend/src/components/layout/ContentLayout.tsx +++ b/src/frontend/src/components/layout/ContentLayout.tsx @@ -1,6 +1,7 @@ import type React from 'react' import { Header } from '../Elements/Header' -import { Tab } from '../Elements/Tab' +import { Tab } from '../ui/Tab' + type ContentLayoutProps = { children: React.ReactNode pagetitle: string diff --git a/src/frontend/src/components/Elements/Tab/Tab.tsx b/src/frontend/src/components/ui/Tab/Tab.tsx similarity index 86% rename from src/frontend/src/components/Elements/Tab/Tab.tsx rename to src/frontend/src/components/ui/Tab/Tab.tsx index b83961e5..68ed749e 100644 --- a/src/frontend/src/components/Elements/Tab/Tab.tsx +++ b/src/frontend/src/components/ui/Tab/Tab.tsx @@ -13,13 +13,7 @@ import { import { getToday } from '@/utils/dateUtils' import { TabItem } from './TabItem' - -type TabConfig = { - path: string - label: string - activeIcon: string - inactiveIcon: string -} +import type { TabConfig } from './types' const TAB_ITEMS: TabConfig[] = [ { @@ -61,10 +55,10 @@ const TAB_ITEMS: TabConfig[] = [ export const Tab = () => { return ( // タブナビゲーションのコンテナ要素 -