Skip to content

Commit

Permalink
Fix yq test to not create empty commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherias committed Jan 3, 2025
1 parent bd96e48 commit 91381b5
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"context"
"encoding/json"
"fmt"
"google.golang.org/protobuf/types/known/structpb"

Check failure on line 12 in internal/engine/actions/remediate/pull_request/pull_request_test.go

View workflow job for this annotation

GitHub Actions / lint / Run golangci-lint

File is not properly formatted (gci)
"io"
"net/http"
"testing"
Expand Down Expand Up @@ -140,6 +141,35 @@ func yqPrRem() *pb.RuleType_Definition_Remediate_PullRequestRemediation {
Method: "minder.yq.evaluate",
Title: yqCommitTitle,
Body: yqPrBody,
Params: &structpb.Struct{
Fields: map[string]*structpb.Value{
"expression": {
Kind: &structpb.Value_StringValue{
StringValue: ".on = \"workflow_dispatch\"",
},
},
"patterns": {
Kind: &structpb.Value_ListValue{
ListValue: &structpb.ListValue{
Values: []*structpb.Value{
structpb.NewStructValue(&structpb.Struct{
Fields: map[string]*structpb.Value{
"pattern": structpb.NewStringValue(".github/workflows/*.yml"),
"type": structpb.NewStringValue("glob"),
},
}),
structpb.NewStructValue(&structpb.Struct{
Fields: map[string]*structpb.Value{
"pattern": structpb.NewStringValue(".github/workflows/*.yaml"),
"type": structpb.NewStringValue("glob"),
},
}),
},
},
},
},
},
},
}
}

Expand Down

0 comments on commit 91381b5

Please sign in to comment.