Skip to content

Commit fb21800

Browse files
authored
Merge pull request #1804 from dandi/enh-git-bug
Add git-bug distributed issue tracking
2 parents 7980524 + 18147ff commit fb21800

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

.github/workflows/sync-git-bug.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Sync git-bug issues
3+
4+
on:
5+
schedule:
6+
# Run hourly at minute 17 (avoid top-of-hour contention)
7+
- cron: "17 * * * *"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
sync:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
# Fetch git-bug refs so we can push incremental updates
21+
fetch-depth: 0
22+
23+
- name: Fetch existing bug refs
24+
run: |
25+
git fetch origin 'refs/bugs/*:refs/bugs/*' || true
26+
27+
- name: Install git-bug
28+
run: |
29+
curl -sL -o /usr/local/bin/git-bug \
30+
https://github.com/git-bug/git-bug/releases/download/v0.10.1/git-bug_linux_amd64
31+
chmod +x /usr/local/bin/git-bug
32+
git-bug version
33+
34+
- name: Configure bridge
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
git-bug bridge configure \
39+
--name=github \
40+
--target=github \
41+
--owner=dandi \
42+
--project=dandi-cli \
43+
--token="$GH_TOKEN"
44+
45+
- name: Pull issues from GitHub
46+
run: git-bug bridge pull github
47+
48+
- name: Push bug refs to origin
49+
run: |
50+
git push origin 'refs/bugs/*:refs/bugs/*'

CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
3535
## Documentation
3636
- Keep docstrings updated when changing function signatures
3737
- CLI help text should be clear and include examples where appropriate
38+
39+
## Issue Tracking with git-bug
40+
This project has GitHub issues synced locally via git-bug. Use these commands
41+
to get issue context without needing GitHub API access:
42+
- `git bug ls status:open` - list open issues
43+
- `git bug show <id-prefix>` - show issue details and comments
44+
- `git bug ls "title:keyword"` - search issues by title
45+
- `git bug ls "label:bug"` - filter by label
46+
- `git bug bridge pull` - sync latest issues from GitHub
47+
48+
When working on a bug fix or feature, check `git bug ls` for related issues
49+
to understand context and prior discussion.

DEVELOPMENT.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,73 @@ view code coverage information as follows:
132132
lines based on whether they are covered by tests or not.
133133

134134

135+
## Git-bug: Local Issue Tracking
136+
137+
This project uses [git-bug](https://github.com/git-bug/git-bug) for distributed,
138+
offline-first issue tracking. Issues from GitHub are synced and stored as native
139+
git objects under `refs/bugs/*`, so you can browse and search them without internet
140+
access or GitHub API calls.
141+
142+
### Installation
143+
144+
Install git-bug from [releases](https://github.com/git-bug/git-bug/releases)
145+
or via a package manager:
146+
147+
# macOS/Linux (Homebrew)
148+
brew install git-bug
149+
150+
# Nix
151+
nix profile install nixpkgs#git-bug
152+
153+
# Binary download (Linux amd64)
154+
curl -L -o git-bug \
155+
https://github.com/git-bug/git-bug/releases/latest/download/git-bug_linux_amd64
156+
chmod +x git-bug && mv git-bug ~/.local/bin/
157+
158+
### Fetching Issues
159+
160+
After cloning, fetch the bug refs to get local issues:
161+
162+
git bug pull
163+
164+
### Quick Reference
165+
166+
# List open issues
167+
git bug ls status:open
168+
169+
# Show a specific issue (by ID prefix)
170+
git bug show <id-prefix>
171+
172+
# Search issues by title keyword
173+
git bug ls status:open "title:upload"
174+
175+
# Filter by label
176+
git bug ls "label:bug"
177+
178+
# Filter by author
179+
git bug ls "author:username"
180+
181+
# Newest first
182+
git bug ls status:open sort:creation-desc
183+
184+
### Syncing with GitHub
185+
186+
# Pull latest issues from GitHub
187+
git bug bridge pull
188+
189+
# Push local bug refs to remote (for team access)
190+
git bug push origin
191+
192+
### Known Limitations
193+
194+
- **Images/media**: Bridge importers preserve image URLs as markdown text but
195+
do not download image blobs. Images hosted on
196+
`user-images.githubusercontent.com` are accessible only while GitHub hosts
197+
them.
198+
- **Two-way sync**: While git-bug supports pushing changes back to GitHub,
199+
the primary workflow is pull-from-GitHub for offline access.
200+
201+
135202
## Releasing with GitHub Actions, auto, and pull requests
136203

137204
New releases of dandi-cli are created via a GitHub Actions workflow built

0 commit comments

Comments
 (0)