drafting an introduction document to how releases work

This commit is contained in:
Brendan Forster
2014-06-11 15:14:46 +01:00
parent 001c5ac564
commit 5f1a3fd9bb
2 changed files with 88 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# Working with the Git Database
### Tag a Commit
Tags can be created through the GitHub API
```
var tag = new NewTag {
Message = "Tagging a new release of Octokit",
Tag = "v1.0.0",
Object = "ee062e0", // short SHA
Type = TaggedType.Commit, // TODO: what are the defaults when nothing specified?
Tagger = new Signature
{
Name = "Brendan Forster",
Email = "brendan@github.com",
Date = DateTime.UtcNow
}
};
var result = await client.GitDatabase.Tags.Create("octokit", "octokit.net", tag);
Console.WriteLine("Created a tag for {0} at {1}", result.Tag, result.Sha);
```
Or you can fetch an existing tag from the API:
var tag = await client.GitDatabase.Tags.Get("octokit", "octokit.net", "v1.0.0");