Skip to content

Commit bb90ec7

Browse files
committed
Convert git
1 parent 67be00a commit bb90ec7

4 files changed

Lines changed: 42 additions & 81 deletions

File tree

content/v3/git/commits.md

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,12 @@ title: Git Commits | GitHub API
2222

2323
### Parameters
2424

25-
message
26-
: _String_ of the commit message
25+
Name | Type | Description | Required? | Default
26+
----|------|--------------|-----------|---------
27+
`message`|`string` | The commit message|**YES**|
28+
`tree`|`string` | The SHA of the tree object this commit points to|**YES**|
29+
`parents`|| The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.|**YES**|
2730

28-
tree
29-
: _String_ of the SHA of the tree object this commit points to
30-
31-
parents
32-
: _Array_ of the SHAs of the commits that were the parents of this
33-
commit. If omitted or empty, the commit will be written as a root
34-
commit. For a single parent, an array of one SHA should be provided,
35-
for a merge commit, an array of more than one should be provided.
3631

3732
### Optional Parameters
3833

@@ -41,23 +36,15 @@ data if omitted. If the `author` section is omitted, it will be filled
4136
in with the authenticated user's information and the current date.
4237

4338

44-
author.name
45-
: _String_ of the name of the author of the commit
46-
47-
author.email
48-
: _String_ of the email of the author of the commit
49-
50-
author.date
51-
: _Timestamp_ of when this commit was authored
52-
53-
committer.name
54-
: _String_ of the name of the committer of the commit
55-
56-
committer.email
57-
: _String_ of the email of the committer of the commit
39+
Name | Type | Description | Required? | Default
40+
----|------|--------------|-----------|---------
41+
`author.name`|| The name of the author of the commit| |
42+
`author.email`|| The email of the author of the commit| |
43+
`author.date`|| Indicates when this commit was authored. The time should be passed in as UTC in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.|**YES**|
44+
`committer.name`|| The name of the committer of the commit| |
45+
`committer.email`|| The email of the committer of the commit| |
46+
`committer.date`|| Indicates when this commit was committed. The time should be passed in as UTC in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.|**YES**|
5847

59-
committer.date
60-
: _Timestamp_ of when this commit was committed
6148

6249
### Example Input
6350

content/v3/git/refs.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ For a full refs listing, you'll get something that looks like:
4646

4747
### Parameters
4848

49-
ref
50-
: _String_ of the name of the fully qualified reference (ie: `refs/heads/master`).
51-
If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
49+
Name | Type | Description | Required? | Default
50+
----|------|--------------|-----------|---------
51+
`ref`|| The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.| |
52+
`sha`|| The SHA1 value to set this reference to| |
5253

53-
sha
54-
: _String_ of the SHA1 value to set this reference to
5554

5655
### Input
5756

@@ -69,13 +68,11 @@ sha
6968

7069
### Parameters
7170

72-
sha
73-
: _String_ of the SHA1 value to set this reference to
71+
Name | Type | Description | Required? | Default
72+
----|------|--------------|-----------|---------
73+
`sha`|| The SHA1 value to set this reference to| |
74+
`force`|| Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. | |`false`
7475

75-
force
76-
: _Boolean_ indicating whether to force the update or to make sure the
77-
update is a fast-forward update. The default is `false`, so leaving this
78-
out or setting it to `false` will make sure you're not overwriting work.
7976

8077
### Input
8178

content/v3/git/tags.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,16 @@ would be unnecessary.
3333

3434
### Parameters
3535

36-
tag
37-
: _String_ of the tag
36+
Name | Type | Description | Required? | Default
37+
----|------|--------------|-----------|---------
38+
`tag`|| The tag| |
39+
`message`|| The tag message| |
40+
`object`|| The SHA of the git object this is tagging| |
41+
`type`|| The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.| |
42+
`tagger.name`|| The name of the author of the tag| |
43+
`tagger.email`|| The email of the author of the tag| |
44+
`tagger.date`|| When this object was tagged. The time should be passed in as UTC in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.| |
3845

39-
message
40-
: _String_ of the tag message
41-
42-
object
43-
: _String_ of the SHA of the git object this is tagging
44-
45-
type
46-
: _String_ of the type of the object we're tagging. Normally this is a
47-
`commit` but it can also be a `tree` or a `blob`.
48-
49-
tagger.name
50-
: _String_ of the name of the author of the tag
51-
52-
tagger.email
53-
: _String_ of the email of the author of the tag
54-
55-
tagger.date
56-
: _Timestamp_ of when this object was tagged
5746

5847
### Example Input
5948

content/v3/git/trees.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,21 @@ a new tree out.
3636

3737
### Parameters
3838

39-
base_tree
40-
: optional _String_ of the SHA1 of the tree you want to update with new data.
41-
If you don't set this, the commit will be created on top of everything,
42-
however, it will only contain your change, the rest of your files will show up
43-
as deleted.
39+
Name | Type | Description | Required? | Default
40+
----|------|--------------|-----------|---------
41+
`base_tree`| `string` | The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.| |
42+
`tree`|`array` of `hash`es | Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure|**YES**|
4443

45-
tree
46-
: _Array_ of _Hash_ objects (of `path`, `mode`, `type` and `sha`) specifying a
47-
tree structure
44+
The `tree` parameter takes the following keys:
4845

49-
tree.path
50-
: _String_ of the file referenced in the tree
46+
Name | Type | Description | Required? | Default
47+
----|------|--------------|-----------|---------
48+
`path`|`string`| The file referenced in the tree| |
49+
`mode`|`string`| The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink| |
50+
`type`| `string`| Either `blob`, `tree`, or `commit`| |
51+
`sha`|`string`| The SHA1 checksum ID of the object in the tree| |
52+
`content`|`string` | The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.| |
5153

52-
tree.mode
53-
: _String_ of the file mode - one of `100644` for file (blob), `100755` for
54-
executable (blob), `040000` for subdirectory (tree), `160000` for submodule
55-
(commit) or `120000` for a blob that specifies the path of a symlink
56-
57-
tree.type
58-
: _String_ of `blob`, `tree`, `commit`
59-
60-
tree.sha
61-
: _String_ of SHA1 checksum ID of the object in the tree
62-
63-
tree.content
64-
: _String_ of content you want this file to have - GitHub will write this blob
65-
out and use that SHA for this entry. Use either this or `tree.sha`
6654

6755
### Input
6856

0 commit comments

Comments
 (0)