Commit afe5f4e
authored
fix(review): Fix primary-secondary determination (#47967)
### What does this PR do?
Count the ownership of all PR files to properly decide the `primary`/`secondary` role indicator in code review message.
### Motivation
This indicator must help reviewers understand their role in code review. The computation was wrong as only computing the number of files related to the current review_request, thus emitting `primary` nearly all the time.
### Describe how you validated your changes
Local tests on existing PR with modified code:
```
GITHUB_TOKEN=$(ddtool
auth github token) inv issue.ask-reviews -p 47890 -a review_request -t agent-log-pipelines
Requested reviewers: ['agent-log-pipelines']
PR size: large lines, 10 files defaultdict(<class 'int'>, {'agent-devx': 9, 'agent-health': 1, 'agent-log-pipelines': 1, 'agent-runtime
s': 2, 'ebpf-platform': 1, 'ndm-integrations': 1, 'network-device-monitoring-core': 1, 'cloud-network-monitoring': 4, 'windows-products
': 1, 'ecs-experiences': 1})
*Pierre-Louis Veyrenc* is asking review for PR <https://github.com/DataDog/datadog-agent/pull/47890/s|[ACIX-1365] refactor(e2e): auto-i
nstall ECR credentials helper in docker.NewManager>.
This is a `large` PR.
agent-log-pipelines has 1 file(s) to review, as a secondary reviewer.
Could you please have a look? Thanks in advance!
#agent-log-pipelines
```
### Additional Notes
[ACIX-1365]: https://datadoghq.atlassian.net/browse/ACIX-1365?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: nicolas.schweitzer <nicolas.schweitzer@datadoghq.com>1 parent 4fb24e1 commit afe5f4e
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| |||
0 commit comments