Skip to content

Commit 0289a98

Browse files
authored
Merge pull request #2673 from port-labs/PORT-15969
Add Documentation for Ingesting Closed Pull Requests in Github Ocean Integration
2 parents a207a3a + 417a650 commit 0289a98

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resources:
2020
- kind: pull-request
2121
selector:
2222
query: "true" # JQ boolean query. If evaluated to false - skip syncing the object.
23-
state: "open"
23+
states: ["open"] # List of Pull Request states to include: use ["open"], ["closed"], or ["open","closed"].
2424
port:
2525
entity:
2626
mappings:

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ You can use the following Port blueprint definitions and `port-app-config.yml`:
5757

5858
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).
5959

60+
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.
61+
62+
```yaml
63+
- kind: pull-request
64+
selector:
65+
query: "true"
66+
states: ["closed"] # Specifically for closed PRs
67+
maxResults: 50 # Limit closed PRs to 50 capped at 300
68+
since: 60 # Fetch closed PRs within 60 days capped at 90 days
69+
```
70+
71+
72+
6073
## Map repositories and branches
6174
6275
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`:

0 commit comments

Comments
 (0)