Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
- Removed all go-lint issues
  • Loading branch information
aayeshaarshad committed Apr 16, 2024
1 parent abcc3dc commit a1af7e8
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 152 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/pipelinesascode/keys/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const (
MaxKeepRuns = pipelinesascode.GroupName + "/max-keep-runs"
LogURL = pipelinesascode.GroupName + "/log-url"
ExecutionOrder = pipelinesascode.GroupName + "/execution-order"
ProjectId = pipelinesascode.GroupName + "/project-id"
RepositoryId = pipelinesascode.GroupName + "/repository-id"
ProjectID = pipelinesascode.GroupName + "/project-id"
RepositoryID = pipelinesascode.GroupName + "/repository-id"
// PublicGithubAPIURL default is "https://api.github.com" but it can be overridden by X-GitHub-Enterprise-Host header.
PublicGithubAPIURL = "https://api.github.com"
// InstallationURL gives us the Installation ID for the GitHub Application.
Expand Down
12 changes: 6 additions & 6 deletions pkg/kubeinteraction/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func AddLabelsAndAnnotations(event *info.Event, pipelineRun *tektonv1.PipelineRu
keys.GitProvider: providerConfig.Name,
keys.State: StateStarted,
keys.ControllerInfo: fmt.Sprintf(`{"name":"%s","configmap":"%s","secret":"%s"}`, paramsinfo.Controller.Name, paramsinfo.Controller.Configmap, paramsinfo.Controller.Secret),
keys.RepositoryId: event.RepositoryId,
keys.ProjectId: event.ProjectId,
keys.RepositoryID: event.RepositoryID,
keys.ProjectID: event.ProjectID,
}

if event.PullRequestNumber != 0 {
Expand Down Expand Up @@ -84,11 +84,11 @@ func AddLabelsAndAnnotations(event *info.Event, pipelineRun *tektonv1.PipelineRu

// Azure devops

if event.RepositoryId != "" {
annotations[keys.RepositoryId] = event.RepositoryId
if event.RepositoryID != "" {
annotations[keys.RepositoryID] = event.RepositoryID
}
if event.ProjectId != "" {
annotations[keys.ProjectId] = event.ProjectId
if event.ProjectID != "" {
annotations[keys.ProjectID] = event.ProjectID
}

for k, v := range labels {
Expand Down
6 changes: 3 additions & 3 deletions pkg/params/info/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ type Event struct {
SourceProjectID int
TargetProjectID int

//AzureDevops
RepositoryId string
ProjectId string
// AzureDevops
RepositoryID string
ProjectID string
}

type State struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/azuredevops/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
)

// ToDo: implement this function
// ToDo: implement this function.
func (v *Provider) CheckPolicyAllowing(context.Context, *info.Event, []string) (bool, string) {
return false, ""
}

// ToDo: implement this function
// ToDo: implement this function.
func (v *Provider) IsAllowed(context.Context, *info.Event) (bool, error) {
return true, nil
}
Expand Down
Loading

0 comments on commit a1af7e8

Please sign in to comment.