Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug where teams aren't added as reviewers when the author comme…
…nts and the author is on the reviewer team (#87) ## Summary: Previously, when Gerald would run, it wouldn't add a team to the reviewer list if any member of the team had already reviewed the PR. The problem is that PR authors can add comments to their PRs, and those are "review" objects. So, if an author makes a draft PR, adds some comments, clicks "Ready for review", _and_ the author is a member of a team that Gerald would add, Gerald wouldn't add that team. Very sneaky bug!! This fixes that. It still adds the team if the author commented (or any team member added a non-approving, non-rejecting review, such as a comment, or a pending review). Issue: https://khanacademy.atlassian.net/browse/FEI-5620 ## Test plan: Buggy case: 1. Make a draft PR (in a repo where a team is always added, and you're a member of that team) 2. Make a comment on your PR 3. Click "Ready for review" 4. See that you team IS NOT added Fixed cases: 1. Make a draft PR (in a repo where a team is always added, and you're a member of that team) 2. Make a comment on your PR 3. Click "Ready for review" 4. See that you team IS added Fixed cases: 1. Make a draft PR (in a repo where a team is always added, and you're a member of that team) 2. Have another team-member make a comment on your PR 3. Click "Ready for review" 4. See that you team IS added Fixed cases: 1. Make a draft PR (in a repo where a team is always added, and you're a member of that team) 2. Have another team-member APPROVE or REJECT your PR 3. Click "Ready for review" 4. See that you team IS NOT added Some test PRs: Khan/our-lovely-cli#673 Khan/our-lovely-cli#674 Khan/our-lovely-cli#675 Author: lillialexis Reviewers: jeresig Required Reviewers: Approved By: jeresig Checks: ⏭️ gerald, ⏭️ gerald, ✅ gerald, ⏭️ gerald, ⏭️ gerald, ✅ gerald, ✅ lint_and_unit, ✅ autofix, ✅ build_index Pull Request URL: #87
- Loading branch information