Skip to content

Add Git Trees and Refs API endpoints (#40) - #211

Merged
pietbrauer merged 4 commits into
mainfrom
feature/git-tree-refs-api
May 14, 2026
Merged

Add Git Trees and Refs API endpoints (#40)#211
pietbrauer merged 4 commits into
mainfrom
feature/git-tree-refs-api

Conversation

@pietbrauer

@pietbrauer pietbrauer commented May 14, 2026

Copy link
Copy Markdown
Member
  • GitTree, GitTreeEntry, GitRef, GitObject models in Git.swift
  • tree() and listRefs() with callback and async/await variants
  • recursive flag maps to ?recursive=1 query param
  • CLI git get-tree and get-refs subcommands
  • Fixtures and 8 tests covering sync/async paths

Closes #40

- GitTree, GitTreeEntry, GitRef, GitObject models in Git.swift
- tree() and listRefs() with callback and async/await variants
- recursive flag maps to ?recursive=1 query param
- CLI git get-tree and get-refs subcommands
- Fixtures and 8 tests covering sync/async paths
- Replace hand-crafted fixtures with real GitHub API responses via CLI
- git_tree.json: real tree for nerdishbynature/octokit.swift main branch
- git_refs.json: real refs listing for nerdishbynature/octokit.swift
- Remove unused git_ref.json fixture
- Fix GetRefs CLI: ref arg changed to --ref option to avoid path ambiguity
- Update test assertions to match real fixture data
- swiftformat applied to GitTests.swift
- update-fixtures.sh: add git get-refs and git get-tree commands
- tree SHA resolved dynamically at runtime via GitHub API
@pietbrauer
pietbrauer merged commit cc8251b into main May 14, 2026
4 checks passed
@pietbrauer
pietbrauer deleted the feature/git-tree-refs-api branch May 14, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tree and Refs API Calls

1 participant