Skip to content

Commit b14fd6f

Browse files
committed
feat: change plugin
1 parent f53ec5a commit b14fd6f

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

pkg/sdk/es/resources_clients.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,11 +3509,11 @@ func (p RepositoryPaginator) NextPage(ctx context.Context) ([]Repository, error)
35093509
}
35103510

35113511
var listRepositoryFilters = map[string]string{
3512+
"GitHubRepoID": "Description.GitHubRepoID",
35123513
"created_at": "Description.CreatedAt",
35133514
"default_branch_ref": "Description.DefaultBranchRef",
35143515
"description": "Description.Description",
35153516
"homepage_url": "Description.HomepageURL",
3516-
"id": "Description.GitHubRepoID",
35173517
"is_active": "Description.IsActive",
35183518
"is_empty": "Description.IsEmpty",
35193519
"is_fork": "Description.IsFork",
@@ -3600,11 +3600,11 @@ func ListRepository(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD
36003600
}
36013601

36023602
var getRepositoryFilters = map[string]string{
3603+
"GitHubRepoID": "Description.GitHubRepoID",
36033604
"created_at": "Description.CreatedAt",
36043605
"default_branch_ref": "Description.DefaultBranchRef",
36053606
"description": "Description.Description",
36063607
"homepage_url": "Description.HomepageURL",
3607-
"id": "Description.GitHubRepoID",
36083608
"is_active": "Description.IsActive",
36093609
"is_empty": "Description.IsEmpty",
36103610
"is_fork": "Description.IsFork",

provider/describer/repository.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func GetRepository(
207207
}
208208
value := models.Resource{
209209
ID: resourceID,
210-
Name: finalDetail.Name,
210+
Name: *finalDetail.Name,
211211
Description: JSONAllFieldsMarshaller{
212212
Value: finalDetail,
213213
},
@@ -298,13 +298,13 @@ func util_transformToFinalRepoDetail(detail *model.RepoDetail) *model.Repository
298298

299299
finalDetail := &model.RepositoryDescription{
300300
GitHubRepoID: detail.ID,
301-
NodeID: detail.NodeID,
302-
Name: detail.Name,
303-
NameWithOwner: detail.FullName,
301+
NodeID: &detail.NodeID,
302+
Name: &detail.Name,
303+
NameWithOwner: &detail.FullName,
304304
Description: detail.Description,
305-
CreatedAt: detail.CreatedAt,
306-
UpdatedAt: detail.UpdatedAt,
307-
PushedAt: detail.PushedAt,
305+
CreatedAt: &detail.CreatedAt,
306+
UpdatedAt: &detail.UpdatedAt,
307+
PushedAt: &detail.PushedAt,
308308
IsActive: isActive,
309309
IsEmpty: isEmpty,
310310
IsFork: detail.Fork,

provider/describer/workflow.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ func GetRepositoryWorkflows(ctx context.Context, githubClient GitHubClient, stre
9292
URL: workflow.URL,
9393
HTMLURL: workflow.HTMLURL,
9494
BadgeURL: workflow.BadgeURL,
95-
RepositoryFullName: repoFullName,
96-
WorkFlowFileContent: content,
95+
RepositoryFullName: &repoFullName,
96+
WorkFlowFileContent: &content,
9797
WorkFlowFileContentJson: fileContent,
9898
Pipeline: pipeline,
9999
},
@@ -185,8 +185,8 @@ func GetRepositoryWorkflow(ctx context.Context, githubClient GitHubClient, organ
185185
URL: workflow.URL,
186186
HTMLURL: workflow.HTMLURL,
187187
BadgeURL: workflow.BadgeURL,
188-
RepositoryFullName: repoFullName,
189-
WorkFlowFileContent: content,
188+
RepositoryFullName: &repoFullName,
189+
WorkFlowFileContent: &content,
190190
WorkFlowFileContentJson: fileContent,
191191
Pipeline: pipeline,
192192
},

provider/model/model.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -859,13 +859,13 @@ type Metrics struct {
859859

860860
type RepositoryDescription struct {
861861
GitHubRepoID int
862-
NodeID string
863-
Name string
864-
NameWithOwner string
862+
NodeID *string
863+
Name *string
864+
NameWithOwner *string
865865
Description *string
866-
CreatedAt string
867-
UpdatedAt string
868-
PushedAt string
866+
CreatedAt *string
867+
UpdatedAt *string
868+
PushedAt *string
869869
IsActive bool
870870
IsEmpty bool
871871
IsFork bool
@@ -1131,8 +1131,8 @@ type WorkflowDescription struct {
11311131
URL *string
11321132
HTMLURL *string
11331133
BadgeURL *string
1134-
RepositoryFullName string
1135-
WorkFlowFileContent string
1134+
RepositoryFullName *string
1135+
WorkFlowFileContent *string
11361136
WorkFlowFileContentJson *github.RepositoryContent
11371137
Pipeline *goPipeline.Pipeline
11381138
}

0 commit comments

Comments
 (0)