Repository navigation
feat: 開発環境の包括的な改善 #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 開発環境の包括的な改善 #552
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: Update Claude Plugins | ||
|
|
||
| on: | ||
| schedule: | ||
| # 毎週月曜日 UTC 6:00(JST 15:00)に実行 | ||
| - cron: '0 6 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| check-updates: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install Claude Code | ||
| run: | | ||
| curl -fsSL https://claude.ai/install.sh | bash | ||
| echo "$HOME/.claude/local/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Check for plugin updates | ||
| id: check | ||
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| run: | | ||
| # プラグインリストを読み込み | ||
| PLUGINS_FILE=".claude/plugins/plugins.txt" | ||
| UPDATES="" | ||
| HAS_UPDATES="false" | ||
|
|
||
| # プラグインごとに更新をチェック | ||
| while IFS= read -r line || [[ -n "$line" ]]; do | ||
| # コメントと空行をスキップ | ||
| [[ "$line" =~ ^#.*$ || -z "$line" ]] && continue | ||
|
|
||
| PLUGIN_NAME=$(echo "$line" | cut -d'@' -f1) | ||
| MARKETPLACE=$(echo "$line" | cut -d'@' -f2) | ||
|
|
||
| echo "Checking $PLUGIN_NAME from $MARKETPLACE..." | ||
|
|
||
| # claude plugin list で現在のバージョンを取得(認証なしでも動作する場合) | ||
| # 注: 実際のバージョンチェックは claude CLI の機能に依存 | ||
|
|
||
| done < "$PLUGINS_FILE" | ||
|
|
||
| # マーケットプレイスの更新情報を取得 | ||
| echo "Checking marketplace updates..." | ||
|
|
||
| # 更新があるかチェック(簡易版) | ||
| # 実際の実装では claude CLI または API を使用 | ||
| echo "has_updates=false" >> $GITHUB_OUTPUT | ||
| echo "summary=Plugin update check completed. Manual review recommended." >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Update plugins list | ||
| if: steps.check.outputs.has_updates == 'true' | ||
| run: | | ||
| echo "Updating plugins.txt with new versions..." | ||
| # 実装: 新しいバージョン情報でファイルを更新 | ||
|
Comment on lines
+33
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workflow is effectively a no-op right now.
🤖 Prompt for AI Agents |
||
|
|
||
| - name: Create pull request | ||
| if: steps.check.outputs.has_updates == 'true' | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| branch: fix/update-claude-plugins | ||
| delete-branch: true | ||
| commit-message: 'fix: update Claude plugins' | ||
| title: 'fix: update Claude plugins' | ||
| body: | | ||
| ## Claude プラグインの更新 | ||
|
|
||
| ${{ steps.check.outputs.summary }} | ||
|
|
||
| ### プラグイン一覧 | ||
|
|
||
| ``` | ||
| $(cat .claude/plugins/plugins.txt | grep -v '^#' | grep -v '^$') | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| **Auto-generated by:** [update-claude-plugins.yml](.github/workflows/update-claude-plugins.yml) | ||
| labels: dependencies | ||
|
|
||
| - name: Summary | ||
| run: | | ||
| echo "ℹ️ Claude plugin update check completed" | ||
| echo "Current plugins:" | ||
| cat .claude/plugins/plugins.txt | grep -v '^#' | grep -v '^$' || true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| name: Update Development Tools | ||
|
|
||
| on: | ||
| schedule: | ||
| # 毎日 UTC 5:00(JST 14:00)に実行 | ||
| - cron: '0 5 * * *' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| check-updates: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| outputs: | ||
| has_updates: ${{ steps.compare.outputs.has_updates }} | ||
| updates_summary: ${{ steps.compare.outputs.summary }} | ||
| steps: | ||
|
Comment on lines
+17
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gate the autogenerated PR behind validation jobs. This workflow rewrites Also applies to: 113-162 🤖 Prompt for AI Agents |
||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Get current versions from Dockerfile | ||
| id: current | ||
| run: | | ||
| echo "gh_cli=$(grep -oP 'GH_CLI_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
| echo "doppler=$(grep -oP 'DOPPLER_CLI_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
| echo "op_cli=$(grep -oP 'OP_CLI_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
| echo "node=$(grep -oP 'NODE_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
| echo "pnpm=$(grep -oP 'PNPM_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
| echo "claude_code=$(grep -oP 'CLAUDE_CODE_VERSION=\K[0-9.]+' .devcontainer/Dockerfile)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Get latest versions | ||
| id: latest | ||
| run: | | ||
| # GitHub CLI - GitHub Releases API | ||
| GH_LATEST=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.tag_name' | sed 's/^v//') | ||
| echo "gh_cli=$GH_LATEST" >> $GITHUB_OUTPUT | ||
|
|
||
| # Doppler CLI - GitHub Releases API | ||
| DOPPLER_LATEST=$(curl -s https://api.github.com/repos/DopplerHQ/cli/releases/latest | jq -r '.tag_name' | sed 's/^v//') | ||
| echo "doppler=$DOPPLER_LATEST" >> $GITHUB_OUTPUT | ||
|
|
||
| # 1Password CLI - releases page | ||
| OP_LATEST=$(curl -s https://app-updates.agilebits.com/check/1/0/CLI2/en/0/N -H "User-Agent: Mozilla/5.0" | jq -r '.version // empty' || curl -s https://api.github.com/repos/1Password/connect/releases/latest | jq -r '.tag_name' | sed 's/^v//' || echo "") | ||
| if [ -z "$OP_LATEST" ]; then | ||
| # Fallback: use current version if can't fetch | ||
| OP_LATEST="${{ steps.current.outputs.op_cli }}" | ||
| fi | ||
| echo "op_cli=$OP_LATEST" >> $GITHUB_OUTPUT | ||
|
Comment on lines
+48
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
The update feed at Conclusion: Connect is a separate product (Connect Server) from the CLI; it does not publish releases for the same artifact as the CLI update feed. [1], [3] Sources: Replace the 1Password/connect fallback with a version check, not a different product.
Proposed fix- OP_LATEST=$(curl -s https://app-updates.agilebits.com/check/1/0/CLI2/en/0/N -H "User-Agent: Mozilla/5.0" | jq -r '.version // empty' || curl -s https://api.github.com/repos/1Password/connect/releases/latest | jq -r '.tag_name' | sed 's/^v//' || echo "")
+ OP_LATEST=$(curl -s https://app-updates.agilebits.com/check/1/0/CLI2/en/0/N -H "User-Agent: Mozilla/5.0" | jq -r '.version // empty' || echo "")
if [ -z "$OP_LATEST" ]; then
- # Fallback: use current version if can't fetch
+ # Fail closed: keep the currently pinned CLI version if the official endpoint is unavailable
OP_LATEST="${{ steps.current.outputs.op_cli }}"
fi🤖 Prompt for AI Agents |
||
|
|
||
| # Node.js LTS - nodejs.org API | ||
| NODE_LATEST=$(curl -s https://nodejs.org/dist/index.json | jq -r '[.[] | select(.lts != false)] | .[0].version' | sed 's/^v//') | ||
| echo "node=$NODE_LATEST" >> $GITHUB_OUTPUT | ||
|
|
||
| # pnpm - npm registry | ||
| PNPM_LATEST=$(npm view pnpm version) | ||
| echo "pnpm=$PNPM_LATEST" >> $GITHUB_OUTPUT | ||
|
|
||
| # Claude Code - npm registry | ||
| CLAUDE_LATEST=$(npm view @anthropic-ai/claude-code version) | ||
| echo "claude_code=$CLAUDE_LATEST" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Compare versions | ||
| id: compare | ||
| run: | | ||
| UPDATES="" | ||
| HAS_UPDATES="false" | ||
|
|
||
| compare_version() { | ||
| local name=$1 current=$2 latest=$3 | ||
| if [ "$current" != "$latest" ] && [ -n "$latest" ]; then | ||
| echo "- **$name**: \`$current\` → \`$latest\`" | ||
| return 0 | ||
| fi | ||
| return 1 | ||
| } | ||
|
|
||
| if compare_version "GitHub CLI" "${{ steps.current.outputs.gh_cli }}" "${{ steps.latest.outputs.gh_cli }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
| if compare_version "Doppler CLI" "${{ steps.current.outputs.doppler }}" "${{ steps.latest.outputs.doppler }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
| if compare_version "1Password CLI" "${{ steps.current.outputs.op_cli }}" "${{ steps.latest.outputs.op_cli }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
| if compare_version "Node.js" "${{ steps.current.outputs.node }}" "${{ steps.latest.outputs.node }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
| if compare_version "pnpm" "${{ steps.current.outputs.pnpm }}" "${{ steps.latest.outputs.pnpm }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
| if compare_version "Claude Code" "${{ steps.current.outputs.claude_code }}" "${{ steps.latest.outputs.claude_code }}" >> /tmp/updates.txt; then | ||
| HAS_UPDATES="true" | ||
| fi | ||
|
|
||
| echo "has_updates=$HAS_UPDATES" >> $GITHUB_OUTPUT | ||
|
|
||
| { | ||
| echo "summary<<EOF" | ||
| cat /tmp/updates.txt 2>/dev/null || echo "No updates available" | ||
| echo "EOF" | ||
| } >> $GITHUB_OUTPUT | ||
|
|
||
| echo "Updates found: $HAS_UPDATES" | ||
| cat /tmp/updates.txt 2>/dev/null || echo "No updates" | ||
|
|
||
| - name: Update Dockerfile | ||
| if: steps.compare.outputs.has_updates == 'true' | ||
| run: | | ||
| # Update each version if changed | ||
| if [ "${{ steps.current.outputs.gh_cli }}" != "${{ steps.latest.outputs.gh_cli }}" ] && [ -n "${{ steps.latest.outputs.gh_cli }}" ]; then | ||
| sed -i "s/GH_CLI_VERSION=${{ steps.current.outputs.gh_cli }}/GH_CLI_VERSION=${{ steps.latest.outputs.gh_cli }}/" .devcontainer/Dockerfile | ||
| fi | ||
| if [ "${{ steps.current.outputs.doppler }}" != "${{ steps.latest.outputs.doppler }}" ] && [ -n "${{ steps.latest.outputs.doppler }}" ]; then | ||
| sed -i "s/DOPPLER_CLI_VERSION=${{ steps.current.outputs.doppler }}/DOPPLER_CLI_VERSION=${{ steps.latest.outputs.doppler }}/" .devcontainer/Dockerfile | ||
| fi | ||
| if [ "${{ steps.current.outputs.op_cli }}" != "${{ steps.latest.outputs.op_cli }}" ] && [ -n "${{ steps.latest.outputs.op_cli }}" ]; then | ||
| sed -i "s/OP_CLI_VERSION=${{ steps.current.outputs.op_cli }}/OP_CLI_VERSION=${{ steps.latest.outputs.op_cli }}/" .devcontainer/Dockerfile | ||
| fi | ||
| if [ "${{ steps.current.outputs.node }}" != "${{ steps.latest.outputs.node }}" ] && [ -n "${{ steps.latest.outputs.node }}" ]; then | ||
| sed -i "s/NODE_VERSION=${{ steps.current.outputs.node }}/NODE_VERSION=${{ steps.latest.outputs.node }}/" .devcontainer/Dockerfile | ||
| fi | ||
| if [ "${{ steps.current.outputs.pnpm }}" != "${{ steps.latest.outputs.pnpm }}" ] && [ -n "${{ steps.latest.outputs.pnpm }}" ]; then | ||
| sed -i "s/PNPM_VERSION=${{ steps.current.outputs.pnpm }}/PNPM_VERSION=${{ steps.latest.outputs.pnpm }}/" .devcontainer/Dockerfile | ||
| fi | ||
| if [ "${{ steps.current.outputs.claude_code }}" != "${{ steps.latest.outputs.claude_code }}" ] && [ -n "${{ steps.latest.outputs.claude_code }}" ]; then | ||
| sed -i "s/CLAUDE_CODE_VERSION=${{ steps.current.outputs.claude_code }}/CLAUDE_CODE_VERSION=${{ steps.latest.outputs.claude_code }}/" .devcontainer/Dockerfile | ||
| fi | ||
|
|
||
| - name: Create pull request | ||
| if: steps.compare.outputs.has_updates == 'true' | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| branch: fix/update-dev-tools | ||
| delete-branch: true | ||
| commit-message: 'fix: update development tools' | ||
| title: 'fix: update development tools' | ||
| body: | | ||
| ## 開発ツールのバージョン更新 | ||
|
|
||
| ${{ steps.compare.outputs.summary }} | ||
|
|
||
| ### 📝 リリースノート | ||
|
|
||
| - [Claude Code Releases](https://github.com/anthropics/claude-code/releases) | ||
| - [GitHub CLI Releases](https://github.com/cli/cli/releases) | ||
| - [Doppler CLI Releases](https://github.com/DopplerHQ/cli/releases) | ||
| - [1Password CLI Releases](https://developer.1password.com/docs/cli/release-notes/) | ||
| - [Node.js Releases](https://nodejs.org/en/blog/release/) | ||
| - [pnpm Releases](https://github.com/pnpm/pnpm/releases) | ||
|
|
||
| --- | ||
|
|
||
| **Auto-generated by:** [update-dev-tools.yml](.github/workflows/update-dev-tools.yml) | ||
| labels: dependencies | ||
|
|
||
| - name: Summary | ||
| run: | | ||
| if [ "${{ steps.compare.outputs.has_updates }}" == "true" ]; then | ||
| echo "✅ PR created for development tool updates" | ||
| else | ||
| echo "ℹ️ All development tools are up to date" | ||
| fi | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check step always writes
has_updates=false, while both update and PR steps are gated onsteps.check.outputs.has_updates == 'true'; as a result, this workflow can never produce plugin update PRs even when plugins are outdated, so the weekly automation is effectively disabled.Useful? React with 👍 / 👎.