Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reviewstack: fix github stacked diff display #684

Closed
wants to merge 1 commit into from

Conversation

ahornby
Copy link
Contributor

@ahornby ahornby commented Jul 23, 2023

github diffs were showing the full set of commits in the stack rather than just the commits for the given PR version

gitHubPullRequestComparableVersions was returning null for base commit, which meant we always fell back on the } else if (afterBaseCommitID != null) { branch of gitHubPullRequestVersionDiff. That fallback used to work fine, but now its giving us the base of the full stack rather than the base of the PR. I don't know how it worked before (perhaps github api behaviour changed?), but there you go!

Fix is to use the version.baseParent in gitHubPullRequestComparableVersions, which has the right value in it.

Test Plan:

yarn test --watchAll=false

Local build and run:

Before, https://reviewstack.dev/facebookincubator/fizz/pull/96 shows changes for full stack:
image

After, http://localhost:3000/facebookincubator/fizz/pull/96 shows only relevant changes for PR:
image

github diffs were showing the full set of commits in the stack rather than just the commits for the given PR version

gitHubPullRequestComparableVersions was returning null for base commit,  which meant we always fell back on the } else if (afterBaseCommitID != null) { branch of gitHubPullRequestVersionDiff.  That fallback used to work fine, but now its giving us the base of the full stack rather than the base of the PR. I don't know how it worked before (perhaps github api behaviour changed?), but there you go!

Fix is to use the version.baseParent in gitHubPullRequestComparableVersions, which has the right value in it.

Test Plan:

yarn test --watchAll=false

Local build and run, I'll add some pictures on the PR
@facebook-github-bot
Copy link
Contributor

@sggutier has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@sggutier merged this pull request in 1dde9e8.

@alex-statsig
Copy link
Contributor

Is there a timeline for reviewstack deployments? Curious when we can expect to see this fix, since it's causing reviews to be pretty hard atm

@sggutier
Copy link
Contributor

We don't really have one yet, but I just pushed a new deploy. That should include this change.

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.

4 participants