[go: nahoru, domu]

Skip to content

Commit

Permalink
Add NVIDIA as a Trusted Partner and assign reviewers. Also add a doma…
Browse files Browse the repository at this point in the history
…in check to prevent accidental cross-partner triggering of assignments.
  • Loading branch information
pjannaty committed Jul 8, 2022
1 parent c7780c3 commit 328c774
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/trusted-partners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ jobs:
const domain = await script.get_email_domain({github, username});
switch(domain) {
case "intel.com":
console.log(await script.filter({github, context}));
console.log(await script.filter({github, context, domain}));
break;
case "apple.com":
console.log(await script.filter({github, context}));
console.log(await script.filter({github, context, domain}));
break;
case "nvidia.com":
console.log(await script.filter({github, context, domain}));
break;
case "google.com":
console.log("Googler. No action necessary");
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/trusted_partners.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const get_email_domain = async ({github, username}) => {
context has the commit message details in the payload
@return {string} Returns the message with labels attached and assignees added
*/
const filter_action = async ({github, context}) => {
const filter_action = async ({github, context, domain}) => {
const labels = ['kokoro:force-run', 'ready to pull'];

let assignees = [];
Expand All @@ -58,11 +58,22 @@ const filter_action = async ({github, context}) => {
if (title && title.toLowerCase().includes("onednn"))
assignees = onednn_assignees;
const intel_windows_assignees = ['nitins17', 'learning-to-play'];
if (title && title.toLowerCase().includes("intel") && title.toLowerCase().includes("windows"))
if (title && title.toLowerCase().includes("intel") && title.toLowerCase().includes("windows") && domain.includes("intel.com"))
assignees = intel_windows_assignees;
const apple_silicon_assignees = ['penpornk', 'nitins17'];
if (title && title.toLowerCase().includes("apple") && title.toLowerCase().includes("silicon"))
if (title && title.toLowerCase().includes("apple") && title.toLowerCase().includes("silicon") && domain.includes("apple.com"))
assignees = apple_silicon_assignees;
if (title && title.toLowerCase().includes("nvidia") && domain.includes("nvidia.com")) {
if (title.toLowerCase().includes("jax")) {
assignees.push('hawkinsp', 'yashk2810', 'skye');
}
if (title.toLowerCase().includes("xla") || title.toLowerCase().includes("gpu")) {
assignees.push('cheshire', 'gcforster', 'reedwm', 'chsigg');
}
if (title.toLowerCase().includes("tf")) {
assignees.push('rohan100jain', 'bfontain', 'penpornk');
}
}

const resp_label = await github.rest.issues.addLabels({
issue_number: context.issue.number,
Expand Down

0 comments on commit 328c774

Please sign in to comment.