diff --git a/pkg/sdk/es/resources_clients.go b/pkg/sdk/es/resources_clients.go index e60fea05..b0c9d3f4 100644 --- a/pkg/sdk/es/resources_clients.go +++ b/pkg/sdk/es/resources_clients.go @@ -8059,7 +8059,7 @@ type UserPaginator struct { } func (k Client) NewUserPaginator(filters []essdk.BoolFilter, limit *int64) (UserPaginator, error) { - paginator, err := essdk.NewPaginator(k.ES(), "githubuser", filters, limit) + paginator, err := essdk.NewPaginator(k.ES(), "github_user", filters, limit) if err != nil { return UserPaginator{}, err } @@ -8372,7 +8372,7 @@ type WorkflowPaginator struct { } func (k Client) NewWorkflowPaginator(filters []essdk.BoolFilter, limit *int64) (WorkflowPaginator, error) { - paginator, err := essdk.NewPaginator(k.ES(), "githubworkflow", filters, limit) + paginator, err := essdk.NewPaginator(k.ES(), "github_workflow", filters, limit) if err != nil { return WorkflowPaginator{}, err } diff --git a/pkg/sdk/runable/resource_type/main.go b/pkg/sdk/runable/resource_type/main.go index 5434f4b7..c531c3c3 100644 --- a/pkg/sdk/runable/resource_type/main.go +++ b/pkg/sdk/runable/resource_type/main.go @@ -39,8 +39,7 @@ func main() { var resourceTypes []ResourceType if resourceTypesFile == nil || len(*resourceTypesFile) == 0 { - //rt := "../../../../provider/resource_types/resource-types.json" - rt := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\provider\\resource_types\\resource-types.json" + rt := "../../../../provider/resource_types/resource-types.json" resourceTypesFile = &rt } @@ -71,8 +70,7 @@ func main() { // Set default output paths if not provided if output == nil || len(*output) == 0 { - v := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\provider\\resource_types.go" - //v := "../../../../provider/resource_types.go" + v := "../../../../provider/resource_types.go" output = &v } diff --git a/pkg/sdk/runable/steampipe_es_client_generator/main.go b/pkg/sdk/runable/steampipe_es_client_generator/main.go index ff0e94c8..dd771f0b 100755 --- a/pkg/sdk/runable/steampipe_es_client_generator/main.go +++ b/pkg/sdk/runable/steampipe_es_client_generator/main.go @@ -23,9 +23,7 @@ var ( pluginPath = flag.String("pluginPath", "", "Location of the steampipe plugin") ) -const PluginPath = "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\steampipe-plugin-github\\github" - -//const PluginPath = "../../../../steampipe-plugin-github/github" +const PluginPath = "../../../../steampipe-plugin-github/github" type IntegrationType struct { Name string @@ -45,13 +43,11 @@ type ResourceType struct { func main() { if output == nil || len(*output) == 0 { - //v := "../../es/resources_clients.go" - v := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\pkg\\sdk\\es\\resources_clients.go" + v := "../../es/resources_clients.go" output = &v } if file == nil || len(*file) == 0 { - //v := "../../../../provider/model/model.go" - v := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\provider\\model\\model.go" + v := "../../../../provider/model/model.go" file = &v } @@ -61,8 +57,7 @@ func main() { } if resourceTypesFile == nil || len(*resourceTypesFile) == 0 { - //rt := "../../../../provider/resource_types/resource-types.json" - rt := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\provider\\resource_types\\resource-types.json" + rt := "../../../../provider/resource_types/resource-types.json" resourceTypesFile = &rt } diff --git a/pkg/sdk/runable/steampipe_index_map/main.go b/pkg/sdk/runable/steampipe_index_map/main.go index b6e89e92..49b15837 100644 --- a/pkg/sdk/runable/steampipe_index_map/main.go +++ b/pkg/sdk/runable/steampipe_index_map/main.go @@ -36,14 +36,12 @@ func main() { var resourceTypes []ResourceType if resourceTypesFile == nil || len(*resourceTypesFile) == 0 { - //rt := "../../../../provider/resource_types/resource-types.json" - rt := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\provider\\resource_types\\resource-types.json" + rt := "../../../../provider/resource_types/resource-types.json" resourceTypesFile = &rt } if indexMap == nil || len(*indexMap) == 0 { - v := "C:\\Users\\ASUS\\GolandProjects\\og-describer-github\\steampipe\\table_index_map.go" - //v := "../../../../steampipe/table_index_map.go" + v := "../../../../steampipe/table_index_map.go" indexMap = &v } diff --git a/provider/describer/workflow.go b/provider/describer/workflow.go index 0ca85796..2e60969a 100644 --- a/provider/describer/workflow.go +++ b/provider/describer/workflow.go @@ -22,6 +22,9 @@ func GetAllWorkflows(ctx context.Context, githubClient GitHubClient, organizatio } var values []models.Resource for _, repo := range repositories { + if repo == nil { + continue + } repoValues, err := GetRepositoryWorkflows(ctx, githubClient, stream, organizationName, repo.GetName()) if err != nil { return nil, err diff --git a/provider/resource_types.go b/provider/resource_types.go index 37816554..0b7db4d6 100644 --- a/provider/resource_types.go +++ b/provider/resource_types.go @@ -496,9 +496,9 @@ var ResourceTypes = map[string]model.ResourceType{ GetDescriber: nil, }, - "GithubUser": { + "Github/User": { IntegrationType: configs.IntegrationName, - ResourceName: "GithubUser", + ResourceName: "Github/User", Tags: map[string][]string{ "category": {"user"}, }, @@ -510,9 +510,9 @@ var ResourceTypes = map[string]model.ResourceType{ GetDescriber: nil, }, - "GithubWorkflow": { + "Github/Workflow": { IntegrationType: configs.IntegrationName, - ResourceName: "GithubWorkflow", + ResourceName: "Github/Workflow", Tags: map[string][]string{ "category": {"workflow"}, }, diff --git a/provider/resource_types/resource-types.json b/provider/resource_types/resource-types.json index 59a2233f..31687aea 100644 --- a/provider/resource_types/resource-types.json +++ b/provider/resource_types/resource-types.json @@ -420,7 +420,7 @@ "Model": "Tree" }, { - "ResourceName": "GithubUser", + "ResourceName": "Github/User", "Tags": { "category": [ "user" @@ -432,7 +432,7 @@ "Model": "User" }, { - "ResourceName": "GithubWorkflow", + "ResourceName": "Github/Workflow", "Tags": { "category": [ "workflow" diff --git a/steampipe/table_index_map.go b/steampipe/table_index_map.go index ddbb086e..92af57a1 100644 --- a/steampipe/table_index_map.go +++ b/steampipe/table_index_map.go @@ -40,8 +40,8 @@ var Map = map[string]string{ "Github/Traffic/View/Daily": "github_traffic_view_daily", "Github/Traffic/View/Weekly": "github_traffic_view_weekly", "Github/Tree": "github_tree", - "GithubUser": "github_user", - "GithubWorkflow": "github_workflow", + "Github/User": "github_user", + "Github/Workflow": "github_workflow", "Github/CodeOwner": "github_code_owner", "Github/Package/Container": "github_container_package", "Github/Package/Maven": "github_maven_package", @@ -87,8 +87,8 @@ var DescriptionMap = map[string]interface{}{ "Github/Traffic/View/Daily": opengovernance.TrafficViewDaily{}, "Github/Traffic/View/Weekly": opengovernance.TrafficViewWeekly{}, "Github/Tree": opengovernance.Tree{}, - "GithubUser": opengovernance.User{}, - "GithubWorkflow": opengovernance.Workflow{}, + "Github/User": opengovernance.User{}, + "Github/Workflow": opengovernance.Workflow{}, "Github/CodeOwner": opengovernance.CodeOwner{}, "Github/Package/Container": opengovernance.Package{}, "Github/Package/Maven": opengovernance.Package{}, @@ -134,8 +134,8 @@ var ReverseMap = map[string]string{ "github_traffic_view_daily": "Github/Traffic/View/Daily", "github_traffic_view_weekly": "Github/Traffic/View/Weekly", "github_tree": "Github/Tree", - "github_user": "GithubUser", - "github_workflow": "GithubWorkflow", + "github_user": "Github/User", + "github_workflow": "Github/Workflow", "github_code_owner": "Github/CodeOwner", "github_container_package": "Github/Package/Container", "github_maven_package": "Github/Package/Maven",