Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down