Replace drone strings with woodpecker (#391)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Anbraten
2021-10-02 10:59:34 +02:00
committed by GitHub
parent ba0286d055
commit bb37836600
34 changed files with 126 additions and 126 deletions

View File

@@ -47,7 +47,7 @@ const (
refspec = "%s:%s"
)
// convertStatus is a helper function used to convert a Drone status to a
// convertStatus is a helper function used to convert a Woodpecker status to a
// GitHub commit status.
func convertStatus(status string) string {
switch status {
@@ -62,7 +62,7 @@ func convertStatus(status string) string {
}
}
// convertDesc is a helper function used to convert a Drone status to a
// convertDesc is a helper function used to convert a Woodpecker status to a
// GitHub status description.
func convertDesc(status string) string {
switch status {
@@ -82,7 +82,7 @@ func convertDesc(status string) string {
}
// convertRepo is a helper function used to convert a GitHub repository
// structure to the common Drone repository structure.
// structure to the common Woodpecker repository structure.
func convertRepo(from *github.Repository, private bool) *model.Repo {
repo := &model.Repo{
Owner: *from.Owner.Login,
@@ -106,7 +106,7 @@ func convertRepo(from *github.Repository, private bool) *model.Repo {
}
// convertPerm is a helper function used to convert a GitHub repository
// permissions to the common Drone permissions structure.
// permissions to the common Woodpecker permissions structure.
func convertPerm(from *github.Repository) *model.Perm {
return &model.Perm{
Admin: from.Permissions["admin"],
@@ -116,7 +116,7 @@ func convertPerm(from *github.Repository) *model.Perm {
}
// convertTeamPerm is a helper function used to convert a GitHub organization
// permissions to the common Drone permissions structure.
// permissions to the common Woodpecker permissions structure.
func convertTeamPerm(from *github.Membership) *model.Perm {
admin := false
if *from.Role == "admin" {
@@ -128,7 +128,7 @@ func convertTeamPerm(from *github.Membership) *model.Perm {
}
// convertRepoList is a helper function used to convert a GitHub repository
// list to the common Drone repository structure.
// list to the common Woodpecker repository structure.
func convertRepoList(from []*github.Repository, private bool) []*model.Repo {
var repos []*model.Repo
for _, repo := range from {
@@ -138,7 +138,7 @@ func convertRepoList(from []*github.Repository, private bool) []*model.Repo {
}
// convertTeamList is a helper function used to convert a GitHub team list to
// the common Drone repository structure.
// the common Woodpecker repository structure.
func convertTeamList(from []*github.Organization) []*model.Team {
var teams []*model.Team
for _, team := range from {
@@ -148,7 +148,7 @@ func convertTeamList(from []*github.Organization) []*model.Team {
}
// convertTeam is a helper function used to convert a GitHub team structure
// to the common Drone repository structure.
// to the common Woodpecker repository structure.
func convertTeam(from *github.Organization) *model.Team {
return &model.Team{
Login: *from.Login,
@@ -157,7 +157,7 @@ func convertTeam(from *github.Organization) *model.Team {
}
// convertRepoHook is a helper function used to extract the Repository details
// from a webhook and convert to the common Drone repository structure.
// from a webhook and convert to the common Woodpecker repository structure.
func convertRepoHook(from *webhook) *model.Repo {
repo := &model.Repo{
Owner: from.Repo.Owner.Login,
@@ -182,7 +182,7 @@ func convertRepoHook(from *webhook) *model.Repo {
}
// convertPushHook is a helper function used to extract the Build details
// from a push webhook and convert to the common Drone Build structure.
// from a push webhook and convert to the common Woodpecker Build structure.
func convertPushHook(from *webhook) *model.Build {
files := getChangedFilesFromWebhook(from)
build := &model.Build{
@@ -219,7 +219,7 @@ func convertPushHook(from *webhook) *model.Build {
}
// convertPushHook is a helper function used to extract the Build details
// from a deploy webhook and convert to the common Drone Build structure.
// from a deploy webhook and convert to the common Woodpecker Build structure.
func convertDeployHook(from *webhook) *model.Build {
build := &model.Build{
Event: model.EventDeploy,
@@ -249,7 +249,7 @@ func convertDeployHook(from *webhook) *model.Build {
}
// convertPullHook is a helper function used to extract the Build details
// from a pull request webhook and convert to the common Drone Build structure.
// from a pull request webhook and convert to the common Woodpecker Build structure.
func convertPullHook(from *webhook, merge bool) *model.Build {
build := &model.Build{
Event: model.EventPull,

View File

@@ -119,7 +119,7 @@ func (c *client) Login(ctx context.Context, res http.ResponseWriter, req *http.R
// TODO(bradrydzewski) we really should be using a random value here and
// storing in a cookie for verification in the next stage of the workflow.
http.Redirect(res, req, config.AuthCodeURL("drone"), http.StatusSeeOther)
http.Redirect(res, req, config.AuthCodeURL("woodpecker"), http.StatusSeeOther)
return nil, nil
}