mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
fix: comment
This commit is contained in:
parent
568e8f85d2
commit
c018f1a475
2 changed files with 6 additions and 5 deletions
|
@ -234,7 +234,7 @@ var Command = cli.Command{
|
|||
EnvVar: "DRONE_GITEA_URL",
|
||||
Name: "gitea-server",
|
||||
Usage: "gitea server address",
|
||||
Value: "https://github.com",
|
||||
Value: "https://try.gitea.io",
|
||||
},
|
||||
cli.StringFlag{
|
||||
EnvVar: "DRONE_GITEA_GIT_USERNAME",
|
||||
|
|
|
@ -8,10 +8,9 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/drone/drone/model"
|
||||
"github.com/drone/drone/remote"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Opts defines configuration options.
|
||||
|
@ -56,6 +55,8 @@ func getStatus(status string) gitea.StatusState {
|
|||
return gitea.StatusFailure
|
||||
case model.StatusKilled:
|
||||
return gitea.StatusFailure
|
||||
case model.StatusDeclined:
|
||||
return gitea.StatusWarning
|
||||
default:
|
||||
return gitea.StatusFailure
|
||||
}
|
||||
|
@ -165,7 +166,7 @@ func (c *client) Auth(token, secret string) (string, error) {
|
|||
return "", fmt.Errorf("Not Implemented")
|
||||
}
|
||||
|
||||
// Teams is not supported by the Gitea driver.
|
||||
// Teams is supported by the Gitea driver.
|
||||
func (c *client) Teams(u *model.User) ([]*model.Team, error) {
|
||||
client := c.newClientToken(u.Token)
|
||||
orgs, err := client.ListMyOrgs()
|
||||
|
@ -254,7 +255,7 @@ func (c *client) FileRef(u *model.User, r *model.Repo, ref, f string) ([]byte, e
|
|||
return c.newClientToken(u.Token).GetFile(r.Owner, r.Name, ref, f)
|
||||
}
|
||||
|
||||
// Status is not supported by the Gitea driver.
|
||||
// Status is supported by the Gitea driver.
|
||||
func (c *client) Status(u *model.User, r *model.Repo, b *model.Build, link string) error {
|
||||
client := c.newClientToken(u.Token)
|
||||
|
||||
|
|
Loading…
Reference in a new issue