Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EUI Analytics Scripts #8300

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added cloud
JasonStoltz committed Jan 30, 2025

Verified

This commit was signed with the committer’s verified signature.
JasonStoltz Jason Stoltzfus
commit 924d95780c70a9d3fa82c2a02c201f67f2280361
5 changes: 4 additions & 1 deletion packages/eui-usage-analytics/index.js
Original file line number Diff line number Diff line change
@@ -44,7 +44,10 @@ if (!argv['dry']) {
}

const run = async () => {
const result = await scan({ kibanaRoot: argv['kibana-root'] });
const result = await scan({
kibanaRoot: argv['kibana-root'],
cloudRoot: argv['cloud-root'],
});
const operations = result.flatMap((doc) => [
{ index: { _index: 'eui_components' } },
doc,
11 changes: 10 additions & 1 deletion packages/eui-usage-analytics/scan.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,10 @@ const Codeowners = require('codeowners');
const path = require('path');
const cwd = path.resolve(__dirname);

const getRepoConfig = ({ kibanaRoot = '../../../kibana' }) => {
const getRepoConfig = ({
kibanaRoot = '../../../kibana',
cloudRoot = '../../../cloud',
}) => {
// NOTE: Do not add private repos to this list. If we plan to add private repos, we should do so via configuration rather than source.
return {
kibana: {
@@ -31,6 +34,12 @@ const getRepoConfig = ({ kibanaRoot = '../../../kibana' }) => {
`${kibanaRoot}/packages`,
],
},
cloud: {
linkPrefix: 'https://github.com/elastic/cloud/blob/master/',
codeownersPath: '',
repoRoot: cloudRoot,
crawlFrom: [`${cloudRoot}/cloud-ui/apps/monolith`],
},
};
};