mirror of https://github.com/gogs/gogs.git
vendor: update
- github.com/gogs/go-gogs-client - gopkg.in/macaron.v1pull/5340/head^2
parent
f91cb9321e
commit
c82ac420fc
|
@ -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"
|
||||||
|
)
|
|
@ -6,6 +6,7 @@ package gogs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CommitMeta contains meta information of a commit in terms of API.
|
// 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)
|
commit := new(Commit)
|
||||||
return commit, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, commitID), nil, nil, &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
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ Package macaron is a high productive and modular web framework in Go.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
The minimum requirement of Go is **1.3**.
|
The minimum requirement of Go is **1.6**.
|
||||||
|
|
||||||
To install Macaron:
|
To install Macaron:
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ func (ctx *Context) Params(name string) string {
|
||||||
|
|
||||||
// SetParams sets value of param with given name.
|
// SetParams sets value of param with given name.
|
||||||
func (ctx *Context) SetParams(name, val string) {
|
func (ctx *Context) SetParams(name, val string) {
|
||||||
if !strings.HasPrefix(name, ":") {
|
if name != "*" && !strings.HasPrefix(name, ":") {
|
||||||
name = ":" + name
|
name = ":" + name
|
||||||
}
|
}
|
||||||
ctx.params[name] = val
|
ctx.params[name] = val
|
||||||
|
@ -270,7 +270,7 @@ func (ctx *Context) SetParams(name, val string) {
|
||||||
|
|
||||||
// ReplaceAllParams replace all current params with given params
|
// ReplaceAllParams replace all current params with given params
|
||||||
func (ctx *Context) ReplaceAllParams(params Params) {
|
func (ctx *Context) ReplaceAllParams(params Params) {
|
||||||
ctx.params = params;
|
ctx.params = params
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParamsEscape returns escapred params result.
|
// ParamsEscape returns escapred params result.
|
||||||
|
|
|
@ -32,7 +32,7 @@ import (
|
||||||
"github.com/go-macaron/inject"
|
"github.com/go-macaron/inject"
|
||||||
)
|
)
|
||||||
|
|
||||||
const _VERSION = "1.3.1.0306"
|
const _VERSION = "1.3.2.1216"
|
||||||
|
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return _VERSION
|
return _VERSION
|
||||||
|
|
|
@ -219,10 +219,10 @@
|
||||||
"revisionTime": "2018-12-15T04:53:36Z"
|
"revisionTime": "2018-12-15T04:53:36Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "LlzYU6W68aX9nJLibQkKFTiY+9Q=",
|
"checksumSHA1": "81S19W6omjG5N+zVWeI2yRsSfw0=",
|
||||||
"path": "github.com/gogs/go-gogs-client",
|
"path": "github.com/gogs/go-gogs-client",
|
||||||
"revision": "61758abf1cdb964b69de42a3f83f7148e3f9454d",
|
"revision": "1cd0db3113de87dbac702b9f1a08d9bd0e7142bb",
|
||||||
"revisionTime": "2018-12-15T05:23:13Z"
|
"revisionTime": "2018-12-17T00:43:19Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "GaJLoEuMGnP5ofXvuweAI4wx06U=",
|
"checksumSHA1": "GaJLoEuMGnP5ofXvuweAI4wx06U=",
|
||||||
|
@ -711,10 +711,10 @@
|
||||||
"revisionTime": "2016-08-08T14:54:09Z"
|
"revisionTime": "2016-08-08T14:54:09Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "7c6yCe2PjyV+/qWiPBWUf+j+1us=",
|
"checksumSHA1": "55kJCeuwX46fYJt2Ww1d7rxMOTo=",
|
||||||
"path": "gopkg.in/macaron.v1",
|
"path": "gopkg.in/macaron.v1",
|
||||||
"revision": "c1be95e6d21e769e44e1ec33cec9da5837861c10",
|
"revision": "dfcb80ca86e8534962c62812efd93209c7e600e7",
|
||||||
"revisionTime": "2018-03-06T06:20:08Z"
|
"revisionTime": "2018-12-17T00:30:54Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "6QPjE+qflEBHg+JPJd9e4iQuRAk=",
|
"checksumSHA1": "6QPjE+qflEBHg+JPJd9e4iQuRAk=",
|
||||||
|
|
Loading…
Reference in New Issue