diff --git a/maintainers.yml b/maintainers.yml new file mode 100644 index 0000000..a761578 --- /dev/null +++ b/maintainers.yml @@ -0,0 +1,76 @@ +# maintainers.yaml +# +# @kata-containers/arch-s390x: BbolroC +# @kata-containers/arch-ppc64le: Amulyam24? +# @kata-containers/cri-o: ? +# @kata-containers/dragonball: bergwolf +# @kata-containers/rust: pmores, lifupan +# @kata-containers/amd: AdithyaKrishnan, arvindskumar99 + + +## slack: member id, display name, or link to profile? + +mappings: + # @kata-containers/arch-s390x: BbolroC + - regex: ".*s390x.*" + group: "Arch-s390x" + owners: + - fullname: "Hyounggyu Choi" + email: "Hyounggyu.Choi@ibm.com" + slackurl: "https://katacontainers.slack.com/team/U0369UMM69M" + slack: "Hyounggyu Choi" + github: "BbolroC" + + # @kata-containers/arch-ppc64le: Amulyam24? + - regex: ".*ppc64le.*" + group: "Arch-ppc64le" + owners: + - fullname: "Amulya Meka" + email: "amulmek1@in.ibm.com" + slackurl: "https://katacontainers.slack.com/team/UV7RP34GK" + slack: "Amulyam24" + github: "Amulyam24" + + + # @kata-containers/dragonball: bergwolf + - regex: ".*dragonball.*" + group: "Dragonball" + owners: + - fullname: "Peng Tao" + email: "http://bergwolf.github.io/" + slackurl: "https://katacontainers.slack.com/team/U8709NBSM" + slack: "bergwolf" + github: "bergwolf" + + + # @kata-containers/rust: pmores, lifupan + - regex: ".*runtime-rs.*" + group: "Rust" + owners: + - fullname: "Pavel Mores" + email: "pmores@redhat.com" + slackurl: "https://katacontainers.slack.com/team/U03CCR6KGBC" + slack: "Pavel Mores" + github: "pmores" + + - fullname: "Fupan Li" + email: "lifupan@gmail.com" + slackurl: "https://katacontainers.slack.com/team/U059Y60DZPW" + slack: "fupan li" + github: "lifupan" + +# @kata-containers/amd: AdithyaKrishnan, arvindskumar99 + - regex: ".*(qemu-(sev(-snp)?|snp(-experimental)?)|ovmf(-sev)?).*" + group: "AMD" + owners: + - fullname: "Adithya Krishnan Kannan" + email: "AdithyaKrishnan.Kannan@amd.com" + slackurl: "https://cloud-native.slack.com/team/U05TX2URB16" + slack: "Adi" + github: "AdithyaKrishnan" + + - fullname: "Arvind Kumar" + email: "arvind.kumar@amd.com" + slackurl: "https://cloud-native.slack.com/team/U06HXU0312P" + slack: "Arvind Kumar" + github: "arvindskumar99" \ No newline at end of file diff --git a/next.config.js b/next.config.js index 91c5add..df2d997 100644 --- a/next.config.js +++ b/next.config.js @@ -6,6 +6,12 @@ module.exports = { unoptimized: true, }, webpack: (config, { dev }) => { + + config.module.rules.push({ + test: /\.yml$/, + use: 'yaml-loader', + }); + if (dev) { config.devtool = false; } diff --git a/package-lock.json b/package-lock.json index 9df53e2..ca614ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "primereact": "^10.8.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-transition-group": "^4.4.5" + "react-transition-group": "^4.4.5", + "yaml-loader": "^0.8.1" }, "devDependencies": { "autoprefixer": "^10.4.20", @@ -1461,6 +1462,15 @@ "dev": true, "license": "MIT" }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -1995,6 +2005,15 @@ "dev": true, "license": "MIT" }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", @@ -3706,6 +3725,12 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/javascript-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", + "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==", + "license": "MIT" + }, "node_modules/jiti": { "version": "1.21.6", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", @@ -3846,6 +3871,32 @@ "dev": true, "license": "MIT" }, + "node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "license": "MIT", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/loader-utils/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -5952,7 +6003,6 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", - "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -5961,6 +6011,20 @@ "node": ">= 14" } }, + "node_modules/yaml-loader": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.8.1.tgz", + "integrity": "sha512-BCEndnUoi3BaZmePkwGGe93txRxLgMhBa/gE725v1/GHnura8QvNs7c4+4C1yyhhKoj3Dg63M7IqhA++15j6ww==", + "license": "MIT", + "dependencies": { + "javascript-stringify": "^2.0.1", + "loader-utils": "^2.0.0", + "yaml": "^2.0.0" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index b54bc49..ec2545c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "primereact": "^10.8.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-transition-group": "^4.4.5" + "react-transition-group": "^4.4.5", + "yaml-loader": "^0.8.1" }, "devDependencies": { "autoprefixer": "^10.4.20", diff --git a/pages/index.js b/pages/index.js index 1243636..bce021c 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,8 +1,10 @@ -import { useEffect, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import { DataTable } from "primereact/datatable"; import { Column } from "primereact/column"; import Head from "next/head"; import { weatherTemplate, getWeatherIndex } from "../components/weatherTemplate"; +import { OverlayPanel } from 'primereact/overlaypanel'; +import MaintainerMapping from "../maintainers.yml"; export default function Home() { @@ -76,9 +78,11 @@ export default function Home() { ); }; + const maintainRefs = useRef([]); + const rowExpansionTemplate = (data) => { const job = jobs.find((job) => job.name === data.name); - + // Prepare run data const runs = []; for (let i = 0; i < job.runs; i++) { @@ -88,14 +92,30 @@ export default function Home() { url: job.urls[i], }); } + + // Find maintainers for the given job + const maintainerData = MaintainerMapping.mappings + .filter(({ regex }) => new RegExp(regex).test(job.name)) + .flatMap((match) => + match.owners.map((owner) => ({ + ...owner, + group: match.group, + })) + ); + + // Group maintainers by their group name + const groupedMaintainers = maintainerData.reduce((acc, owner) => { + if (!acc[owner.group]) { + acc[owner.group] = []; + } + acc[owner.group].push(owner); + return acc; + }, {}); return ( -
-
+
+ {/* Display last 10 runs */} +
{runs.length > 0 ? ( runs.map((run) => { const emoji = @@ -117,6 +137,93 @@ export default function Home() {
No Nightly Runs associated with this job
)}
+ + {/* Display Maintainers, if there's any */} +
+ {Object.keys(groupedMaintainers).length > 0 ? ( +
+ {Object.entries(groupedMaintainers).map( + ([group, owners], groupIndex) => ( +
+ {/* List the group name */} + {group}: +
+ {/* List all maintainers for the group */} + {owners.map((owner, ownerIndex) => { + const badgeMaintain = `maintain-${owner.github}`; + maintainRefs.current[badgeMaintain] = + maintainRefs.current[badgeMaintain] || React.createRef(); + + return ( + // Create the OverlayPanel with contact information. + + + maintainRefs.current[badgeMaintain].current.toggle(e) + } + > + + {owner.fullname} + + {ownerIndex < owners.length - 1 && ", "} + + + maintainRefs.current[badgeMaintain].current.toggle(e) + } + > + + + + ); + })} +
+
+ ) + )} +
+ ) : ( +
No Maintainer Information Available
+ )} +
); };