From 869a0d02c60c17bb4d89b1ee7e1e0892be174c17 Mon Sep 17 00:00:00 2001 From: emekanwaoma Date: Wed, 13 Aug 2025 23:19:01 +0100 Subject: [PATCH 1/5] fix: add doc for ingesting closed PR --- .../_github_exporter_example_port_app_config.mdx | 2 +- .../git/github-ocean/examples/examples.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 4f318536ee..274db57a74 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 @@ -20,7 +20,7 @@ resources: - kind: pull-request selector: query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. - state: "open" + state: ["open"] # List of Pull Request states to include: use ["open"], ["closed"], or ["open","closed"]. port: entity: mappings: 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 d662c9bc2f..90f2b9827b 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 @@ -57,6 +57,17 @@ You can use the following Port blueprint definitions and `port-app-config.yml`: After creating the blueprints and committing the `port-app-config.yml` file to your `.github-private` repository (for global configuration), or to any specific repositories (for per-repo configuration), you will see new entities in Port matching your repositories alongside their README.md file contents and pull requests. (Remember that the `port-app-config.yml` file has to be in the **default branch** of the repository to take effect). +Additionally, you can configure your selector to limit the number of closed pull requests to ingest. By Default, we only fetch 100 Pull Requests. +```yaml +- kind: pullRequest + selector: + query: 'true' + states: ['closed'] + maxResults: 100 +``` + + + ## Map repositories and branches The following example demonstrates how to ingest your GitHub repositories and their branches to Port, you may use the following Port blueprint definitions and `port-app-config.yml`: From 71076c6adae7ac8043e679fe5e48d4473ca0492a Mon Sep 17 00:00:00 2001 From: emekanwaoma Date: Wed, 13 Aug 2025 23:26:23 +0100 Subject: [PATCH 2/5] fix: add doc for ingesting closed PR --- .../examples/_github_exporter_example_port_app_config.mdx | 2 +- .../sync-data-to-catalog/git/github-ocean/examples/examples.md | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) 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 274db57a74..79b4a058d7 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 @@ -20,7 +20,7 @@ resources: - kind: pull-request selector: query: "true" # JQ boolean query. If evaluated to false - skip syncing the object. - state: ["open"] # List of Pull Request states to include: use ["open"], ["closed"], or ["open","closed"]. + states: ["open"] # List of Pull Request states to include: use ["open"], ["closed"], or ["open","closed"]. port: entity: mappings: 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 90f2b9827b..525cc41b45 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 @@ -59,10 +59,7 @@ After creating the blueprints and committing the `port-app-config.yml` file to y Additionally, you can configure your selector to limit the number of closed pull requests to ingest. By Default, we only fetch 100 Pull Requests. ```yaml -- kind: pullRequest selector: - query: 'true' - states: ['closed'] maxResults: 100 ``` From f40c9decd22ee1813500361edad5cfcb68309d8b Mon Sep 17 00:00:00 2001 From: emekanwaoma Date: Wed, 13 Aug 2025 23:47:06 +0100 Subject: [PATCH 3/5] fix: add more context --- .../git/github-ocean/examples/examples.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 525cc41b45..62fb9f9d4a 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 @@ -57,10 +57,13 @@ You can use the following Port blueprint definitions and `port-app-config.yml`: After creating the blueprints and committing the `port-app-config.yml` file to your `.github-private` repository (for global configuration), or to any specific repositories (for per-repo configuration), you will see new entities in Port matching your repositories alongside their README.md file contents and pull requests. (Remember that the `port-app-config.yml` file has to be in the **default branch** of the repository to take effect). -Additionally, you can configure your selector to limit the number of closed pull requests to ingest. By Default, we only fetch 100 Pull Requests. +Additionally, you can configure your selector to limit the number of closed pull requests to ingest using maxResults. By Default, we only fetch 100 pull requests. ```yaml +- kind: pull-request selector: - maxResults: 100 + query: "true" + states: ["closed"] # Specifically for closed PRs + maxResults: 50 # Limit closed PRs to 50 ``` From b41351e8b865d6a200a7412c23f68caad5cc42ea Mon Sep 17 00:00:00 2001 From: emekanwaoma Date: Tue, 19 Aug 2025 12:04:16 +0100 Subject: [PATCH 4/5] fix: update docs to include since selector for closed prs ingestion --- .../git/github-ocean/examples/examples.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 62fb9f9d4a..c413888744 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 @@ -57,13 +57,15 @@ You can use the following Port blueprint definitions and `port-app-config.yml`: After creating the blueprints and committing the `port-app-config.yml` file to your `.github-private` repository (for global configuration), or to any specific repositories (for per-repo configuration), you will see new entities in Port matching your repositories alongside their README.md file contents and pull requests. (Remember that the `port-app-config.yml` file has to be in the **default branch** of the repository to take effect). -Additionally, you can configure your selector to limit the number of closed pull requests to ingest using maxResults. By Default, we only fetch 100 pull requests. +Additionally, you can configure your selector to limit the number of closed pull requests to ingest using a combination of `maxResults` and `since` selectors. By Default, we only fetch 100 cloosed pull requests within 60 days. + ```yaml - kind: pull-request selector: query: "true" states: ["closed"] # Specifically for closed PRs - maxResults: 50 # Limit closed PRs to 50 + maxResults: 50 # Limit closed PRs to 50 capped at 300 + since: 60 # Fetch closed PRs within 60 days capped at 90 days ``` From 26e410dfab63a1b88d253ea40b048ca8281631f9 Mon Sep 17 00:00:00 2001 From: emekanwaoma Date: Tue, 19 Aug 2025 12:06:27 +0100 Subject: [PATCH 5/5] fix: reword documentation --- .../sync-data-to-catalog/git/github-ocean/examples/examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c413888744..1b1574c73c 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 @@ -57,7 +57,7 @@ You can use the following Port blueprint definitions and `port-app-config.yml`: After creating the blueprints and committing the `port-app-config.yml` file to your `.github-private` repository (for global configuration), or to any specific repositories (for per-repo configuration), you will see new entities in Port matching your repositories alongside their README.md file contents and pull requests. (Remember that the `port-app-config.yml` file has to be in the **default branch** of the repository to take effect). -Additionally, you can configure your selector to limit the number of closed pull requests to ingest using a combination of `maxResults` and `since` selectors. By Default, we only fetch 100 cloosed pull requests within 60 days. +Additionally, you can configure your selector to limit the number of closed pull requests to ingest using a combination of `maxResults` and `since`. By Default, we only fetch 100 cloosed pull requests within 60 days. ```yaml - kind: pull-request