Skip to content

Commit 3171fdb

Browse files
authored
Merge pull request #25 from Gfermoto/dev
chore(github): Projects bootstrap, CONTRIBUTING
2 parents 6936045 + 5985c58 commit 3171fdb

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1010

1111
### Added
1212

13+
- **GitHub (репозиторий):** включены Discussions и Issues; метки `area:*`, `priority:*`, `triage`; вехи `v0.2.3`, `Backlog (no milestone)`; приветственная Discussion; скрипт `scripts/github-bootstrap-project.sh` для создания Project v2 после `gh auth refresh -s project`.
1314
- **CI:** PR workflow builds `app/ui` and runs docs checks (`check-docs-version.py` + `mkdocs build --strict`).
1415
- **Docs:** interactive OpenAPI (Redoc) pages under `docs/reference/`; nav entries in `mkdocs.yml`.
1516
- **Community:** issue template `good_first_issue`, Discussions link in issue chooser; ROADMAP / CONTRIBUTING (EN+RU) — public priorities and `good first issue` guidance.

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,14 @@ Look for issues labelled **`good first issue`** — small, scoped tasks for newc
5959

6060
- **Discussions:** https://github.com/Gfermoto/BirdLense-Hub/discussions
6161
- **Security:** follow [SECURITY.md](SECURITY.md) — do not report vulnerabilities in public threads.
62+
63+
## GitHub Projects (maintainers)
64+
65+
**Issues**, **Discussions**, and **Projects** are enabled on the repo. Labels `area:*`, `priority:*`, and `triage` support triage; milestones **v0.2.3** and **Backlog (no milestone)** are available.
66+
67+
To create the Kanban project **BirdLense Hub — Roadmap** and link this repository (requires GitHub CLI with `project` scope):
68+
69+
```bash
70+
gh auth refresh -s project -s read:project
71+
bash scripts/github-bootstrap-project.sh
72+
```

CONTRIBUTING.ru.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,14 @@ make start
5959

6060
- **Discussions:** https://github.com/Gfermoto/BirdLense-Hub/discussions
6161
- **Безопасность:** только по [SECURITY.md](SECURITY.md), не в открытых тредах.
62+
63+
## GitHub Projects (мейнтейнерам)
64+
65+
В репозитории включены **Issues**, **Discussions** и **Projects**. Метки `area:*`, `priority:*`, `triage` и вехи **v0.2.3** / **Backlog (no milestone)** уже заведены.
66+
67+
Создать проект **BirdLense Hub — Roadmap**, привязать репозиторий и поле «Поток» (канбан):
68+
69+
```bash
70+
gh auth refresh -s project -s read:project
71+
bash scripts/github-bootstrap-project.sh
72+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
# Создаёт GitHub Project (v2) у владельца, линкует репозиторий BirdLense-Hub,
3+
# добавляет поле «Поток» (Backlog → … → Done) поверх стандартного Status.
4+
#
5+
# Требуется один раз расширить gh-токен:
6+
# gh auth refresh -s project -s read:project
7+
#
8+
set -euo pipefail
9+
10+
OWNER="${GITHUB_PROJECT_OWNER:-Gfermoto}"
11+
REPO_FULL="${GITHUB_REPO:-Gfermoto/BirdLense-Hub}"
12+
PROJECT_TITLE="${GITHUB_PROJECT_TITLE:-BirdLense Hub — Roadmap}"
13+
14+
if ! gh project list --owner "$OWNER" --limit 1 >/dev/null 2>&1; then
15+
echo "gh не может читать Projects (нужны scope project / read:project). Выполните:"
16+
echo " gh auth refresh -s project -s read:project"
17+
echo "Затем снова запустите этот скрипт."
18+
exit 1
19+
fi
20+
21+
exists_json=$(gh project list --owner "$OWNER" --format json --limit 50)
22+
proj_num=$(echo "$exists_json" | jq -r --arg t "$PROJECT_TITLE" '.projects[] | select(.title == $t) | .number' | head -1)
23+
24+
if [[ -z "$proj_num" || "$proj_num" == "null" ]]; then
25+
echo "Создаю проект «$PROJECT_TITLE»…"
26+
create_out=$(gh project create --owner "$OWNER" --title "$PROJECT_TITLE" --format json)
27+
proj_num=$(echo "$create_out" | jq -r '.number')
28+
echo "Создан проект #$proj_num"
29+
else
30+
echo "Проект «$PROJECT_TITLE» уже есть (#$proj_num)"
31+
fi
32+
33+
echo "Линкую $REPO_FULL"
34+
gh project link "$proj_num" --owner "$OWNER" --repo "$REPO_FULL" 2>/dev/null || true
35+
36+
# Доп. поле для канбана (рядом со стандартным полем Status в Projects)
37+
echo "Добавляю поле «Поток» (если ещё нет — при дубликате будет ошибка, её можно игнорировать)…"
38+
gh project field-create "$proj_num" --owner "$OWNER" \
39+
--name "Поток" \
40+
--data-type "SINGLE_SELECT" \
41+
--single-select-options "Backlog,Ready,In progress,In review,Done" 2>/dev/null \
42+
|| echo "(поле «Поток» уже есть или не удалось создать — проверьте в UI проекта)"
43+
44+
echo
45+
echo "Готово. Открыть в браузере:"
46+
gh project view "$proj_num" --owner "$OWNER" --web 2>/dev/null || echo " gh project view $proj_num --owner $OWNER --web"

0 commit comments

Comments
 (0)