
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
cli-pagemeta2issue
Advanced tools
CSVページメタデータからGitHub Issueを一括作成する強力なCLIツール。カスタマイズ可能なテンプレート機能により、プロジェクトに最適な形式でIssueを生成できます。
npm install -g cli-pagemeta2issue
pnpmを使用する場合:
pnpm add -g cli-pagemeta2issue
npm install cli-pagemeta2issue
# 1. CSVファイルからIssueを作成(トークンとリポジトリを指定)
pagemeta2issue page.csv --repo owner/repo --token ghp_xxxxx
# 2. テンプレートを使用してカスタマイズ
pagemeta2issue page.csv --repo owner/repo --token ghp_xxxxx --template ./template.md
# 3. ドライランで事前確認
pagemeta2issue page.csv --dry-run --repo owner/repo --token ghp_xxxxx
# 4. 作成したIssueを一括クローズ
pagemeta2issue --all-close --repo owner/repo --token ghp_xxxxx
# 5. 一括クローズのドライラン
pagemeta2issue --all-close --dry-run --repo owner/repo --token ghp_xxxxx
# 環境変数を設定
export GITHUB_TOKEN=ghp_xxxxx
export GITHUB_REPOSITORY=owner/repo
export GITHUB_TEMPLATE=./template.md # オプション
# 簡潔なコマンドで実行
pagemeta2issue page.csv
# config.jsonに設定を定義して実行
pagemeta2issue page.csv --config ./config.json
CSVファイルは以下のヘッダーを含む必要があります:
sidebar_position,slug,parent,title,status,post_type,seo_title,seo_keywords,seo_description,handson_overview
1,getting-started,,Getting Started,draft,pages,"Getting Started Guide","intro, guide",Introduction to the system,Basic overview
2,installation,getting-started,Installation,published,pages,"Installation Guide","install, setup",How to install,Step-by-step installation
sidebar_position: 順序付けのための数値slug: ページの一意識別子title: ページタイトル(Issueタイトルになります)status: "draft" または "published"post_type: コンテンツの種類(例:"pages", "posts")seo_title: SEO最適化されたタイトルseo_keywords: SEOキーワードseo_description: SEO説明文handson_overview: 概要またはサマリーparent: 階層構造のための親ページslugJSONまたはYAML形式の設定ファイルを作成できます:
{
"github": {
"token": "ghp_xxxxx",
"repository": "owner/repo"
},
"processing": {
"batchSize": 5,
"delayMs": 1000,
"maxRetries": 3
},
"labels": {
"statusMapping": {
"draft": "status:draft",
"published": "status:published"
},
"postTypeMapping": {
"pages": "type:page",
"posts": "type:post"
}
},
"milestones": {
"autoCreate": true,
"nameTemplate": "Section {position}"
},
"template": {
"defaultFile": "./template.md"
}
}
GITHUB_TOKEN: GitHub Personal Access TokenGITHUB_REPOSITORY: "owner/repo"形式のリポジトリ名GITHUB_TEMPLATE: テンプレートファイルのパス(オプション)BATCH_SIZE: バッチごとのIssue数DELAY_MS: リクエスト間の遅延(ミリ秒)Usage: pagemeta2issue [csv-file] [options]
Arguments:
csv-file CSVファイルのパス(ページメタデータを含む)
--all-close使用時は不要
Options:
# 基本オプション
-c, --config <file> 設定ファイルのパス(JSONまたはYAML)
-d, --dry-run 実際のAPI呼び出しを行わずに作成/削除予定の内容を表示
-r, --repo <owner/repo> GitHubリポジトリ(例:owner/repo)
-t, --token <token> GitHub Personal Access Token
-v, --verbose デバッグ用の詳細出力を有効化
-V, --version バージョン情報を表示
-h, --help コマンドのヘルプを表示
# Issue作成オプション
--template <file> テンプレートファイル(Markdownファイル)
-b, --batch-size <num> バッチごとに作成するIssue数(デフォルト:5)
-w, --delay <ms> APIリクエスト間の遅延(ミリ秒、デフォルト:1000)
# Issue一括削除オプション
--all-close ツールで作成されたIssueを一括クローズ
--labels <labels> フィルター用ラベル(カンマ区切り、--all-close使用時)
--created-after <date> 指定日以降に作成されたIssueのみ対象(--all-close使用時)
--title-pattern <pattern> タイトル正規表現パターン(--all-close使用時)
--content-pattern <pattern> 本文内容正規表現パターン(--all-close使用時)
--reason <reason> クローズ理由:completed/not_planned(--all-close使用時)
--confirm 確認プロンプトをスキップ(--all-close使用時)
カスタムテンプレートを使用してIssueの形式をカスタマイズできます。テンプレートファイルはMarkdown形式で、変数プレースホルダーを使用してCSVデータを埋め込みます。
# {{title}}
## ページ概要
このページは {{slug}} として識別され、{{status}} 状態です。
### 基本情報
- **スラッグ**: {{slug}}
- **親ページ**: {{parent}}
- **ステータス**: {{status}}
- **種別**: {{post_type}}
- **サイドバー位置**: {{sidebar_position}}
## SEO情報
- **SEOタイトル**: {{seo_title}}
- **キーワード**: {{seo_keywords}}
- **説明**: {{seo_description}}
## 作業概要
{{handson_overview}}
## タスクリスト
- [ ] ページコンテンツの作成
- [ ] SEO最適化の確認
- [ ] レビュー実施
- [ ] 公開準備
---
*この Issue は CLI tool により自動生成されました*
テンプレート内で使用できる変数:
{{title}} - ページタイトル{{slug}} - ページのスラッグ(一意識別子){{parent}} - 親ページのスラッグ{{status}} - ページの状態(draft/published){{post_type}} - コンテンツの種類{{sidebar_position}} - サイドバーでの位置{{seo_title}} - SEO最適化されたタイトル{{seo_keywords}} - SEOキーワード{{seo_description}} - SEO説明文{{handson_overview}} - ハンズオン概要# TODO: {{title}}
**Page**: `{{slug}}`
**Status**: {{status}}
## Description
{{handson_overview}}
## SEO Checklist
- [ ] Title: {{seo_title}}
- [ ] Keywords: {{seo_keywords}}
- [ ] Description: {{seo_description}}
## Tasks
- [ ] Create content
- [ ] Review and edit
- [ ] Publish
# 📝 {{title}} - Content Creation
## 📋 Project Information
- **Page Slug**: `{{slug}}`
- **Parent Page**: {{parent}}
- **Content Type**: {{post_type}}
- **Priority**: Position {{sidebar_position}}
## 🎯 Current Status
**{{status}}**
## 📈 SEO Configuration
```yaml
title: "{{seo_title}}"
keywords: "{{seo_keywords}}"
description: "{{seo_description}}"
{{handson_overview}}
#### 3. ミニマルテンプレート
```markdown
# {{title}}
{{handson_overview}}
**Status**: {{status}} | **Type**: {{post_type}} | **Position**: {{sidebar_position}}
テンプレートを指定しない場合、以下のデフォルトフォーマットでIssueが作成されます:
CSVのtitleフィールドの値
## 📄 ページ情報
- **Slug**: `slug-value`
- **Parent**: `parent-value` (存在する場合)
- **Status**: draft/published
- **Post Type**: pages
- **Sidebar Position**: 1
## 🔍 SEO設定
- **Title**: SEOタイトル
- **Keywords**: キーワード1, キーワード2
- **Description**: SEO説明文
## 📝 ハンズオン概要
概要の内容がここに入ります
---
### タスク
- [ ] コンテンツの作成
- [ ] レビュー
- [ ] 公開準備
status:draft)type:page)has-parentサイドバー位置のグループに基づいて自動作成
テンプレートファイルを指定した場合:
titleフィールドの値(変更なし)テンプレート内の{{variable}}プレースホルダーがCSVの対応するフィールド値に置換されます。
--all-closeオプションを使用することで、このツールで作成されたIssueを一括でクローズできます。この機能は、自動的にツールで作成されたIssueを識別し、安全に削除するための機能です。
# 基本的な一括クローズ
pagemeta2issue --all-close --repo owner/repo --token ghp_xxxxx
# ドライランで事前確認(推奨)
pagemeta2issue --all-close --dry-run --repo owner/repo --token ghp_xxxxx
# 確認プロンプトをスキップ
pagemeta2issue --all-close --confirm --repo owner/repo --token ghp_xxxxx
特定の条件でIssueをフィルタリングして削除できます:
# 特定のラベルでフィルタリング
pagemeta2issue --all-close --labels "status:draft,type:page" --repo owner/repo --token ghp_xxxxx
# 特定の日付以降に作成されたIssueのみ
pagemeta2issue --all-close --created-after "2024-01-01" --repo owner/repo --token ghp_xxxxx
# タイトルパターンでフィルタリング
pagemeta2issue --all-close --title-pattern "^Getting Started" --repo owner/repo --token ghp_xxxxx
# 本文の内容パターンでフィルタリング
pagemeta2issue --all-close --content-pattern "ページ情報" --repo owner/repo --token ghp_xxxxx
# クローズ理由を指定
pagemeta2issue --all-close --reason "not_planned" --repo owner/repo --token ghp_xxxxx
このツールは以下の方法でツールで作成されたIssueを自動識別します:
status:draft, status:publishedtype:page, type:posthas-parentpriority:high, priority:medium, priority:lowデフォルトテンプレートの特徴的なパターンを検出:
## 📄 ページ情報## 🔍 SEO設定## 📝 ハンズオン概要- [ ] コンテンツの作成**Slug**:, **Status**:, **Post Type**:Section 1, Section 2などの自動作成されたマイルストーン実際の削除を行う前に、対象となるIssueを確認できます:
pagemeta2issue --all-close --dry-run --repo owner/repo --token ghp_xxxxx
出力例:
🔍 Found 15 issues to close:
1. #123: Getting Started
URL: https://github.com/owner/repo/issues/123
Match reasons: tool labels: status:draft, type:page
Labels: status:draft, type:page, priority:high
2. #124: Installation Guide
URL: https://github.com/owner/repo/issues/124
Match reasons: default content signature
Labels: status:published, type:page
🔍 DRY RUN: Would close 15 issues
デフォルトでは、実際に削除する前に確認を求めます:
⚠️ Are you sure you want to close 15 issues? (y/N):
--confirmオプションで確認をスキップできます。
# 複数条件でのフィルタリング
pagemeta2issue --all-close \
--labels "status:draft" \
--created-after "2024-01-01" \
--title-pattern "^Section" \
--reason "not_planned" \
--repo owner/repo \
--token ghp_xxxxx
# 設定ファイルを使用した削除
pagemeta2issue --all-close --config ./config.json --dry-run
# 環境変数を使用した削除
export GITHUB_TOKEN=ghp_xxxxx
export GITHUB_REPOSITORY=owner/repo
pagemeta2issue --all-close --dry-run
# より詳細な出力で確認
pagemeta2issue --all-close --verbose --dry-run --repo owner/repo --token ghp_xxxxx
期待されるIssueが見つからない場合は、以下を確認してください:
# リポジトリをクローン
git clone https://github.com/yourusername/cli-pagemeta2issue.git
cd cli-pagemeta2issue
# 依存関係をインストール
pnpm install
# プロジェクトをビルド
pnpm build
# 開発モードで実行
pnpm dev page.csv --repo owner/repo --token ghp_xxxxx
# テンプレート付きで実行
pnpm dev page.csv --repo owner/repo --token ghp_xxxxx --template ./template.md
# テストの実行
pnpm test
# カバレッジ付きでテスト実行
pnpm test --coverage
# 本番用ビルド
pnpm build
# npmパッケージの作成
pnpm pack
repoスコープを持つGitHub Personal Access TokenError: GitHub token is required
解決策:
repoスコープが含まれているか確認GITHUB_TOKENまたは--tokenオプションを使用Error: Invalid repository format
解決策:
owner/repo形式になっているか確認Error: Missing required field 'title'
解決策:
Error: Template file must have .md extension
解決策:
.mdになっているか確認Error: Rate limit exceeded
解決策:
--delayオプションで遅延時間を増やす(デフォルト: 1000ms)--batch-sizeオプションでバッチサイズを小さくする(デフォルト: 5)解決策:
--dry-runで問題ないか確認詳細なログを確認するには--verboseオプションを使用:
pagemeta2issue page.csv --verbose --dry-run
現在の設定を確認するには、まずドライランモードで実行:
pagemeta2issue page.csv --dry-run
ツールには以下の堅牢なエラーハンドリング機能が含まれています:
貢献を歓迎します!お気軽にPull Requestを送ってください。
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)MITライセンス - 詳細はLICENSEファイルを参照してください。
問題や質問はGitHub Issuesページをご利用ください。
FAQs
Convert CSV page metadata to GitHub Issues
We found that cli-pagemeta2issue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.