Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions packages/kbn-relocate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ You must have `gh` CLI tool installed. You can install it by running:
brew install gh
```

You must also configure your "default" kibana repo in `gh`, so that it can find PRs.:

```sh
gh repo set-default elastic/kibana
```

You must have `elastic/kibana` remote configured under the name `upstream`.

You must have a remote named `origin` pointing to your fork of the Kibana repo.

It's highly recommended that you disable the pre-commit hook, as it often causes the script to fail:

```sh
mv .git/hooks/pre-commit .git/hooks/pre-commit.sample
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of doing this, the script could add --no-verify to the commit command.


## Usage

First of all, you need to decide whether you want to contribute to an existing PR or to create a new one. Use the `--pr` flag to specify the PR you are trying to update:
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-relocate/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ This PR aims at relocating some of the Kibana modules (plugins and packages) int
> * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash.
> * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback.

Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe [here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).

`;
4 changes: 3 additions & 1 deletion packages/kbn-relocate/utils.git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export function hasManualCommits(commits: Commit[]) {
(commit) =>
!commit.messageHeadline.startsWith('Relocating module ') &&
!commit.messageHeadline.startsWith('Moving modules owned by ') &&
commit.authors.some((author) => author.login !== 'kibanamachine')
commit.authors.some(
(author) => author.login !== 'kibanamachine' && author.login !== 'elasticmachine'
)
);

return manualCommits.length > 0;
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-relocate/utils.relocate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const replaceReferencesInternal = async (
);

const matchingFiles = result.stdout.split('\n').filter(Boolean);
matchingFiles.push('.github/CODEOWNERS'); // to update references in the manual section, thanks pgayvallet!

for (let i = 0; i < matchingFiles.length; ++i) {
const file = matchingFiles[i];
Expand Down