Skip to content

Commit

Permalink
Assigns reviewers to Apple Silicon PRs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 455748701
  • Loading branch information
tensorflower-gardener committed Jun 18, 2022
1 parent fa27979 commit 52f7590
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/trusted-partners.yml
Expand Up @@ -41,7 +41,10 @@ jobs:
const domain = await script.get_email_domain({github, username});
switch(domain) {
case "intel.com":
console.log(await script.intel({github, context}));
console.log(await script.filter({github, context}));
break;
case "apple.com":
console.log(await script.filter({github, context}));
break;
case "google.com":
console.log("Googler. No action necessary");
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/trusted_partners.js
Expand Up @@ -39,7 +39,7 @@ const get_email_domain = async ({github, username}) => {
return domain;
};

/** For trusted parters like intel, we want to auto-run tests and mark the PR as ready to pull
/** For trusted parters like Intel, we want to auto-run tests and mark the PR as ready to pull
This allows us to reduce the delay to external partners
Add Labels - kokoro:force-run, ready to pull
The PR is also assigned to specific teams to fast track review
Expand All @@ -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 intel_action = async ({github, context}) => {
const filter_action = async ({github, context}) => {
const labels = ['kokoro:force-run', 'ready to pull'];

let assignees = [];
Expand All @@ -60,6 +60,9 @@ const intel_action = async ({github, context}) => {
const intel_windows_assignees = ['nitins17', 'learning-to-play'];
if (title && title.toLowerCase().includes("intel") && title.toLowerCase().includes("windows"))
assignees = intel_windows_assignees;
const apple_silicon_assignees = ['penpornk', 'nitins17'];
if (title && title.toLowerCase().includes("apple") && title.toLowerCase().includes("silicon"))
assignees = apple_silicon_assignees;

const resp_label = await github.rest.issues.addLabels({
issue_number: context.issue.number,
Expand Down Expand Up @@ -87,6 +90,6 @@ const intel_action = async ({github, context}) => {
};

module.exports = {
intel: intel_action,
filter: filter_action,
get_email_domain
};

0 comments on commit 52f7590

Please sign in to comment.