2023-04-22 04:50:27 -07:00
|
|
|
module.exports = async ({ github, context }) => {
|
2022-03-27 12:48:28 -07:00
|
|
|
const requestedReviewers = await github.rest.pulls.listRequestedReviewers({
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
2023-04-22 04:50:27 -07:00
|
|
|
pull_number: context.issue.number,
|
2022-03-27 12:48:28 -07:00
|
|
|
});
|
|
|
|
|
2023-04-22 04:50:27 -07:00
|
|
|
const reviewers = requestedReviewers.data.users.map((e) => e.login);
|
2022-03-27 12:48:28 -07:00
|
|
|
|
|
|
|
github.rest.pulls.removeRequestedReviewers({
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
pull_number: context.issue.number,
|
2022-12-15 12:40:30 -07:00
|
|
|
reviewers: reviewers,
|
2022-03-27 12:48:28 -07:00
|
|
|
});
|
2023-04-22 04:50:27 -07:00
|
|
|
};
|