circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#559 Open mirrored repositories in a view of their branches

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#559
  • feature/branch-view
  • pull request
  • state:merged

Closes #557. `och-import-github` (GitHub, Forgejo/Gitea and GitLab) now saves a **Branches** view and makes it the timeline's default, so a mirrored repository opens with each branch in a track of its own. ## The view - **Which branches:** the 7 most recently active (by last commit, merge or update), oldest first. 7 is `SEPARATION_LIMIT`. The default branch is the main timeline. - **Each branch** is a separation by its tag: - a **disjoin** from the main timeline at the moment it began, `Branch `: its first commit, or its PR's opening if that came first; - a **union** back into the main timeline at its PR's `Merged` moment (or at the merge time, when merges weren't imported). - **Still under way:** a branch with commits after its PR was merged stays apart. ## Where branches come from - **Pull requests** (merge requests on GitLab) from the repository itself, which outlive their branches; fork PRs are left out. `GET /pulls?state=all` (`/merge_requests` on GitLab): one request per 100. - **Branches that still exist**, with their own commits: `readRepository` and `readGitlab` now return `main` and `branches` (`{name, first, last}`). ## What's in each track In a repository merged with merge commits (like this one), a merged branch's commits are in the default branch's history, which is read first. So they were tagged `main`, and a branch track would have held almost nothing. For the branches shown, the importer reads each one's PR commits again (one request per branch) and tags them with the branch, which is "the branch it was made on". It also tags the PR's duration, so the PR's bar sits in the branch's track. ## Saving - The view is the API key owner's, and **public** (anyone who can read the timeline sees it). - A later import finds it by its title among the owner's views of the timeline, and updates it with `PUT /api/views/{id}`. - **Default view:** it's set by a settings-only save (`TimelineWriter.setDefaultView`, which retries a 409 against the fresh settings). It becomes the default only if the timeline has none, or already has this one. A default its authors chose is kept. - `--no-branch-view` leaves views alone, and `--dry-run` lists the tracks it would make. - The webhook receiver doesn't change the view; running the importer with `--since` brings it up to date. ## Tried live Imported this repository into a local server: `saved the Branches view (feature/gitlab (merged), feature/separations (merged), feature/disjoin (merged), feature/views (merged), feature/related-tracks (merged), fix/forge-text-clip, fix/related-ongoing), the timeline's default view.` The timeline opens as **View: Branches**, each disjoin at `Branch feature/…` and each union at `Merged: #5xx …`. ## Tests `test/branch-view.test.mjs`: - which branches are shown; - disjoins and unions, by moment or by time; - commits and PRs retagged; - fork PRs and GitLab merge requests; - saving, updating, and keeping an author's default, through a 409. `test/github-source.test.mjs`: the dry run lists the view, and `--no-branch-view` drops it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/559

Related

Open #559 Open mirrored repositories in a view of their branches in the timeline

#559 Open mirrored repositories in a view of their branches