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

Sustainable Kibana Architecture: Relocate script v4 #204383

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Dec 16, 2024

Summary

  • Auto-detect "upstream" and "origin" remotes (instead of assuming their names).
  • Allow relocating modules that are already in a "sustainable" folder.
    • Filter out modules that are in the correct locations.
  • Update the list of modules to relocate to show only those modules that are actually moved.

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 16, 2024
@gsoldevila gsoldevila requested a review from a team as a code owner December 16, 2024 12:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Comment on lines +20 to +30
export const findGithubLogin = async () => {
const res = await safeExec('gh auth status');
// e.g. ✓ Logged in to github.com account gsoldevila (/Users/gsoldevila/.config/gh/hosts.yml)
const loginLine = res.stdout
.split('\n')
.find((line) => line.includes('Logged in'))
?.split(/\t| /)
.filter(Boolean);

return loginLine?.[loginLine?.findIndex((fragment) => fragment === 'account') + 1];
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is subject to break in future versions of gh. But OK for now.

packages/kbn-relocate/utils/relocate.ts Outdated Show resolved Hide resolved
Co-authored-by: Alejandro Fernández Haro <[email protected]>
@gsoldevila gsoldevila enabled auto-merge (squash) December 16, 2024 13:53
@gsoldevila gsoldevila merged commit d18a44c into elastic:main Dec 16, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12356189897

@kibanamachine
Copy link
Contributor

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 17, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 204383 locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport missing Added to PRs automatically when the are determined to be missing a backport. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants