Commit cc8251b
authored
* Add Git Trees and Refs API endpoints (#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
* Regenerate fixtures from live API and fix tests
- 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
* Run swiftformat and add git fixtures to update-fixtures.sh
- 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
* Use fixed tree SHA in update-fixtures.sh
1 parent 0de3667 commit cc8251b
7 files changed
Lines changed: 753 additions & 9 deletions
File tree
- OctoKitCLI/Sources/OctoKitCLI
- Modules
- OctoKit
- Tests/OctoKitTests
- Fixtures
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
16 | 57 | | |
17 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
18 | 113 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 114 | | |
25 | 115 | | |
26 | 116 | | |
| |||
31 | 121 | | |
32 | 122 | | |
33 | 123 | | |
34 | | - | |
| 124 | + | |
35 | 125 | | |
36 | 126 | | |
| 127 | + | |
| 128 | + | |
37 | 129 | | |
38 | 130 | | |
39 | 131 | | |
40 | 132 | | |
| 133 | + | |
| 134 | + | |
41 | 135 | | |
42 | 136 | | |
43 | 137 | | |
44 | 138 | | |
45 | 139 | | |
46 | 140 | | |
| 141 | + | |
| 142 | + | |
47 | 143 | | |
48 | 144 | | |
49 | 145 | | |
50 | 146 | | |
51 | 147 | | |
52 | 148 | | |
53 | 149 | | |
54 | | - | |
| 150 | + | |
55 | 151 | | |
56 | 152 | | |
57 | 153 | | |
58 | 154 | | |
59 | 155 | | |
60 | 156 | | |
61 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
62 | 160 | | |
63 | 161 | | |
64 | 162 | | |
65 | 163 | | |
66 | 164 | | |
67 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
68 | 173 | | |
69 | 174 | | |
70 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments