Skip to content

Commit a6b14f7

Browse files
committed
fix: update documentation for entity deletion threshold
1 parent 8cd2662 commit a6b14f7

File tree

3 files changed

+82
-51
lines changed

3 files changed

+82
-51
lines changed
Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,56 @@
22
sidebar_position: 2
33
---
44

5-
import RepositoryBlueprint from './\_github_exporter_example_repository_blueprint.mdx'
6-
import PRBlueprint from './\_github_exporter_example_pull_request_blueprint.mdx'
7-
import PortAppConfig from './\_github_exporter_example_port_app_config.mdx'
8-
import GitHubResources from '../\_github_exporter_supported_resources.mdx'
9-
10-
import UsersBlueprint from './example-repository-admins/\_github_exporter_example_users_blueprint.mdx'
11-
import GithubUsersBlueprint from './example-repository-admins/\_github_exporter_example_github_users_blueprint.mdx'
12-
import RepositoryAdminBlueprint from './example-repository-admins/\_github_export_example_repository_with_admins_relation_blueprint.mdx'
13-
import RepositoryAdminAppConfig from './example-repository-admins/\_github_exporter_example_admins_users_port_app_config.mdx'
14-
15-
import IssueBlueprint from './example-issue/\_git_exporter_example_issue_blueprint.mdx'
16-
import PortIssueAppConfig from './example-issue/\_github_exporter_example_issue_port_app_config.mdx'
17-
import RepoEnvironmentBlueprint from './example-deployments-environments/\_github_exporter_example_environment_blueprint.mdx'
18-
import DeploymentBlueprint from './example-deployments-environments/\_github_exporter_example_deployment_blueprint.mdx'
19-
import PortRepoDeploymentAndEnvironmentAppConfig from './example-deployments-environments/\_github_exporter_example_deployments_and_environments_port_app_config.mdx'
20-
21-
import TagBlueprint from './example-repository-release-tag/\_github_exporter_example_tag_blueprint.mdx'
22-
import ReleaseBlueprint from './example-repository-release-tag/\_github_exporter_example_release_blueprint.mdx'
23-
import RepositoryTagReleaseAppConfig from './example-repository-release-tag/\_github_exporter_example_release_tag_port_app_config.mdx'
24-
25-
import PackageBlueprint from './example-file-kind/\_example_package_blueprint.mdx'
26-
import PackageAppConfig from './example-file-kind/\_package_json_app_config.mdx'
27-
import FileBlueprint from './example-file-kind/\_example_file_blueprint.mdx'
28-
import RepoFileAppConfig from './example-file-kind/\_file_repo_app_config.mdx'
29-
30-
import TeamWithMembersBlueprint from './example-team-members/\_github_exporter_team_blueprint.mdx'
31-
import TeamMemberBlueprint from './example-team-members/\_github_exporter_team_member_blueprint.mdx'
32-
import TeamMemberConfig from './example-team-members/\_github_team_member_port_app_config.mdx'
33-
34-
import TeamBlueprint from './example-repository-teams/\_github_export_example_team_blueprint.mdx'
35-
import RepositoryTeamBlueprint from './example-repository-teams/\_github_export_example_repository_with_teams_relation_blueprint.mdx'
36-
import PortRepositoryTeamMappingAppConfig from './example-repository-teams/\_github_exporter_example_repository_with_teams_port_app_config.mdx'
37-
38-
import CollaboratorBlueprint from './example-repository-collaborators/\_github_exporter_example_collaborator_blueprint.mdx'
39-
import PortRepositoryCollaboratorAppConfig from './example-repository-collaborators/\_github_exporter_example_repository_collaborator_port_app_config.mdx'
40-
41-
import PortMonoRepoAppConfig from './example-monorepo/\_github_exporter_example_monorepo_port_app_config.mdx'
42-
import WorkflowBlueprint from './example-workflow-workflowrun/\_git_exporter_example_workflow_blueprint.mdx'
43-
import WorkflowRunBlueprint from './example-workflow-workflowrun/\_git_exporter_example_workflow_run_blueprint.mdx'
44-
import PortWfWfrAppConfig from './example-workflow-workflowrun/\_github_exporter_example_wf_wfr_port_app_config.mdx'
45-
46-
import BranchBlueprint from './example-branch/\_git_exporter_example_branch_blueprint.mdx'
47-
import PortBrAppConfig from './example-branch/\_github_exporter_example_branch_port_app_config.mdx'
48-
49-
import DependabotAlertBlueprint from './example-repository-alerts/\_github_exporter_example_dependabot_alert_blueprint.mdx'
50-
import CodeScanAlertBlueprint from './example-repository-alerts/\_github_exporter_example_codeScan_alert_blueprint.mdx'
51-
import PortRepositoryDependabotAlertMappingAppConfig from './example-repository-alerts/\_github_exporter_example_repo_dependabot_port_app_config.mdx'
52-
53-
import OrganizationBlueprint from './example-organization/\_github_exporter_example_organization_blueprint.mdx'
54-
import OrganizationAppConfig from './example-organization/\_github_exporter_example_organization_port_app_config.mdx'
5+
import RepositoryBlueprint from './examples/\_github_exporter_example_repository_blueprint.mdx'
6+
import PRBlueprint from './examples/\_github_exporter_example_pull_request_blueprint.mdx'
7+
import PortAppConfig from './examples/\_github_exporter_example_port_app_config.mdx'
8+
import GitHubResources from './\_github_exporter_supported_resources.mdx'
9+
10+
import UsersBlueprint from './examples/example-repository-admins/\_github_exporter_example_users_blueprint.mdx'
11+
import GithubUsersBlueprint from './examples/example-repository-admins/\_github_exporter_example_github_users_blueprint.mdx'
12+
import RepositoryAdminBlueprint from './examples/example-repository-admins/\_github_export_example_repository_with_admins_relation_blueprint.mdx'
13+
import RepositoryAdminAppConfig from './examples/example-repository-admins/\_github_exporter_example_admins_users_port_app_config.mdx'
14+
15+
import IssueBlueprint from './examples/example-issue/\_git_exporter_example_issue_blueprint.mdx'
16+
import PortIssueAppConfig from './examples/example-issue/\_github_exporter_example_issue_port_app_config.mdx'
17+
import RepoEnvironmentBlueprint from './examples/example-deployments-environments/\_github_exporter_example_environment_blueprint.mdx'
18+
import DeploymentBlueprint from './examples/example-deployments-environments/\_github_exporter_example_deployment_blueprint.mdx'
19+
import PortRepoDeploymentAndEnvironmentAppConfig from './examples/example-deployments-environments/\_github_exporter_example_deployments_and_environments_port_app_config.mdx'
20+
21+
import TagBlueprint from './examples/example-repository-release-tag/\_github_exporter_example_tag_blueprint.mdx'
22+
import ReleaseBlueprint from './examples/example-repository-release-tag/\_github_exporter_example_release_blueprint.mdx'
23+
import RepositoryTagReleaseAppConfig from './examples/example-repository-release-tag/\_github_exporter_example_release_tag_port_app_config.mdx'
24+
25+
import PackageBlueprint from './examples/example-file-kind/\_example_package_blueprint.mdx'
26+
import PackageAppConfig from './examples/example-file-kind/\_package_json_app_config.mdx'
27+
import FileBlueprint from './examples/example-file-kind/\_example_file_blueprint.mdx'
28+
import RepoFileAppConfig from './examples/example-file-kind/\_file_repo_app_config.mdx'
29+
30+
import TeamWithMembersBlueprint from './examples/example-team-members/\_github_exporter_team_blueprint.mdx'
31+
import TeamMemberBlueprint from './examples/example-team-members/\_github_exporter_team_member_blueprint.mdx'
32+
import TeamMemberConfig from './examples/example-team-members/\_github_team_member_port_app_config.mdx'
33+
34+
import TeamBlueprint from './examples/example-repository-teams/\_github_export_example_team_blueprint.mdx'
35+
import RepositoryTeamBlueprint from './examples/example-repository-teams/\_github_export_example_repository_with_teams_relation_blueprint.mdx'
36+
import PortRepositoryTeamMappingAppConfig from './examples/example-repository-teams/\_github_exporter_example_repository_with_teams_port_app_config.mdx'
37+
38+
import CollaboratorBlueprint from './examples/example-repository-collaborators/\_github_exporter_example_collaborator_blueprint.mdx'
39+
import PortRepositoryCollaboratorAppConfig from './examples/example-repository-collaborators/\_github_exporter_example_repository_collaborator_port_app_config.mdx'
40+
41+
import PortMonoRepoAppConfig from './examples/example-monorepo/\_github_exporter_example_monorepo_port_app_config.mdx'
42+
import WorkflowBlueprint from './examples/example-workflow-workflowrun/\_git_exporter_example_workflow_blueprint.mdx'
43+
import WorkflowRunBlueprint from './examples/example-workflow-workflowrun/\_git_exporter_example_workflow_run_blueprint.mdx'
44+
import PortWfWfrAppConfig from './examples/example-workflow-workflowrun/\_github_exporter_example_wf_wfr_port_app_config.mdx'
45+
46+
import BranchBlueprint from './examples/example-branch/\_git_exporter_example_branch_blueprint.mdx'
47+
import PortBrAppConfig from './examples/example-branch/\_github_exporter_example_branch_port_app_config.mdx'
48+
49+
import DependabotAlertBlueprint from './examples/example-repository-alerts/\_github_exporter_example_dependabot_alert_blueprint.mdx'
50+
import CodeScanAlertBlueprint from './examples/example-repository-alerts/\_github_exporter_example_codeScan_alert_blueprint.mdx'
51+
import PortRepositoryDependabotAlertMappingAppConfig from './examples/example-repository-alerts/\_github_exporter_example_repo_dependabot_port_app_config.mdx'
52+
53+
import OrganizationBlueprint from './examples/example-organization/\_github_exporter_example_organization_blueprint.mdx'
54+
import OrganizationAppConfig from './examples/example-organization/\_github_exporter_example_organization_port_app_config.mdx'
5555

5656

5757
# Resource mapping examples

docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/github-ocean.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ organizations:
4242
:::caution Authentication and configuration requirements:
4343
- **With classic PAT**:
4444
- Specify organizations in port mapping: `organizations: ["org1", "org2", "org3"]`
45+
- If `organizations` are not specified, the integration will sync all organizations the classic PAT is scoped to.
4546
- **With GitHub App or Fine-grained PAT**: Specify exactly one organization by setting the `githubOrganization` in the environment variables: `githubOrganization: "my-org"`
4647

4748
**Precedence:** If `githubOrganization` is set in the environment variables or config and `organizations` are also listed in port mapping, the integration prioritizes single‑organization behavior and syncs only the `githubOrganization`.
4849

4950
**Performance consideration:** Syncing multiple organizations will increase the number of API calls to GitHub and may slow down the integration. The more organizations you sync, the longer the resync time and the higher the API rate limit consumption. Consider syncing only the organizations you need.
51+
52+
**Default mapping behavior:** First‑time installs may sync more than intended, since organizations aren’t scoped yet. Refer to [installation guide](./installation) on how to ensure a clean catalogue after you scope out required organization.
5053
:::
5154

5255

docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/installation/installation.mdx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,39 @@ Starting from **version 3.0.0-beta**, the GitHub integration supports syncing da
3232

