diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/_github_exporter_supported_resources.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/_github_exporter_supported_resources.mdx index 15537fdf85..34dbeead62 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/_github_exporter_supported_resources.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/_github_exporter_supported_resources.mdx @@ -1,6 +1,10 @@ - [`repository`](https://docs.github.com/en/rest/repos/repos#get-a-repository) - [`pull-request`](https://docs.github.com/en/rest/pulls/pulls#get-a-pull-request) - [`file`](/build-your-software-catalog/sync-data-to-catalog/git/github/#ingest-files-from-your-repositories) +- [`issue`](https://docs.github.com/en/rest/issues/issues#get-an-issue) +- [`folder`](https://docs.github.com/en/rest/git/trees#get-a-tree) +- [`user`](https://docs.github.com/en/rest/users/users#get-a-user) +- [`team`](https://docs.github.com/en/rest/teams/teams#get-a-team-by-name) - [`workflow`](https://docs.github.com/en/rest/actions/workflows#get-a-workflow) - [`workflow-run`](https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run) - [`dependabot-alert`](https://docs.github.com/en/rest/dependabot/alerts#list-dependabot-alerts-for-a-repository) diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/_github_exporter_example_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/_github_exporter_example_port_app_config.mdx index 79b4a058d7..a45dd95779 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/_github_exporter_example_port_app_config.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/_github_exporter_example_port_app_config.mdx @@ -1,6 +1,6 @@
- Port port-app-config.yml (click to expand) +Port port-app-config.yml (click to expand) ```yaml showLineNumbers resources: diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-deployments-environments/_github_exporter_example_deployment_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-deployments-environments/_github_exporter_example_deployment_blueprint.mdx index cf3e477199..f7ceefebcb 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-deployments-environments/_github_exporter_example_deployment_blueprint.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-deployments-environments/_github_exporter_example_deployment_blueprint.mdx @@ -1,5 +1,5 @@
-Deployment blueprint (click to expand) +Deployment blueprint (click to expand) ```json showLineNumbers { diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_file_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_file_blueprint.mdx index 6b7016ef7b..7322a9c412 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_file_blueprint.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_file_blueprint.mdx @@ -1,5 +1,5 @@
- File Blueprint + File Blueprint (click to expand) ```yaml showLineNumbers { diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_package_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_package_blueprint.mdx index ef024ed571..1fba9fda8e 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_package_blueprint.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_example_package_blueprint.mdx @@ -1,5 +1,5 @@
-Package blueprint +Package blueprint (click to expand) ```json showLineNumbers { diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_file_repo_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_file_repo_app_config.mdx index 43c11361f3..cc24964830 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_file_repo_app_config.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_file_repo_app_config.mdx @@ -1,5 +1,5 @@
- Port app config + Port app config (click to expand) ```yaml showLineNumbers deleteDependentEntities: true diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_package_json_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_package_json_app_config.mdx index 26658027e2..2784966dd5 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_package_json_app_config.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-file-kind/_package_json_app_config.mdx @@ -1,6 +1,6 @@
-Port config YAML +Port config YAML (click to expand) ```yaml showLineNumbers - kind: file diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_git_exporter_example_issue_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_git_exporter_example_issue_blueprint.mdx new file mode 100644 index 0000000000..e190d68b2f --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_git_exporter_example_issue_blueprint.mdx @@ -0,0 +1,76 @@ +
+Issue blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubIssue", + "title": "Issue", + "icon": "Github", + "schema": { + "properties": { + "creator": { + "title": "Creator", + "type": "string" + }, + "assignees": { + "title": "Assignees", + "type": "array" + }, + "labels": { + "title": "Labels", + "type": "array" + }, + "status": { + "title": "Status", + "type": "string", + "enum": ["open", "closed"], + "enumColors": { + "open": "green", + "closed": "purple" + } + }, + "createdAt": { + "title": "Created At", + "type": "string", + "format": "date-time" + }, + "closedAt": { + "title": "Closed At", + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "title": "Updated At", + "type": "string", + "format": "date-time" + }, + "description": { + "title": "Description", + "type": "string", + "format": "markdown" + }, + "issueNumber": { + "title": "Issue Number", + "type": "number" + }, + "link": { + "title": "Link", + "type": "string", + "format": "url" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "relations": { + "repository": { + "target": "githubRepository", + "required": true, + "many": false + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_github_exporter_example_issue_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_github_exporter_example_issue_port_app_config.mdx new file mode 100644 index 0000000000..8d83290f5f --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-issue/_github_exporter_example_issue_port_app_config.mdx @@ -0,0 +1,45 @@ +
+ +Port port-app-config.yml (click to expand) + +```yaml showLineNumbers +resources: + - kind: repository + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + port: + entity: + mappings: + identifier: ".name" # The Entity identifier will be the repository name. + title: ".name" + blueprint: '"githubRepository"' + properties: + readme: file://README.md + url: .html_url + defaultBranch: .default_branch + - kind: issue + selector: + query: ".pull_request == null" # JQ boolean query. If evaluated to false - skip syncing the object. + state: "closed" + port: + entity: + mappings: + identifier: ".__repository + (.id|tostring)" + title: ".title" + blueprint: '"githubIssue"' + properties: + creator: ".user.login" + assignees: "[.assignees[].login]" + labels: "[.labels[].name]" + status: ".state" + createdAt: ".created_at" + closedAt: ".closed_at" + updatedAt: ".updated_at" + description: ".body" + issueNumber: ".number" + link: ".html_url" + relations: + repository: ".__repository" +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-monorepo/_github_exporter_example_monorepo_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-monorepo/_github_exporter_example_monorepo_port_app_config.mdx new file mode 100644 index 0000000000..d86acc7e8f --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-monorepo/_github_exporter_example_monorepo_port_app_config.mdx @@ -0,0 +1,27 @@ +
+ +Port port-app-config.yml (click to expand) + +```yaml showLineNumbers +resources: + - kind: folder + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + folders: # Specify the repositories and folders to include under this relative path. + - path: apps/* # Relative path to the folders within the repositories. + repos: # List of repositories to include folders from. + - name: backend-service + branch: main + - name: frontend-service # if you don't specify a branch, we'll use the repository's default branch + port: + entity: + mappings: + identifier: .folder.path | split("/") | last + title: .folder.path | split("/") | last + blueprint: '"githubRepository"' + properties: + url: .__repository.html_url + "/tree/" + .__repository.default_branch + "/" + .folder.path + readme: file://README.md +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_export_example_repository_with_admins_relation_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_export_example_repository_with_admins_relation_blueprint.mdx new file mode 100644 index 0000000000..e29f09f82d --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_export_example_repository_with_admins_relation_blueprint.mdx @@ -0,0 +1,38 @@ +
+Repository blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubRepository", + "title": "Repository", + "icon": "Microservice", + "schema": { + "properties": { + "readme": { + "title": "README", + "type": "string", + "format": "markdown" + }, + "url": { + "title": "Repository URL", + "type": "string", + "format": "url" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": { + "admins": { + "title": "Admins", + "target": "githubUser", + "required": false, + "many": true + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_admins_users_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_admins_users_port_app_config.mdx new file mode 100644 index 0000000000..92ad06c3be --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_admins_users_port_app_config.mdx @@ -0,0 +1,48 @@ +
+ + Port port-app-config.yml (click to expand) + +```yaml showLineNumbers +createMissingRelatedEntities: true +resources: + - kind: repository + selector: + query: "true" + include: "collaborators" + port: + entity: + mappings: + identifier: .name + title: .name + blueprint: '"githubRepository"' + properties: + readme: file://README.md + url: .html_url + defaultBranch: .default_branch + relations: + admins: "[.__collaborators[] | select(.is_admin == true) | .login]" + - kind: user + selector: + query: "true" + port: + entity: + mappings: + identifier: .login + title: if (.name != "" and .name) then .name else .login end + blueprint: '"githubUser"' + relations: + user: .email + - kind: user + selector: + query: "true" + port: + entity: + mappings: + identifier: .email + title: .email + blueprint: '"user"' + properties: + email: .email +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_github_users_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_github_users_blueprint.mdx new file mode 100644 index 0000000000..3efe9b1d0e --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_github_users_blueprint.mdx @@ -0,0 +1,32 @@ +
+Github Users blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubUser", + "title": "Github User", + "icon": "Microservice", + "schema": { + "properties": { + "email": { + "title": "Email", + "type": "string" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": { + "user": { + "title": "User", + "target": "user", + "required": false, + "many": false + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_users_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_users_blueprint.mdx new file mode 100644 index 0000000000..9cc92696c3 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_users_blueprint.mdx @@ -0,0 +1,25 @@ +
+Users blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "user", + "title": "user", + "icon": "Microservice", + "schema": { + "properties": { + "email":{ + "title":"Email", + "type": "string" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": {} +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_collaborator_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_collaborator_blueprint.mdx new file mode 100644 index 0000000000..8c954a9646 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_collaborator_blueprint.mdx @@ -0,0 +1,51 @@ +
+Collaborator blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubCollaborator", + "title": "Github Collaborator", + "icon": "Github", + "schema": { + "properties": { + "login": { + "type": "string", + "title": "Login" + }, + "url": { + "type": "string", + "title": "Url", + "format": "url" + }, + "type": { + "type": "string", + "title": "Type" + }, + "site_admin": { + "type": "boolean", + "title": "Site admin" + }, + "role": { + "type": "string", + "title": "Role" + } + }, + "required": [ + "login" + ] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": { + "repository": { + "title": "repository", + "target": "githubRepository", + "required": true, + "many": false + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_repository_collaborator_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_repository_collaborator_port_app_config.mdx new file mode 100644 index 0000000000..c93a368f72 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-collaborators/_github_exporter_example_repository_collaborator_port_app_config.mdx @@ -0,0 +1,41 @@ +
+ + Port port-app-config.yml (click to expand) + +```yaml showLineNumbers +createMissingRelatedEntities: true +resources: + - kind: repository + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + port: + entity: + mappings: + identifier: .name + title: .name + blueprint: '"githubRepository"' + properties: + readme: file://README.md + url: .html_url + defaultBranch: .default_branch + + - kind: collaborator + selector: + query: "true" + port: + entity: + mappings: + identifier: .__repository + "/" + .login + title: .login + blueprint: '"githubCollaborator"' + properties: + login: .login + url: .html_url + type: .type + site_admin: .site_admin + role: .role_name + relations: + repository: .__repository +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_repository_with_teams_relation_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_repository_with_teams_relation_blueprint.mdx new file mode 100644 index 0000000000..b5a2f87313 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_repository_with_teams_relation_blueprint.mdx @@ -0,0 +1,42 @@ +
+Repository blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubRepository", + "title": "Repository", + "icon": "Microservice", + "schema": { + "properties": { + "readme": { + "title": "README", + "type": "string", + "format": "markdown" + }, + "url": { + "title": "Repository URL", + "type": "string", + "format": "url" + }, + "defaultBranch": { + "title": "Default Branch", + "type": "string" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": { + "githubTeams": { + "title": "GitHub Teams", + "target": "githubTeam", + "required": false, + "many": true + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_team_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_team_blueprint.mdx new file mode 100644 index 0000000000..d938577bc7 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_export_example_team_blueprint.mdx @@ -0,0 +1,42 @@ +
+Team blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubTeam", + "title": "GitHub Team", + "icon": "Github", + "schema": { + "properties": { + "slug": { + "title": "Slug", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "link": { + "title": "Link", + "icon": "Link", + "type": "string", + "format": "url" + }, + "permission": { + "title": "Permission", + "type": "string" + }, + "notification_setting": { + "title": "Notification Setting", + "type": "string" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "relations": {} +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_exporter_example_repository_with_teams_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_exporter_example_repository_with_teams_port_app_config.mdx new file mode 100644 index 0000000000..75755fa2a1 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-teams/_github_exporter_example_repository_with_teams_port_app_config.mdx @@ -0,0 +1,43 @@ +
+ + Port port-app-config.yml (click to expand) + +```yaml showLineNumbers +createMissingRelatedEntities: true +resources: + - kind: team + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + members: false + port: + entity: + mappings: + identifier: ".id | tostring" + title: .name + blueprint: '"githubTeam"' + properties: + name: .name + slug: .slug + description: .description + link: .html_url + permission: .permission + notification_setting: .notification_setting + - kind: repository + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + include: "teams" # Boolean flag to indicate whether to include the repository teams. + port: + entity: + mappings: + identifier: .name + title: .name + blueprint: '"githubRepository"' + properties: + readme: file://README.md + url: .html_url + defaultBranch: .default_branch + relations: + githubTeams: "[.__teams[].id | tostring]" +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_blueprint.mdx new file mode 100644 index 0000000000..2f90b1cb9d --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_blueprint.mdx @@ -0,0 +1,53 @@ +
+ Team blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubTeam", + "title": "GitHub Team", + "icon": "Github", + "schema": { + "properties": { + "slug": { + "title": "Slug", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "link": { + "title": "Link", + "icon": "Link", + "type": "string", + "format": "url" + }, + "permission": { + "title": "Permission", + "type": "string" + }, + "notification_setting": { + "title": "Notification Setting", + "type": "string" + }, + "members": { + "title": "Members", + "type": "array" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": { + "team_member": { + "title": "teamMember", + "target": "githubTeamMember", + "required": false, + "many": true + } + } +} +``` +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_member_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_member_blueprint.mdx new file mode 100644 index 0000000000..06b188902c --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_exporter_team_member_blueprint.mdx @@ -0,0 +1,24 @@ +
+ Team Member blueprint (click to expand) + +```json showLineNumbers +{ + "identifier": "githubTeamMember", + "title": "Team Member", + "icon": "Github", + "schema": { + "properties": { + "name": { + "type": "string", + "title": "Name" + } + }, + "required": [] + }, + "mirrorProperties": {}, + "calculationProperties": {}, + "aggregationProperties": {}, + "relations": {} +} +``` +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_team_member_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_team_member_port_app_config.mdx new file mode 100644 index 0000000000..cfcdb8712b --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_team_member_port_app_config.mdx @@ -0,0 +1,37 @@ +
+ Port port-app-config.yaml (click to expand) + +```yaml showLineNumbers + - kind: team + selector: + query: 'true' + members: true + port: + entity: + mappings: + identifier: .id | tostring + title: .name + blueprint: '"githubTeam"' + properties: + slug: .slug + description: .description + link: .url + permission: .permission + notification_setting: .notificationSetting + relations: + team_member: '[.members.nodes[].login]' + - kind: team + selector: + query: 'true' + members: true + port: + itemsToParse: .members.nodes + entity: + mappings: + identifier: .login + title: .login + blueprint: '"githubTeamMember"' + properties: + name: .name +``` +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/examples.md b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/examples.md index 1b1574c73c..4367760996 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/examples.md +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/examples.md @@ -7,6 +7,13 @@ import PRBlueprint from './\_github_exporter_example_pull_request_blueprint.mdx' import PortAppConfig from './\_github_exporter_example_port_app_config.mdx' import GitHubResources from '../\_github_exporter_supported_resources.mdx' +import UsersBlueprint from './example-repository-admins/\_github_exporter_example_users_blueprint.mdx' +import GithubUsersBlueprint from './example-repository-admins/\_github_exporter_example_github_users_blueprint.mdx' +import RepositoryAdminBlueprint from './example-repository-admins/\_github_export_example_repository_with_admins_relation_blueprint.mdx' +import RepositoryAdminAppConfig from './example-repository-admins/\_github_exporter_example_admins_users_port_app_config.mdx' + +import IssueBlueprint from './example-issue/\_git_exporter_example_issue_blueprint.mdx' +import PortIssueAppConfig from './example-issue/\_github_exporter_example_issue_port_app_config.mdx' import RepoEnvironmentBlueprint from './example-deployments-environments/\_github_exporter_example_environment_blueprint.mdx' import DeploymentBlueprint from './example-deployments-environments/\_github_exporter_example_deployment_blueprint.mdx' import PortRepoDeploymentAndEnvironmentAppConfig from './example-deployments-environments/\_github_exporter_example_deployments_and_environments_port_app_config.mdx' @@ -20,6 +27,18 @@ import PackageAppConfig from './example-file-kind/\_package_json_app_config.mdx' import FileBlueprint from './example-file-kind/\_example_file_blueprint.mdx' import RepoFileAppConfig from './example-file-kind/\_file_repo_app_config.mdx' +import TeamWithMembersBlueprint from './example-team-members/\_github_exporter_team_blueprint.mdx' +import TeamMemberBlueprint from './example-team-members/\_github_exporter_team_member_blueprint.mdx' +import TeamMemberConfig from './example-team-members/\_github_team_member_port_app_config.mdx' + +import TeamBlueprint from './example-repository-teams/\_github_export_example_team_blueprint.mdx' +import RepositoryTeamBlueprint from './example-repository-teams/\_github_export_example_repository_with_teams_relation_blueprint.mdx' +import PortRepositoryTeamMappingAppConfig from './example-repository-teams/\_github_exporter_example_repository_with_teams_port_app_config.mdx' + +import CollaboratorBlueprint from './example-repository-collaborators/\_github_exporter_example_collaborator_blueprint.mdx' +import PortRepositoryCollaboratorAppConfig from './example-repository-collaborators/\_github_exporter_example_repository_collaborator_port_app_config.mdx' + +import PortMonoRepoAppConfig from './example-monorepo/\_github_exporter_example_monorepo_port_app_config.mdx' import WorkflowBlueprint from './example-workflow-workflowrun/\_git_exporter_example_workflow_blueprint.mdx' import WorkflowRunBlueprint from './example-workflow-workflowrun/\_git_exporter_example_workflow_run_blueprint.mdx' import PortWfWfrAppConfig from './example-workflow-workflowrun/\_github_exporter_example_wf_wfr_port_app_config.mdx' @@ -69,6 +88,25 @@ Additionally, you can configure your selector to limit the number of closed pull ``` +## Map repositories and issues + +The following example demonstrates how to ingest your GitHub repositories and their issues to Port, you may use the following Port blueprint definitions and `port-app-config.yml`: + + + + + + + + +:::tip learn more + +- Refer to the [setup](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md#setup) section to learn more about the `port-app-config.yml` setup process. +- We leverage [JQ JSON processor](https://stedolan.github.io/jq/manual/) to map and transform GitHub objects to Port Entities. +- Click [Here](https://docs.github.com/en/rest/repos/repos#get-a-repository) for the GitHub repository object structure. +- Click [Here](https://docs.github.com/en/rest/issues/issues#get-an-issue) for the GitHub issue object structure. + +::: ## Map repositories and branches @@ -91,7 +129,7 @@ The example will parse the `package.json` file in your repository and extract th For more information about ingesting files and file contents, click [here](/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/#ingest-files-from-your-repositories). -## Map Files and Repositories +## Map files and repositories The following example demonstrates mapping files to repository. @@ -99,6 +137,38 @@ The following example demonstrates mapping files to repository. +## Map repositories and monorepos + +The following example demonstrates how to ingest your GitHub repositories and their folders to Port. By following this example you can map your different services, packages and libraries from your monorepo into separate entities in Port. You may use the following Port blueprint definitions and `port-app-config.yml`: + + + + + + +To retrieve the root folders of your monorepo, use the following syntax in your `port-app-config.yml`: + +```yaml +- kind: folder + selector: + query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. + folders: # Specify the repositories and folders to include under this relative path. + - path: "*" # Relative path to the folders within the repositories. + repos: # List of repositories to include folders from. + - name: backend-service + - name: frontend-service +``` + +:::tip learn more + +- Refer to the [setup](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md#setup) section to learn more about the `port-app-config.yml` setup process. +- We leverage [JQ JSON processor](https://stedolan.github.io/jq/manual/) to map and transform GitHub objects to Port Entities. +- Click [Here](https://docs.github.com/en/rest/repos/repos#get-a-repository) for the GitHub repository object structure. +- Click [Here](https://docs.github.com/en/rest/git/trees#get-a-tree) for the GitHub folder object structure. + +::: + + ## Map repositories, workflows and workflow runs The following example demonstrates how to ingest your GitHub repositories, their workflows and workflow runs to Port, you may use the following Port blueprint definitions and `port-app-config.yml`: @@ -112,17 +182,69 @@ The following example demonstrates how to ingest your GitHub repositories, their :::tip learn more - -- Refer to the [setup](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md#setup) section to learn more about the `port-app-config.yml` setup process. -- We leverage [JQ JSON processor](https://stedolan.github.io/jq/manual/) to map and transform GitHub objects to Port Entities. -- Click [Here](https://docs.github.com/en/rest/repos/repos#get-a-repository) for the GitHub repository object structure. - Click [Here](https://docs.github.com/en/rest/actions/workflows#get-a-workflow) for the GitHub workflow object structure. - Click [Here](https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run) for the GitHub workflow run object structure. ::: +## Map repositories and teams + +The following example demonstrates how to ingest your GitHub repositories and their teams to Port. +You can use the following Port blueprint definitions and `port-app-config.yml`: + + + + + + + + +## Map teams and team members + +The following shows how we can map teams and team members using the "members" selector. + + + + + + +## Map repositories, repository admins and users + +The following example demonstrates how to ingest your GitHub repositories, their admins and related users to Port. +You can use the following Port blueprint definitions and `port-app-config.yml`: + + + + + + + + + +

Supported GitHub user types

+ +As Github has strict privacy policies, the GitHub API will only return emails in the following cases: + +1. The user has a public email address. +2. Your organization is working with a GitHub Enterprise Cloud plan, and the user has an SAML SSO identity configured inside the GitHub organization. + +In other cases, the GitHub API will return a `null` value for the user's email. + +:::tip User supported fields +For the `user` kind, only the following fields are supported: `.name`, `.login`, and `.email`. +Other fields from the [GitHub User API](https://docs.github.com/en/rest/users/users#get-a-user) are not available. +::: + +## Map repositories and collaborators + +The following example demonstrates how to ingest your GitHub repositories and their collaborators to Port. +You can use the following Port blueprint definitions and `port-app-config.yml`: + + + + -## Map repositories, Dependabot Alerts, and Code scan alerts +## Map repositories, dependabot alerts, and code scan alerts The following example shows how to ingest your GitHub repositories and their alerts (Dependabot and Code scan alerts) into Port. You can use the following Port blueprint definitions and `port-app-config.yml`: diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/github-app.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/github-app.mdx index 338680d33e..4e3d2f2323 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/github-app.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/github-app.mdx @@ -46,12 +46,15 @@ This page outlines the following steps: - Checks: Readonly (for syncing `Port.yml`). - Contents: Readonly (for reading port configuration files and repository files). - Metadata: Readonly. + - Administration: Readonly (for syncing collaborators) - Pull Request: Readonly - Code scanning alerts: Readonly - Dependabot alerts: Readonly - Deployments: Readonly - Environments: Readonly - **Organization Permissions:** + - Members: Readonly (for syncing members and teams). + - Administration: Readonly(for syncing external identities) - Webhooks: Read and Write (to allow the integration create webhook). Then select "Create GitHub App" diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/installation.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/installation.mdx index b7446ab097..ba2ee8e661 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/installation.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/installation.mdx @@ -44,16 +44,20 @@ To create a personal access token see Github's [managing your personal access to These are the necessary permissions if you're creating a fine-grained PAT. **Repository permissions:** - - **Actions**: Readonly - - **Content**: Readonly + - **Content**: Readonly (For reading files) - **Metadata**: Readonly + - **Administration:** Readonly (for syncing repository teams and collaborators) - **Pull Requests**: Readonly + - **Issues**: Readonly + - **Actions**: Readonly - **Code scanning alerts**: Readonly - **Dependabot alerts**: Readonly - **Deployments**: Readonly - **Environments**: Readonly **Organization permissions:** + - **Members**: Readonly(for syncing users and teams) + - **Administration**: Readonly(for syncing external identities) - **Webhooks**: Read and Write (for managing webhook) diff --git a/src/components/ocean-saas-specifics/live-events.jsx b/src/components/ocean-saas-specifics/live-events.jsx index e01ad2bf77..cfde343ece 100644 --- a/src/components/ocean-saas-specifics/live-events.jsx +++ b/src/components/ocean-saas-specifics/live-events.jsx @@ -201,6 +201,40 @@ export const liveEvents = { \n - privatized \ \n - archived \ \n - deleted \ + \n\n **issues:** \ + \n - assigned \ + \n - closed \ + \n - demilestoned \ + \n - edited \ + \n - labeled \ + \n - locked \ + \n - milestoned \ + \n - opened \ + \n - pinned \ + \n - reopened \ + \n - transferred \ + \n - typed \ + \n - unassigned \ + \n - unlabeled \ + \n - unlocked \ + \n - unpinned \ + \n - untyped \ + \n - deleted \ + \n\n **team:** \ + \n - created \ + \n - edited \ + \n - deleted \ + \n - added_to_repository \ + \n\n **membership:** \ + \n - added \ + \n - removed \ + \n\n **member:** \ + \n - added \ + \n - edited \ + \n - removed \ + \n\n **organization:** \ + \n - member_added \ + \n - member_removed \ \n\n **pull_request:** \ \n - opened \ \n - edited \