Skip to content

Commit

Permalink
update compogen test & fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
donch1989 committed Jan 15, 2025
1 parent c8f47d3 commit 6a63dcc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 37 deletions.
21 changes: 1 addition & 20 deletions pkg/component/application/github/v0/event_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,7 @@ func convertRawRepository(r rawRepository) repository {
}

func convertRawUser(r rawUser) user {
return user{
Login: r.Login,
ID: r.ID,
NodeID: r.NodeID,
AvatarURL: r.AvatarURL,
GravatarID: r.GravatarID,
URL: r.URL,
HTMLURL: r.HTMLURL,
FollowersURL: r.FollowersURL,
FollowingURL: r.FollowingURL,
GistsURL: r.GistsURL,
StarredURL: r.StarredURL,
SubscriptionsURL: r.SubscriptionsURL,
OrganizationsURL: r.OrganizationsURL,
ReposURL: r.ReposURL,
EventsURL: r.EventsURL,
ReceivedEventsURL: r.ReceivedEventsURL,
Type: r.Type,
SiteAdmin: r.SiteAdmin,
}
return user(r)
}

func convertRawLicense(r *rawLicense) *license {
Expand Down
8 changes: 1 addition & 7 deletions pkg/component/application/smartlead/v0/task_add_leads.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ func (e *execution) addLeads(ctx context.Context, job *base.Job) error {
return err
}

outputStruct := addLeadsOutput{
UploadCount: response.UploadCount,
TotalLeads: response.TotalLeads,
AlreadyAddedToCampaign: response.AlreadyAddedToCampaign,
InvalidEmailCount: response.InvalidEmailCount,
Error: response.Error,
}
outputStruct := addLeadsOutput(response)

err = job.Output.WriteData(ctx, outputStruct)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ func (e *execution) createCampaign(ctx context.Context, job *base.Job) error {
}

func buildCreateCampaignRequest(input createCampaignInput) createCampaignReq {
return createCampaignReq{
Name: input.Name,
}
return createCampaignReq(input)
}

type createCampaignReq struct {
Expand Down
7 changes: 0 additions & 7 deletions pkg/component/tools/compogen/pkg/gen/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ func TestObjectSchema_Validate(t *testing.T) {
modifier func(*objectSchema)
wantErr string
}{
{
name: "nok - no properties",
modifier: func(rs *objectSchema) {
rs.Properties = map[string]property{}
},
wantErr: "objectSchema.Properties: Properties field doesn't reach the minimum value / number of elements",
},
{
name: "nok - no title",
modifier: func(rs *objectSchema) {
Expand Down

0 comments on commit 6a63dcc

Please sign in to comment.