-
Notifications
You must be signed in to change notification settings - Fork 17
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(framework-core): support inline multiline comments suggestions on pull requests #105
Conversation
* fix(patch text to hunk bounds): support regex for patch texts * more comments and more tests
… the valid hunks (#86) * fix(framework-core): parse raw changes to ranges
* test: add failing stub and test for building the failure message * fix: implement message building * fix: use original line numbers in error message * docs: add docstring * docs: add note about empty input returning empty string
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 85.28% 91.89% +6.61%
==========================================
Files 14 25 +11
Lines 1257 2295 +1038
Branches 87 182 +95
==========================================
+ Hits 1072 2109 +1037
- Misses 184 185 +1
Partials 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we're missing some test coverage on the main comment
/reviewPullRequest
logic.
…est (#114) * feat(framework-core): main interface for create review on a pull request * docs: fix typo * nits and typos... * gts lint warning fix
* fix(framework-core): collapsing timeline and inline comments into single review * test: fixed imports * added case when there are out of scope suggestions and no valid suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really close!
repo: remote.repo, | ||
pull_number: pullNumber, | ||
commit_id: headSha, | ||
event: 'COMMENT', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature request: pipe an option to make this 'REQUEST_CHANGES' or 'COMMENT'. This way someone could configure it to be a blocking review.
* feat(framework-core): return review number and variable renaming * lint
Wow very exciting! I don't have permissions to merge so that is up to you @chingor13 or @bcoe . Thanks for your help all along this pr. 😄 |
Framework-core logic for creating a multi-line inline comments suggesting code to a pull request given the pull request number, and the old and new contents of files that belong to the pull request.
Specifically given the input of the PR number, and a subset of the PRs files old and new file contents:
Generate the diff range between the old and new contents for each file provided by the user. This is each potential file's potential multiline comments domain. And then from the potential suggestions, create in-scope suggestions by:
Filtering out-of-scope suggestions by:
a. Filter out the files who are not in the PR (creating in-scope files)
b. Filter out the non-filtered file's lines that are out of scope of the PR (creating in-scope files with in-scope lines), and
c. Filter out the files who were too large to load the diff since the file is too large to comment on (this is tentative to change)
Take the in-scope suggestion ranges for each file and get the corresponding text.
on the PR number, make the in-scope suggestions.
Comment on what could not be commented on and why.
The remaining result is a diff range for files and file lines that are in-scope of the pull request.
Framework-core
Towards #59