mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
Merge pull request #2377 from tboerger/format-fix [ci skip]
Just fixed format with go fmt ./...
This commit is contained in:
commit
a85f89a3c1
@ -91,7 +91,7 @@ func loop(c *cli.Context) error {
|
|||||||
password: c.String("password"),
|
password: c.String("password"),
|
||||||
}),
|
}),
|
||||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||||
Time: c.Duration("keepalive-time"),
|
Time: c.Duration("keepalive-time"),
|
||||||
Timeout: c.Duration("keepalive-timeout"),
|
Timeout: c.Duration("keepalive-timeout"),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RepoLite struct {
|
type RepoLite struct {
|
||||||
|
@ -19,7 +19,7 @@ func NewRemote(endpoint string) model.SenderService {
|
|||||||
func (p *plugin) SenderAllowed(user *model.User, repo *model.Repo, build *model.Build, conf *model.Config) (bool, error) {
|
func (p *plugin) SenderAllowed(user *model.User, repo *model.Repo, build *model.Build, conf *model.Config) (bool, error) {
|
||||||
path := fmt.Sprintf("%s/senders/%s/%s/%s/verify", p.endpoint, repo.Owner, repo.Name, build.Sender)
|
path := fmt.Sprintf("%s/senders/%s/%s/%s/verify", p.endpoint, repo.Owner, repo.Name, build.Sender)
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"build": build,
|
"build": build,
|
||||||
"config": conf,
|
"config": conf,
|
||||||
}
|
}
|
||||||
err := internal.Send("POST", path, &data, nil)
|
err := internal.Send("POST", path, &data, nil)
|
||||||
|
@ -58,8 +58,8 @@ func (g *Client) AllProjects(hide_archives bool) ([]*Project, error) {
|
|||||||
// Get a list of projects owned by the authenticated user.
|
// Get a list of projects owned by the authenticated user.
|
||||||
func (c *Client) Projects(page int, per_page int, hide_archives bool) ([]*Project, error) {
|
func (c *Client) Projects(page int, per_page int, hide_archives bool) ([]*Project, error) {
|
||||||
projectsOptions := QMap{
|
projectsOptions := QMap{
|
||||||
"page": strconv.Itoa(page),
|
"page": strconv.Itoa(page),
|
||||||
"per_page": strconv.Itoa(per_page),
|
"per_page": strconv.Itoa(per_page),
|
||||||
"membership": "true",
|
"membership": "true",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ func (c *Client) SetStatus(id, sha, state, desc, ref, link string) error {
|
|||||||
func (c *Client) SearchProjectId(namespace string, name string) (id int, err error) {
|
func (c *Client) SearchProjectId(namespace string, name string) (id int, err error) {
|
||||||
|
|
||||||
url, opaque := c.ResourceUrl(projectsUrl, nil, QMap{
|
url, opaque := c.ResourceUrl(projectsUrl, nil, QMap{
|
||||||
"query": strings.ToLower(name),
|
"query": strings.ToLower(name),
|
||||||
"membership": "true",
|
"membership": "true",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ func TestMultilineEnvsubst(t *testing.T) {
|
|||||||
Message: `aaa
|
Message: `aaa
|
||||||
bbb`,
|
bbb`,
|
||||||
},
|
},
|
||||||
Last: &model.Build{},
|
Last: &model.Build{},
|
||||||
Netrc: &model.Netrc{},
|
Netrc: &model.Netrc{},
|
||||||
Secs: []*model.Secret{},
|
Secs: []*model.Secret{},
|
||||||
Regs: []*model.Registry{},
|
Regs: []*model.Registry{},
|
||||||
Link: "",
|
Link: "",
|
||||||
Yaml: `pipeline:
|
Yaml: `pipeline:
|
||||||
xxx:
|
xxx:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
Loading…
Reference in New Issue
Block a user