Skip to content

Commit

Permalink
[8.x] [Security Solution] Clean up external link text in a general way (
Browse files Browse the repository at this point in the history
#196309) (#196502)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Clean up external link text in a general way
(#196309)](#196309)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T09:00:18Z","message":"[Security
Solution] Clean up external link text in a general way (#196309)\n\n##
Summary\r\n\r\nThis PR generalizes external link text cleanup in
`removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule
Management [periodic pipeline
failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115)
was caused by merging back
#195525. Despite EUI changes were
[addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760)
in our test utility it wasn't properly picked up. The problem is fixed
in a more general
way.","sha":"daf4aae6aa202fd1148beea269939090137b659a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","backport:prev-minor","v8.17.0"],"title":"[Security
Solution] Clean up external link text in a general
way","number":196309,"url":"https://github.com/elastic/kibana/pull/196309","mergeCommit":{"message":"[Security
Solution] Clean up external link text in a general way (#196309)\n\n##
Summary\r\n\r\nThis PR generalizes external link text cleanup in
`removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule
Management [periodic pipeline
failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115)
was caused by merging back
#195525. Despite EUI changes were
[addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760)
in our test utility it wasn't properly picked up. The problem is fixed
in a more general
way.","sha":"daf4aae6aa202fd1148beea269939090137b659a"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196309","number":196309,"mergeCommit":{"message":"[Security
Solution] Clean up external link text in a general way (#196309)\n\n##
Summary\r\n\r\nThis PR generalizes external link text cleanup in
`removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule
Management [periodic pipeline
failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115)
was caused by merging back
#195525. Despite EUI changes were
[addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760)
in our test utility it wasn't properly picked up. The problem is fixed
in a more general
way.","sha":"daf4aae6aa202fd1148beea269939090137b659a"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maxim Palenov <[email protected]>
  • Loading branch information
kibanamachine and maximpn authored Oct 16, 2024
1 parent c986220 commit f98b781
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ export const TIMELINE_FIELD = (field: string) => {
return `[data-test-subj="formatted-field-${field}"]`;
};

export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, '');
export const removeExternalLinkText = (str: string) =>
str.replace(/\([^)]*(opens in a new tab or window)[^)]*\)/g, '');

export const DEFINE_RULE_PANEL_PROGRESS =
'[data-test-subj="defineRule"] [data-test-subj="stepPanelProgress"]';
Expand Down

0 comments on commit f98b781

Please sign in to comment.