Skip to content

Commit 57423d1

Browse files
author
Thomas Loubrieu
committed
remove PR which are authored by the members of team TVA
1 parent c3fa948 commit 57423d1

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/triage-report-to-slack.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,32 @@ jobs:
135135
cursor = result.organization.projectV2.items.pageInfo.endCursor;
136136
}
137137
138+
// Fetch TVA team members and filter out their PRs
139+
const tvaTeamQuery = `
140+
query($org: String!) {
141+
organization(login: $org) {
142+
team(slug: "tva") {
143+
members(first: 100) {
144+
nodes {
145+
login
146+
}
147+
}
148+
}
149+
}
150+
}
151+
`;
152+
153+
const tvaTeamResult = await github.graphql(tvaTeamQuery, { org: org });
154+
const tvaMembers = new Set(
155+
tvaTeamResult.organization.team.members.nodes.map(m => m.login)
156+
);
157+
158+
triageItems = triageItems.filter(item => {
159+
const isPR = item.content.__typename === 'PullRequest';
160+
const author = item.content.author?.login;
161+
return !(isPR && tvaMembers.has(author));
162+
});
163+
138164
// Format items for Slack
139165
const formattedItems = triageItems.map(item => {
140166
const content = item.content;

0 commit comments

Comments
 (0)