Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/Bug.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/Epic.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/Request.md

This file was deleted.

67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: "\U0001F4AC Discord コミュニティ"
url: https://discord.gg/tsemdME9Nz
about: 質問やディスカッションはDiscordコミュニティへどうぞ
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/data_correction.yml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## 概要

<!-- このPRで何を変更したかを簡潔に記述してください -->

## 変更の種類

<!-- 該当するものにチェックを入れてください -->

- [ ] バグ修正
- [ ] 新機能
- [ ] データの修正・追加
- [ ] リファクタリング
- [ ] ドキュメント
- [ ] CI/CD
- [ ] その他

## 変更内容

<!-- 変更の詳細を記述してください -->

## テスト

<!-- どのようにテストしたかを記述してください -->

- [ ] `cargo fmt --all -- --check` が通ること
- [ ] `cargo clippy -- -D warnings` が通ること
- [ ] `cargo test`(`SQLX_OFFLINE=true`)が通ること

## 関連Issue

<!-- 関連するIssueがあればリンクしてください。例: Closes #123 -->

## スクリーンショット(任意)

<!-- UIやレスポンスに関する変更の場合、スクリーンショットを添付してください -->
102 changes: 102 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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/tsemdME9Nz)で質問やディスカッションができます
- Issueでの質問も歓迎しています

## ライセンス

コントリビューションは本プロジェクトのライセンスに従います。
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading
Loading