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

feat: download gh repo contents through commit SHA #920

Merged
merged 7 commits into from
May 31, 2023

Conversation

shay2025
Copy link
Contributor

@shay2025 shay2025 commented May 31, 2023

Description

Summary generated by Reviewpad on 31 May 23 13:03 UTC

This pull request adds a new DownloadMethod enum to the GithubClient struct, along with a DownloadContentsOptions struct for more flexibility in downloading files with either the branch name or SHA. It also updates several functions to use this new functionality, including loadExtension, GetSymbolsFromPatch, GetSymbolsFromFileInBranch, ReviewpadFileChanged, and DownloadReviewpadFileFromGitHub.

🤖 Generated by Copilot at be76732

This pull request improves the functionality and readability of the code that downloads files from GitHub for reviewpad. It adds a new method to GithubClient to download files by commit SHA, renames another method to specify its parameter, and updates the usages of these methods in various files. It also enhances the detection of changes in reviewpad configuration files across pull requests.

Code review and merge strategy

Ask: this pull request requires a code review before the merge

How

🤖 Generated by Copilot at be76732

  • Rename DownloadContents method to DownloadContentsFromBranchName in GithubClient struct to clarify parameter (link, link, link, link, link)
  • Add DownloadContentsFromCommitSHA method to GithubClient struct to download file contents from a specific commit (link, link)
  • Rename DownloadReviewpadFileFromGitHub function to DownloadReviewpadFileFromGitHubThroughBranchName in utils/file.go to clarify parameter (link)
  • Add DownloadReviewpadFileFromGitHubThroughCommitSHA function in utils/file.go to download reviewpad configuration file from a specific commit (link)

@reviewpad reviewpad bot added ask Pull request requires a code review before merge medium medium pull request labels May 31, 2023
@reviewpad reviewpad bot requested a review from marcelosousa May 31, 2023 09:01
@shay2025
Copy link
Contributor Author

@reviewpad reviewpad bot added the waiting-approval Pull request is waiting for approval label May 31, 2023
@shay2025
Copy link
Contributor Author

@reviewpad reviewpad bot added large large pull request and removed medium medium pull request labels May 31, 2023
@reviewpad
Copy link

reviewpad bot commented May 31, 2023

Pull request is not up to date with the base branch. Reviewpad will rebase it. After the rebase, please trigger Reviewpad by running the command /reviewpad run in a comment.

@reviewpad reviewpad bot force-pushed the feat/download-repo-contents-through-sha branch from 4b18140 to 0aee23b Compare May 31, 2023 11:24
@reviewpad reviewpad bot added small small pull request and removed large large pull request labels May 31, 2023
codehost/github/repositories.go Outdated Show resolved Hide resolved
@reviewpad reviewpad bot added the requires-author-attention Pull request requires the author to take action label May 31, 2023
@reviewpad reviewpad bot added medium medium pull request and removed small small pull request labels May 31, 2023
@shay2025 shay2025 requested a review from marcelosousa May 31, 2023 12:08
@reviewpad
Copy link

reviewpad bot commented May 31, 2023

Pull request is not up to date with the base branch. Reviewpad will rebase it. After the rebase, please trigger Reviewpad by running the command /reviewpad run in a comment.

@reviewpad reviewpad bot force-pushed the feat/download-repo-contents-through-sha branch from 6e23e80 to 1826bd2 Compare May 31, 2023 12:08
codehost/github/repositories.go Outdated Show resolved Hide resolved
@shay2025 shay2025 requested a review from marcelosousa May 31, 2023 13:03
@reviewpad reviewpad bot removed requires-author-attention Pull request requires the author to take action waiting-approval Pull request is waiting for approval labels May 31, 2023
@reviewpad
Copy link

reviewpad bot commented May 31, 2023

Pull request is not up to date with the base branch. Reviewpad will rebase it. After the rebase, please trigger Reviewpad by running the command /reviewpad run in a comment.

@reviewpad reviewpad bot force-pushed the feat/download-repo-contents-through-sha branch from 49ea4ca to a335114 Compare May 31, 2023 13:06
@shay2025
Copy link
Contributor Author

/reviewpad run

Copy link

@reviewpad reviewpad bot left a comment

Choose a reason for hiding this comment

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

Pull request is ready to be merged. Reviewpad will merge it for you.

@reviewpad reviewpad bot merged commit 2100d93 into main May 31, 2023
@reviewpad reviewpad bot deleted the feat/download-repo-contents-through-sha branch May 31, 2023 13:21
ferreiratiago added a commit that referenced this pull request May 31, 2023
reviewpad bot pushed a commit that referenced this pull request May 31, 2023
@shay2025 shay2025 restored the feat/download-repo-contents-through-sha branch May 31, 2023 16:12
@ferreiratiago ferreiratiago deleted the feat/download-repo-contents-through-sha branch July 10, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ask Pull request requires a code review before merge medium medium pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants