Skip to content

Commit

Permalink
feat: change plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 24, 2024
1 parent f53ec5a commit b14fd6f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pkg/sdk/es/resources_clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -3509,11 +3509,11 @@ func (p RepositoryPaginator) NextPage(ctx context.Context) ([]Repository, error)
}

var listRepositoryFilters = map[string]string{
"GitHubRepoID": "Description.GitHubRepoID",
"created_at": "Description.CreatedAt",
"default_branch_ref": "Description.DefaultBranchRef",
"description": "Description.Description",
"homepage_url": "Description.HomepageURL",
"id": "Description.GitHubRepoID",
"is_active": "Description.IsActive",
"is_empty": "Description.IsEmpty",
"is_fork": "Description.IsFork",
Expand Down Expand Up @@ -3600,11 +3600,11 @@ func ListRepository(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD
}

var getRepositoryFilters = map[string]string{
"GitHubRepoID": "Description.GitHubRepoID",
"created_at": "Description.CreatedAt",
"default_branch_ref": "Description.DefaultBranchRef",
"description": "Description.Description",
"homepage_url": "Description.HomepageURL",
"id": "Description.GitHubRepoID",
"is_active": "Description.IsActive",
"is_empty": "Description.IsEmpty",
"is_fork": "Description.IsFork",
Expand Down
14 changes: 7 additions & 7 deletions provider/describer/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func GetRepository(
}
value := models.Resource{
ID: resourceID,
Name: finalDetail.Name,
Name: *finalDetail.Name,
Description: JSONAllFieldsMarshaller{
Value: finalDetail,
},
Expand Down Expand Up @@ -298,13 +298,13 @@ func util_transformToFinalRepoDetail(detail *model.RepoDetail) *model.Repository

finalDetail := &model.RepositoryDescription{
GitHubRepoID: detail.ID,
NodeID: detail.NodeID,
Name: detail.Name,
NameWithOwner: detail.FullName,
NodeID: &detail.NodeID,
Name: &detail.Name,
NameWithOwner: &detail.FullName,
Description: detail.Description,
CreatedAt: detail.CreatedAt,
UpdatedAt: detail.UpdatedAt,
PushedAt: detail.PushedAt,
CreatedAt: &detail.CreatedAt,
UpdatedAt: &detail.UpdatedAt,
PushedAt: &detail.PushedAt,
IsActive: isActive,
IsEmpty: isEmpty,
IsFork: detail.Fork,
Expand Down
8 changes: 4 additions & 4 deletions provider/describer/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func GetRepositoryWorkflows(ctx context.Context, githubClient GitHubClient, stre
URL: workflow.URL,
HTMLURL: workflow.HTMLURL,
BadgeURL: workflow.BadgeURL,
RepositoryFullName: repoFullName,
WorkFlowFileContent: content,
RepositoryFullName: &repoFullName,
WorkFlowFileContent: &content,
WorkFlowFileContentJson: fileContent,
Pipeline: pipeline,
},
Expand Down Expand Up @@ -185,8 +185,8 @@ func GetRepositoryWorkflow(ctx context.Context, githubClient GitHubClient, organ
URL: workflow.URL,
HTMLURL: workflow.HTMLURL,
BadgeURL: workflow.BadgeURL,
RepositoryFullName: repoFullName,
WorkFlowFileContent: content,
RepositoryFullName: &repoFullName,
WorkFlowFileContent: &content,
WorkFlowFileContentJson: fileContent,
Pipeline: pipeline,
},
Expand Down
16 changes: 8 additions & 8 deletions provider/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,13 +859,13 @@ type Metrics struct {

type RepositoryDescription struct {
GitHubRepoID int
NodeID string
Name string
NameWithOwner string
NodeID *string
Name *string
NameWithOwner *string
Description *string
CreatedAt string
UpdatedAt string
PushedAt string
CreatedAt *string
UpdatedAt *string
PushedAt *string
IsActive bool
IsEmpty bool
IsFork bool
Expand Down Expand Up @@ -1131,8 +1131,8 @@ type WorkflowDescription struct {
URL *string
HTMLURL *string
BadgeURL *string
RepositoryFullName string
WorkFlowFileContent string
RepositoryFullName *string
WorkFlowFileContent *string
WorkFlowFileContentJson *github.RepositoryContent
Pipeline *goPipeline.Pipeline
}
Expand Down

0 comments on commit b14fd6f

Please sign in to comment.