3333
:::info Multi-organization configuration
3434
- GitHub App and fine-grained PAT: use `githubOrganization` (single organization).
35-
- Classic PAT: to sync multiple organizations, list them in your port mapping under `organizations`.
35+
- Classic PAT:
36+
- To sync multiple organizations, list them in your port mapping under `organizations`.
37+
- If `organizations` are not specified, the integration will sync all organizations the classic PAT is scoped to.
3638
- Precedence: if `githubOrganization` is set in the environment variables or config and `organizations` are listed in port mapping, the integration syncs only the `githubOrganization` (single‑org behavior).
3739
- Performance: syncing multiple organizations increases API calls and may slow down the integration.
3840
:::
3941

42+
#### Cleanup after restricting organizations
43+
44+
If you initially synced multiple organizations (e.g., on a first‑time install before your mapping was ready) and later restrict organizations in your mapping, set `entityDeletionThreshold: 1` temporarily and resync to ensure previously ingested, now‑unwanted entities are deleted. Revert the threshold afterwards (default ≈ 0.9) or remove completely.
45+
46+
<details>
47+
<summary><b>Entity deletion threshold (click to expand)</b></summary>
48+
49+
```yaml showLineNumbers
50+
51+
entityDeletionThreshold: 1
52+
resources:
53+
- kind: organization
54+
selector:
55+
query: 'true'
56+
port:
57+
entity:
58+
mappings:
59+
identifier: .login
60+
title: .login
61+
blueprint: '''githubOrganization'''
62+
properties:
63+
login: .login
64+
id: .id
65+
```
66+
</details>
67+
4068
### Create access token
4169
4270
To allow Port to fetch data from your GitHub Organization(s), you need to create an access token. Port supports two types of tokens for authentication: personal access tokens and GitHub app installation tokens.

0 commit comments

Comments
 (0)