mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
[Backport release-0.9] ci: use a set instead of array for team reviewers (#23835)
ci: use a set instead of array for team reviewers
Adding the same team multiple times will fails the review job.
(cherry picked from commit 4cb2b747c0
)
Co-authored-by: dundargoc <gocdundar@gmail.com>
This commit is contained in:
parent
09f97ff9a8
commit
2833230791
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 labels = pr_data.data.labels.map(e => e.name)
|
||||||
|
|
||||||
const reviewers = new Set()
|
const reviewers = new Set()
|
||||||
const team_reviewers = new Array()
|
const team_reviewers = new Set()
|
||||||
if (labels.includes('api')) {
|
if (labels.includes('api')) {
|
||||||
reviewers.add("bfredl")
|
reviewers.add("bfredl")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('build')) {
|
if (labels.includes('build')) {
|
||||||
team_reviewers.push('ci');
|
team_reviewers.add('ci');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('ci')) {
|
if (labels.includes('ci')) {
|
||||||
team_reviewers.push('ci');
|
team_reviewers.add('ci');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('column')) {
|
if (labels.includes('column')) {
|
||||||
@ -55,7 +55,7 @@ module.exports = async ({github, context}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('lsp')) {
|
if (labels.includes('lsp')) {
|
||||||
team_reviewers.push('lsp');
|
team_reviewers.add('lsp');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('platform:nix')) {
|
if (labels.includes('platform:nix')) {
|
||||||
@ -72,7 +72,7 @@ module.exports = async ({github, context}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('treesitter')) {
|
if (labels.includes('treesitter')) {
|
||||||
team_reviewers.push('treesitter');
|
team_reviewers.add('treesitter');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.includes('typo')) {
|
if (labels.includes('typo')) {
|
||||||
@ -97,6 +97,6 @@ module.exports = async ({github, context}) => {
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
pull_number: context.issue.number,
|
pull_number: context.issue.number,
|
||||||
reviewers: Array.from(reviewers),
|
reviewers: Array.from(reviewers),
|
||||||
team_reviewers: team_reviewers
|
team_reviewers: Array.from(team_reviewers)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user