Skip to content

fix(status): page through app installations and report revalidation errors - #45

Merged
jimjag merged 2 commits into
salesforce:mainfrom
mwbrooks:mwbrooks-fix-installation-paging
Nov 16, 2026
Merged

jimjag merged 2 commits into
salesforce:mainfrom
mwbrooks:mwbrooks-fix-installation-paging

Conversation

@mwbrooks

Copy link
Copy Markdown
Contributor

This pull request fixes the CLA status page for orgs that are not in the first 30 installations of the GitHub App. For those orgs the page says "All external contributors have signed the CLA" on every pull request, even when the salesforce-cla check is failing. Signing the CLA doesn't update the pull request either.

Summary

  • integrationInstallations() made a single GET /app/installations request. GitHub returns 30 installations per page by default, so any org after the first page was never found and revalidation failed with "GitHub App not installed on ...". It now pages through every installation using the existing Link header paging. That also fixes the revalidation that runs after someone signs without a pull request URL, which loops over every installation.
  • revalidatePullRequest caught every error and returned empty results (added in 63b692b), which the status page renders as "signed". The status page now shows an error and logs it, and the existing NeedsAuth redirect and "Repo Not Found" cases work again. The sign flow keeps catching the error, because the signature is already saved at that point.

Testing

  • sbt compile Test/compile passes on Java 21.0.13 and Play 2.9.6.
  • sbt test not run, because GitHubSpec needs live GitHub App credentials.
  • Load /status/<org>/<repo>/pull/<n> for an org outside the first page of installations and confirm the check status and label update.

Notes

…rrors

The installations lookup made one request, so orgs outside the first 30
installations were never found. Revalidation then failed, and the status
page showed the error as every contributor having signed the CLA.
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @mwbrooks to sign the Salesforce Inc. Contributor License Agreement.

@mwbrooks
mwbrooks marked this pull request as ready for review November 15, 2026 22:18
@jimjag
jimjag merged commit 8417f4d into salesforce:main Nov 16, 2026
5 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-fix-installation-paging branch November 16, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants