Skip to content

Commit dfe4ccd

Browse files
bharatncunknwon
andauthored
add api docs for /repos/:owner/:repo/git/trees/:sha #6 (#7)
* add api docs for /repos/:owner/:repo/git/trees/:sha #6 This PR adds the docs for the git repo tress endpoint. * Update and rename Repositories/Tree.md to Git Data/Trees.md * Update README.md Co-authored-by: ᴜɴᴋɴᴡᴏɴ <[email protected]>
1 parent 6b08f76 commit dfe4ccd

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

Git Data/Trees.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Git Trees
2+
3+
## Get a tree
4+
5+
```
6+
GET /repos/:owner/:repo/git/trees/:sha
7+
```
8+
9+
### Response
10+
11+
```
12+
Status: 200 OK
13+
```
14+
```json
15+
{
16+
"sha": "c59441ded1549b149def0d4c54594d31a7f3718f",
17+
"url": "http://localhost:3000/api/v1/repos/root/testrepo/git/trees/c59441ded1549b149def0d4c54594d31a7f3718f",
18+
"tree": [
19+
{
20+
"path": "LICENSE",
21+
"mode": "120000",
22+
"type": "blob",
23+
"size": 1077,
24+
"sha": "472ac2361b65136b393d652de25341e2ea44f299",
25+
"url": "http://localhost:3000/api/v1/repos/root/testrepo/git/trees/472ac2361b65136b393d652de25341e2ea44f299"
26+
},
27+
{
28+
"path": "README.md",
29+
"mode": "120000",
30+
"type": "blob",
31+
"size": 12,
32+
"sha": "70fcb456d436f08462602f26df6fb7e167e7a916",
33+
"url": "http://localhost:3000/api/v1/repos/root/testrepo/git/trees/70fcb456d436f08462602f26df6fb7e167e7a916"
34+
}
35+
]
36+
}
37+
```

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ If you have any questions or concern, please [file an issue](https://github.com/
2828
- [Commits](Repositories/Commits.md)
2929
- [Contents](Repositories/Contents.md)
3030
- [Deploy Keys](Repositories/Deploy%20Keys.md)
31+
- [Tree](Repositories/Tree.md)
3132
- [Webhooks](Repositories/Webhooks.md)
3233
- [Users](Users)
3334
- [Emails](Users/Emails.md)
3435
- [Followers](Users/Followers.md)
3536
- [Public Keys](Users/Public%20Keys.md)
37+
- [Git Data](Git%20Data)
38+
- [Trees](Git%20Data/Trees.md)
3639

3740
## Installation
3841

0 commit comments

Comments
 (0)