mirror of
https://github.com/gogs/gogs.git
synced 2026-05-09 04:26:43 +02:00
vendor: update
- github.com/gogs/go-gogs-client - gopkg.in/macaron.v1
This commit is contained in:
9
vendor/github.com/gogs/go-gogs-client/media_types.go
generated
vendored
Normal file
9
vendor/github.com/gogs/go-gogs-client/media_types.go
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright 2018 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gogs
|
||||
|
||||
const (
|
||||
MediaApplicationSHA = "application/vnd.gogs.sha"
|
||||
)
|
||||
7
vendor/github.com/gogs/go-gogs-client/repo_commit.go
generated
vendored
7
vendor/github.com/gogs/go-gogs-client/repo_commit.go
generated
vendored
@@ -6,6 +6,7 @@ package gogs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// CommitMeta contains meta information of a commit in terms of API.
|
||||
@@ -44,3 +45,9 @@ 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)
|
||||
}
|
||||
|
||||
func (c *Client) GetReferenceSHA(user, repo, ref string) (string, error) {
|
||||
data, err := c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, ref),
|
||||
http.Header{"Accept": []string{MediaApplicationSHA}}, nil)
|
||||
return string(data), err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user