Open Pull Requests metric not populating from GitHub
Asked by Patrick Smyrl:

Evaluating Compass for use generating DORA and other metrics. I have created a sandbox repo in GitHub and linked a component in Compass. The GitHub app is installed and if I understand correctly, metrics around pull requests should be populating automatically.

Deployments to production and staging are showing up in the activity feed and the deployment frequency metric is populating, but Open Pull Requests is not populating.

I know the webhook is working as I am getting deploy and workflow events in compass. I have the webhook triggering on deployment status, pushes, and workflow runs per the documentation. When I add Pull Requests, the delivery gets a 400 response.

Any direction would be greatly appreciated, thanks.


Answers:
author: Enrique Serrano Valle
body: Hi, [@Patrick Smyrl](/t5/user/viewprofilepage/user-id/5504505) !

Currently the Compass GraphQL and the Rest APIs don't allow to directly push PR events - the documentation should be updated shortly to reflect this. Is this when you were receiving 400s?

Otherwise, installing the GitHub app in Compass [following these steps](https://developer.atlassian.com/cloud/compass/integrations/integrate-Compass-with-GitHub/), and adding a repository link to your Compass component should be updating PR metrics. PR events don't currently show in the activity feed but you would know that the setup has worked because you'd see the data connection next to the repository link added to your sidebar, the "open pull requests" metric populating and a link to the source repository just at the bottom of that metric.

![Screenshot 2024-05-24 at 3.09.52?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/325892i876C3BEE09AFB826/image-size/large?v=v2&px=999 "Screenshot 2024-05-24 at 3.09.52?PM.png")![Screenshot 2024-05-24 at 3.10.03?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/325891iBA1FFEB0BA811924/image-size/large?v=v2&px=999 "Screenshot 2024-05-24 at 3.10.03?PM.png")

Let me know whether that worked! If for any reason that still didn't solve it, please let us know - providing the site that is used for these tests could also help us narrow down other factors.

comments: author: Patrick Smyrl
body: I am getting the deployment frequency, so I know there is connectivity between the repo and Compass, but the Open PR's still are not populating. Any thoughts?


author: Enrique Serrano Valle
body: You can verify that you're using the latest version of the Compass GitHub app in your Compass instance as \`<https://yoursite/compass/marketplace/discover/app/compass.github>\` and update it if necessary.

Otherwise it may be related to something specific to your configuration. If the issue persists, either sharing your site name here, or opening a support ticket with Atlassian and providing more installation information there may help triage this situation.


author: xhammer
body: I have a similar issue which is that I can see an open pull request on the components and the components are assigned to my teams. But in my team on the pull requests tab I'm showing 0 pull requests.

comments: author: Enrique Serrano Valle
body: Hi, [@xhammer](/t5/user/viewprofilepage/user-id/5478352) ! The Open PR metric count that you see in the component is populated based on the connection to the repository associated with that component (the repository link that you have added to the right sidebar) so that means that the data connection is successful.

The pull requests tab under Teams would aggregate PR information at the Team level. The first thing I'd confirm is whether the Team assigned to the Component where you're seeing the PR count (in the top-right sidebar) is exactly the same Team that you're checking the pull requests information for, in the Teams \> (Your team) \> Pull requests section.