File tree 1 file changed +7
-27
lines changed
1 file changed +7
-27
lines changed Original file line number Diff line number Diff line change @@ -50,38 +50,18 @@ jobs:
50
50
console.log("This workflow is running within an invalid context")
51
51
process.exit(1)
52
52
}
53
-
54
- // This list should match with CODEOWNERS.
55
- let requiredReviewers = {
56
- gobbleturk: "",
57
- khatwanimohit: "",
58
- bvandermoon: "",
59
- vipannalla: "",
60
- RissyRan: "",
61
- richjames0: "",
62
- rni418: "",
63
- gagika: "",
64
- shralex: "",
65
- yangyuwei: "",
66
- SurbhiJainUSC: "",
67
- hengtaoguo: "",
68
- A9isha: "",
69
- wang2yn84: "",
70
- wyzhang: "",
71
- mitalisi: "",
72
- gpolovets1: "",
73
- mailvijayasingh: "",
74
- jrplatin: "",
75
- patemotter: "",
76
- lumosis: "",
77
- aireenmei: "",
78
- }
79
53
const reviews = await github.rest.pulls.listReviews({
80
54
owner,
81
55
repo,
82
56
pull_number,
83
57
})
84
58
59
+ const requestedReviewers = await github.rest.pulls.listRequestedReviewers({
60
+ owner,
61
+ repo,
62
+ pull_number,
63
+ });
64
+
85
65
const pullRequest = await github.rest.pulls.get({
86
66
owner,
87
67
repo,
95
75
}
96
76
let num_approved = 0
97
77
for (const review of reviews.data) {
98
- if (review.state === "APPROVED" && review.user.login in requiredReviewers) {
78
+ if (review.state === "APPROVED" && review.user.login in requiredReviewers.data.users ) {
99
79
num_approved = num_approved + 1
100
80
}
101
81
}
You can’t perform that action at this time.
0 commit comments