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..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" + 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 d662c9bc2f..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,6 +57,19 @@ 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`. 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 capped at 300 + since: 60 # Fetch closed PRs within 60 days capped at 90 days +``` + + + ## 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`: