فهرست منبع

update gitlab.com/gitote/go-gitote-client

Yoginth 7 سال پیش
والد
کامیت
c6a69eb5ce

+ 1 - 1
vendor/gitlab.com/gitote/go-gitote-client/gitote.go

@@ -10,7 +10,7 @@ import (
 )
 
 func Version() string {
-	return "0.12.14"
+	return "0.0.1"
 }
 
 // Client represents a Gitote API client.

+ 42 - 0
vendor/gitlab.com/gitote/go-gitote-client/repo_commit.go

@@ -0,0 +1,42 @@
+package gitote
+
+import (
+	"fmt"
+)
+
+// CommitMeta contains meta information of a commit in terms of API.
+type CommitMeta struct {
+	URL string `json:"url"`
+	SHA string `json:"sha"`
+}
+
+// CommitUser contains information of a user in the context of a commit.
+type CommitUser struct {
+	Name  string `json:"name"`
+	Email string `json:"email"`
+	Date  string `json:"date"`
+}
+
+// RepoCommit contains information of a commit in the context of a repository.
+type RepoCommit struct {
+	URL       string      `json:"url"`
+	Author    *CommitUser `json:"author"`
+	Committer *CommitUser `json:"committer"`
+	Message   string      `json:"message"`
+	Tree      *CommitMeta `json:"tree"`
+}
+
+// Commit contains information generated from a Git commit.
+type Commit struct {
+	*CommitMeta
+	HTMLURL    string        `json:"html_url"`
+	RepoCommit *RepoCommit   `json:"commit"`
+	Author     *User         `json:"author"`
+	Committer  *User         `json:"committer"`
+	Parents    []*CommitMeta `json:"parents"`
+}
+
+func (c *Client) GetSingleCommit(user, repo, commitID string) (*Commit, error) {
+	commit := new(Commit)
+	return commit, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, commitID), nil, nil, &commit)
+}

+ 3 - 3
vendor/vendor.json

@@ -471,10 +471,10 @@
 			"revisionTime": "2018-12-15T04:53:36Z"
 		},
 		{
-			"checksumSHA1": "oHebHgd34mC2BaDjCzTcyJYXumg=",
+			"checksumSHA1": "IFWTWYTdvxtgujSPb4RzQi/osVg=",
 			"path": "gitlab.com/gitote/go-gitote-client",
-			"revision": "be908b88e1cfc9dbed4fa382fcf36d8e32bf5efb",
-			"revisionTime": "2017-06-02T18:25:02Z"
+			"revision": "2fa1b6ceccec3de2096e35d57176ad026c5ea5c1",
+			"revisionTime": "2018-12-15T05:23:13Z"
 		},
 		{
 			"checksumSHA1": "zy03lN7p4ffUF0xGwVgV6Ci78ug=",