From 2f13ad5843e95a362a92071677e640d415ab1444 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Thu, 26 Mar 2026 11:10:19 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Issue/PR=E3=83=86=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=E3=81=A8CONTRIBUTING.md=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - IssueテンプレートをMarkdownからYAML形式(Issue Forms)に移行 - データ修正専用のIssueテンプレートを新設 - PRテンプレートを追加 - CONTRIBUTING.mdを追加 Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/ISSUE_TEMPLATE/Bug.md | 28 ------ .github/ISSUE_TEMPLATE/Epic.md | 17 ---- .github/ISSUE_TEMPLATE/Request.md | 20 ---- .github/ISSUE_TEMPLATE/bug_report.yml | 67 ++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 + .github/ISSUE_TEMPLATE/data_correction.yml | 33 +++++++ .github/ISSUE_TEMPLATE/epic.yml | 29 ++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 45 +++++++++ .github/pull_request_template.md | 35 +++++++ CONTRIBUTING.md | 102 +++++++++++++++++++++ 10 files changed, 316 insertions(+), 65 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/Bug.md delete mode 100644 .github/ISSUE_TEMPLATE/Epic.md delete mode 100644 .github/ISSUE_TEMPLATE/Request.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/data_correction.yml create mode 100644 .github/ISSUE_TEMPLATE/epic.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/Bug.md b/.github/ISSUE_TEMPLATE/Bug.md deleted file mode 100644 index 493447b4..00000000 --- a/.github/ISSUE_TEMPLATE/Bug.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: "\U0001F41B Bug report" -about: バグ報告 -title: "\U0001F41B " -labels: bug -assignees: TinyKitten - ---- - -## 概要 -発生したバグについてなるべく詳細にご記入ください - -## 再現方法 -発生したバグが再現する方法を簡潔に箇条書きでご記入ください - -1. 来た -2. 見た -3. 勝った -4. バグった - -## 想定していた動作 -想定していた動作を記入してください - -## スクリーンショット -必要であればスクリーンショットを添付してください - -## その他 -バグ修正等に役立つ情報がございましたらご記入ください diff --git a/.github/ISSUE_TEMPLATE/Epic.md b/.github/ISSUE_TEMPLATE/Epic.md deleted file mode 100644 index 160efc53..00000000 --- a/.github/ISSUE_TEMPLATE/Epic.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Epic -about: 親タスク -title: "[EPIC] " -labels: epic -assignees: TinyKitten - ---- - -## 概要 -何をこのエピックで実現させたいか - -## チケット -- [ ] # - -## 懸念点 -エピックの規模において実現の障壁になりそうな事柄 diff --git a/.github/ISSUE_TEMPLATE/Request.md b/.github/ISSUE_TEMPLATE/Request.md deleted file mode 100644 index b2222507..00000000 --- a/.github/ISSUE_TEMPLATE/Request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "\U0001F4A1 Feature request" -about: プロジェクトの課題もしくはご要望を報告 -title: "\U0001F4A1 " -labels: feature -assignees: TinyKitten - ---- - -## 概要 -プロジェクトに対して感じている課題やご要望をなるべく詳細にご記入ください - -## 想定されている解決策 -上記課題に対する解決策がございましたらご記入ください - -## スクリーンショット -スクリーンショット等このチケットに関連する画像を任意で添付してください - -## その他 -その他課題・ご要望に関して追加の情報がございましたらご記入ください diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..075434d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,67 @@ +name: "\U0001F41B Bug report" +description: バグ報告 +labels: ["bug"] +assignees: + - TinyKitten +body: + - type: markdown + attributes: + value: | + バグ報告ありがとうございます。以下のフォームにできる限り詳しくご記入ください。 + - type: textarea + id: summary + attributes: + label: 概要 + description: 発生したバグについてなるべく詳細にご記入ください + validations: + required: true + - type: textarea + id: steps + attributes: + label: 再現方法 + description: バグが再現する手順を箇条書きでご記入ください + placeholder: | + 1. ... + 2. ... + 3. ... + validations: + required: true + - type: textarea + id: expected + attributes: + label: 想定していた動作 + description: 本来どのように動作するべきかをご記入ください + validations: + required: true + - type: textarea + id: actual + attributes: + label: 実際の動作 + description: 実際にどのような動作をしたかをご記入ください + validations: + required: true + - type: textarea + id: environment + attributes: + label: 環境情報 + description: "OS、Rustバージョン、PostgreSQLバージョンなど" + placeholder: | + - OS: Ubuntu 24.04 + - Rust: 1.xx.x + - PostgreSQL: 18.x + validations: + required: false + - type: textarea + id: screenshots + attributes: + label: スクリーンショット + description: 必要であればスクリーンショットを添付してください + validations: + required: false + - type: textarea + id: additional + attributes: + label: その他 + description: バグ修正に役立つ追加情報がございましたらご記入ください + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..c342980b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: "\U0001F4AC Discord コミュニティ" + url: https://discord.gg/tsemdME9Nz + about: 質問やディスカッションはDiscordコミュニティへどうぞ diff --git a/.github/ISSUE_TEMPLATE/data_correction.yml b/.github/ISSUE_TEMPLATE/data_correction.yml new file mode 100644 index 00000000..b15e5d96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/data_correction.yml @@ -0,0 +1,33 @@ +name: "\U0001F4CA Data correction" +description: データの修正・追加リクエスト +labels: ["data"] +assignees: + - TinyKitten +body: + - type: markdown + attributes: + value: | + データの修正・追加リクエストありがとうございます。 + - type: textarea + id: summary + attributes: + label: 概要 + description: 修正・追加したいデータの内容を具体的にご記入ください + placeholder: | + 例: ○○線の△△駅のナンバリングが誤っている + validations: + required: true + - type: textarea + id: source + attributes: + label: 参考情報 + description: 正しいデータの根拠となるURL(公式サイト、Wikipedia等)があればご記入ください + validations: + required: false + - type: textarea + id: additional + attributes: + label: その他 + description: その他追加の情報がございましたらご記入ください + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/epic.yml b/.github/ISSUE_TEMPLATE/epic.yml new file mode 100644 index 00000000..29abe51c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic.yml @@ -0,0 +1,29 @@ +name: Epic +description: 親タスク +labels: ["epic"] +assignees: + - TinyKitten +body: + - type: textarea + id: summary + attributes: + label: 概要 + description: 何をこのエピックで実現させたいか + validations: + required: true + - type: textarea + id: tickets + attributes: + label: チケット + description: 関連するIssueをリストアップしてください + value: | + - [ ] # + validations: + required: false + - type: textarea + id: concerns + attributes: + label: 懸念点 + description: エピックの規模において実現の障壁になりそうな事柄 + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..dec437df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,45 @@ +name: "\U0001F4A1 Feature request" +description: プロジェクトの課題もしくはご要望を報告 +labels: ["feature"] +assignees: + - TinyKitten +body: + - type: markdown + attributes: + value: | + ご要望ありがとうございます。以下のフォームにできる限り詳しくご記入ください。 + - type: textarea + id: summary + attributes: + label: 概要 + description: プロジェクトに対して感じている課題やご要望をなるべく詳細にご記入ください + validations: + required: true + - type: textarea + id: solution + attributes: + label: 想定されている解決策 + description: 上記課題に対する解決策がございましたらご記入ください + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: 検討した代替案 + description: 他に検討した解決策があればご記入ください + validations: + required: false + - type: textarea + id: screenshots + attributes: + label: スクリーンショット + description: このチケットに関連する画像を任意で添付してください + validations: + required: false + - type: textarea + id: additional + attributes: + label: その他 + description: その他追加の情報がございましたらご記入ください + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..6f373a46 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,35 @@ +## 概要 + + + +## 変更の種類 + + + +- [ ] バグ修正 +- [ ] 新機能 +- [ ] データの修正・追加 +- [ ] リファクタリング +- [ ] ドキュメント +- [ ] CI/CD +- [ ] その他 + +## 変更内容 + + + +## テスト + + + +- [ ] `cargo fmt --all -- --check` が通ること +- [ ] `cargo clippy -- -D warnings` が通ること +- [ ] `cargo test`(`SQLX_OFFLINE=true`)が通ること + +## 関連Issue + + + +## スクリーンショット(任意) + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f7deb686 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,102 @@ +# Contributing to StationAPI + +StationAPIへのコントリビュートに興味を持っていただきありがとうございます! + +## はじめに + +StationAPIは日本の鉄道駅情報を提供するgRPC APIです。コード・データの両面でコントリビューションを歓迎しています。 + +## 開発環境のセットアップ + +### 必要なツール + +- **Rust** (stable toolchain): `rustup default stable` +- **protoc** (Protocol Buffers コンパイラ): `sudo apt-get install protobuf-compiler` +- **PostgreSQL** 15+ (`pg_trgm`, `btree_gist` 拡張が必要) +- **Docker / Docker Compose** (推奨) + +### ローカルでの起動 + +```bash +# Docker Composeで起動(PostgreSQL + API) +docker compose up + +# もしくは手動で起動 +# 1. PostgreSQLを準備し、DATABASE_URLを設定 +# 2. APIを起動 +cargo run -p stationapi +``` + +### オフラインビルド + +PostgreSQLが利用できない環境では、環境変数を設定してビルドできます: + +```bash +SQLX_OFFLINE=true cargo build +``` + +## コントリビューションの流れ + +### 1. Issueの確認・作成 + +- 既存のIssueを確認し、重複がないか確認してください +- 新しい機能やバグ修正に取り組む前に、Issueを作成して相談することをお勧めします + +### 2. ブランチの作成 + +以下の命名規則に従ってブランチを作成してください: + +| 種類 | プレフィックス | 例 | +|------|------------|-----| +| 新機能 | `feature/` | `feature/add-new-rpc` | +| バグ修正 | `fix/` | `fix/station-query-error` | +| データ変更 | `data/` | `data/update-numbering` | +| 雑務 | `chore/` | `chore/update-deps` | +| リリース | `release/` | `release/v1.2.0` | + +### 3. 変更の実装 + +#### コード変更の場合 + +- Rustの標準的なコーディング規約に従ってください +- 新しいRPCを追加する場合は [AGENTS.md](AGENTS.md) のアーキテクチャパターンを参照してください + +#### データ変更の場合 + +- データの構造については [data/README.md](data/README.md) を参照してください +- CSVファイルは `data/` ディレクトリに `N!table.csv` の命名規則で配置されています +- データバリデーションは `cargo run -p data_validator` で実行できます + +### 4. コミット前のチェック + +コミットする前に以下のチェックを必ず実行してください: + +```bash +# フォーマットチェック +cargo fmt --all -- --check + +# Lintチェック +SQLX_OFFLINE=true cargo clippy -- -D warnings + +# テスト +SQLX_OFFLINE=true cargo test +``` + +### 5. Pull Requestの作成 + +- `dev` ブランチに向けてPRを作成してください +- PRテンプレートに従って説明を記入してください +- 関連するIssueがあればリンクしてください + +## データコントリビューション + +鉄道データの修正・追加は特に歓迎しています。詳細は [data/README.md](data/README.md) を参照してください。 + +## 質問・相談 + +- [Discord コミュニティ](https://discord.gg/trainlcd)で質問やディスカッションができます +- Issueでの質問も歓迎しています + +## ライセンス + +コントリビューションは本プロジェクトのライセンスに従います。 From 4690fc70ced1885c3fb796e098e0b22733f9c46f Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Thu, 26 Mar 2026 11:15:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Discord=E6=8B=9B=E5=BE=85URL=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- README.md | 2 +- data/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7deb686..208d626c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,7 @@ SQLX_OFFLINE=true cargo test ## 質問・相談 -- [Discord コミュニティ](https://discord.gg/trainlcd)で質問やディスカッションができます +- [Discord コミュニティ](https://discord.gg/tsemdME9Nz)で質問やディスカッションができます - Issueでの質問も歓迎しています ## ライセンス diff --git a/README.md b/README.md index f61855ff..112f4926 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This project follows the [all-contributors](https://github.com/all-contributors/ ## Join our community(Japanese only) Do you like this project? Join our Discord community! -[https://discord.gg/qKT7zSGQre](https://discord.gg/qKT7zSGQre) +[https://discord.gg/tsemdME9Nz](https://discord.gg/tsemdME9Nz) ## Monitoring diff --git a/data/README.md b/data/README.md index 1b9ae03e..3855ccb3 100644 --- a/data/README.md +++ b/data/README.md @@ -287,7 +287,7 @@ 1. 既存のデータ例を参照 2. `create_table.sql`でテーブル構造を確認 3. 公式な鉄道会社の情報を参照 -4. 不明な場合は Issue で質問、または [Discord サーバ](https://discord.gg/vUW7Fg2XaR)で相談 +4. 不明な場合は Issue で質問、または [Discord サーバ](https://discord.gg/tsemdME9Nz)で相談 ## 📚 参考リンク