Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix `-pr` flag to process either a single PR or a specified list of PRs #51
Comments
mbrukman
added a commit
to mbrukman/code-review-bot
that referenced
this issue
Dec 11, 2019
Previously, we were creating a new variable `prNumbers` in each loop iteration, which was shadowing the variable outside of the loop, and hence we were always passing in an empty list of PR numbers to the processing function, which then defaulted to querying all open PRs in the given repo. Also fixed other minor issues: typo in the API method (which was generating mocks of the same name, but which didn't match the actual struct method, and fixed the type of pull request numbers (`int`, not `uint64`). Made the specific list of PR processing match the whole-repo processing by querying for complete `github.PullRequest` records via the API. Added tests to validate both processing options: specific list of PR numbers as well as querying the repo for the full list of open PRs. Fixes google#51.
mbrukman
added a commit
to mbrukman/code-review-bot
that referenced
this issue
Dec 11, 2019
Previously, we were creating a new variable `prNumbers` in each loop iteration, which was shadowing the variable outside of the loop, and hence we were always passing in an empty list of PR numbers to the processing function, which then defaulted to querying all open PRs in the given repo. Also fixed other minor issues: typo in the API method (which was generating mocks of the same name, but which didn't match the actual struct method, and fixed the type of pull request numbers (`int`, not `uint64`). Made the specific list of PR processing match the whole-repo processing by querying for complete `github.PullRequest` records via the API. Added tests to validate both processing options: specific list of PR numbers as well as querying the repo for the full list of open PRs. Fixes google#51.
mbrukman
added a commit
that referenced
this issue
Dec 11, 2019
Previously, we were creating a new variable `prNumbers` in each loop iteration, which was shadowing the variable outside of the loop, and hence we were always passing in an empty list of PR numbers to the processing function, which then defaulted to querying all open PRs in the given repo. Also fixed other minor issues: typo in the API method (which was generating mocks of the same name, but which didn't match the actual struct method, and fixed the type of pull request numbers (`int`, not `uint64`). Made the specific list of PR processing match the whole-repo processing by querying for complete `github.PullRequest` records via the API. Added tests to validate both processing options: specific list of PR numbers as well as querying the repo for the full list of open PRs. Fixes #51.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, the
-prflag doesn't seem to be parsed correctly, leading tocrbotprocessing all open PRs in the repo anyway. This should be a simple fix.