Skip to content

Commit

Permalink
remove deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Jan 12, 2024
1 parent 069e699 commit a62b4bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/argo_client/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func GetManifestsLocal(ctx context.Context, name string, tempRepoDir string, cha
KustomizeOptions: argoSettings.KustomizeOptions,
KubeVersion: cluster.Info.ServerVersion,
ApiVersions: cluster.Info.APIVersions,
Plugins: argoSettings.ConfigManagementPlugins,
TrackingMethod: argoSettings.TrackingMethod,
}, true, &git.NoopCredsStore{}, resource.MustParse("0"), nil)
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions pkg/vcs/gitlab_client/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"strings"

"github.com/zapier/kubechecks/pkg/repo_config"
"github.com/zapier/kubechecks/telemetry"
"github.com/xanzy/go-gitlab"
"go.opentelemetry.io/otel"

"github.com/xanzy/go-gitlab"
"github.com/zapier/kubechecks/pkg/repo_config"
"github.com/zapier/kubechecks/telemetry"
)

type Changes struct {
Expand All @@ -26,14 +26,14 @@ func (c *Client) GetMergeChanges(ctx context.Context, projectId int, mergeReqId
_, span := otel.Tracer("Kubechecks").Start(ctx, "GetMergeChanges")
defer span.End()

changes := []*Changes{}
mr, _, err := c.MergeRequests.GetMergeRequestChanges(projectId, mergeReqId, &gitlab.GetMergeRequestChangesOptions{})
var changes []*Changes
diffs, _, err := c.MergeRequests.ListMergeRequestDiffs(projectId, mergeReqId, &gitlab.ListMergeRequestDiffsOptions{})
if err != nil {
telemetry.SetError(span, err, "Get MergeRequest Changes")
return changes, err
}

for _, change := range mr.Changes {
for _, change := range diffs {
changes = append(changes, &Changes{
OldPath: change.OldPath,
NewPath: change.NewPath,
Expand Down

0 comments on commit a62b4bd

Please sign in to comment.