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

getPullRequestEditedDiffRanges: use GitHub API #2679

Merged
merged 8 commits into from
Jan 14, 2025
Merged

Conversation

cklin
Copy link
Contributor

@cklin cklin commented Jan 9, 2025

This PR changes getPullRequestEditedDiffRanges so that it no longer obtains the PR diff through Git. Instead, it now obtains the PR diff through the GitHub Compare two commits API.

src/analyze.ts Fixed Show fixed Hide fixed
@cklin cklin force-pushed the cklin/get-diff-from-api branch from 59dd206 to 8fcc2ef Compare January 9, 2025 22:39
@cklin cklin marked this pull request as ready for review January 9, 2025 22:54
@cklin cklin requested a review from a team as a code owner January 9, 2025 22:54
@cklin cklin requested a review from henrymercer January 9, 2025 22:54
@cklin cklin force-pushed the cklin/get-diff-from-api branch 5 times, most recently from 2f17622 to 2f35487 Compare January 10, 2025 21:59
henrymercer
henrymercer previously approved these changes Jan 13, 2025
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, a bunch of comments, but nothing major.

src/analyze.ts Outdated Show resolved Hide resolved
src/analyze.ts Show resolved Hide resolved
src/analyze.ts Show resolved Hide resolved
src/analyze.ts Outdated Show resolved Hide resolved
src/analyze.ts Outdated Show resolved Hide resolved
src/analyze.ts Outdated Show resolved Hide resolved
@cklin cklin force-pushed the cklin/get-diff-from-api branch from 82ea58e to ae19466 Compare January 13, 2025 22:29
@cklin
Copy link
Contributor Author

cklin commented Jan 13, 2025

@henrymercer I have addressed all comments; PTAL.

I want to thank you especially for suggesting that I add tests, because one of those tests caught a bug (incorrect path separator on Windows). I have fixed the bug in the latest force push.

@cklin cklin requested a review from henrymercer January 13, 2025 22:47
Comment on lines +768 to +770
export const exportedForTesting = {
getDiffRanges,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this pattern, we should use it more in the rest of the Action :)

@github github deleted a comment from BLOCkCHAINMASTERINC Jan 14, 2025
@cklin cklin merged commit 1efc6bb into main Jan 14, 2025
269 checks passed
@cklin cklin deleted the cklin/get-diff-from-api branch January 14, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants