mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
ci: use a set instead of array for team reviewers
Adding the same team multiple times will fails the review job.
This commit is contained in:
parent
2d78e656b7
commit
4cb2b747c0
12
.github/scripts/reviews.js
vendored
12
.github/scripts/reviews.js
vendored
@ -7,17 +7,17 @@ module.exports = async ({github, context}) => {
|
||||
const labels = pr_data.data.labels.map(e => e.name)
|
||||
|
||||
const reviewers = new Set()
|
||||
const team_reviewers = new Array()
|
||||
const team_reviewers = new Set()
|
||||
if (labels.includes('api')) {
|
||||
reviewers.add("bfredl")
|
||||
}
|
||||
|
||||
if (labels.includes('build')) {
|
||||
team_reviewers.push('ci');
|
||||
team_reviewers.add('ci');
|
||||
}
|
||||
|
||||
if (labels.includes('ci')) {
|
||||
team_reviewers.push('ci');
|
||||
team_reviewers.add('ci');
|
||||
}
|
||||
|
||||
if (labels.includes('column')) {
|
||||
@ -55,7 +55,7 @@ module.exports = async ({github, context}) => {
|
||||
}
|
||||
|
||||
if (labels.includes('lsp')) {
|
||||
team_reviewers.push('lsp');
|
||||
team_reviewers.add('lsp');
|
||||
}
|
||||
|
||||
if (labels.includes('platform:nix')) {
|
||||
@ -72,7 +72,7 @@ module.exports = async ({github, context}) => {
|
||||
}
|
||||
|
||||
if (labels.includes('treesitter')) {
|
||||
team_reviewers.push('treesitter');
|
||||
team_reviewers.add('treesitter');
|
||||
}
|
||||
|
||||
if (labels.includes('typo')) {
|
||||
@ -97,6 +97,6 @@ module.exports = async ({github, context}) => {
|
||||
repo: context.repo.repo,
|
||||
pull_number: context.issue.number,
|
||||
reviewers: Array.from(reviewers),
|
||||
team_reviewers: team_reviewers
|
||||
team_reviewers: Array.from(team_reviewers)
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user