From 009b0f4d85ed94f03868227333db164622c01d3f Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 18 Jun 2020 10:13:57 -0700 Subject: [PATCH 1/2] Adds kibana-pull attribute for release docs --- docs/index.asciidoc | 3 ++- packages/kbn-release-notes/src/formats/asciidoc.ts | 2 +- x-pack/dev-tools/xkb_release_notes.pl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.asciidoc b/docs/index.asciidoc index b8dec183d378b6..4ffa3cac8c8dd3 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -13,7 +13,8 @@ include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] :docker-image: docker.elastic.co/kibana/kibana:{version} :repo: https://github.com/elastic/kibana/ :issue: {repo}issues/ -:pull: {repo}pull/ +:kibana-pull: {repo}pull/ +:pull: {kibana-pull} :commit: {repo}commit/ :blob: {repo}blob/{branch}/ :security-ref: https://www.elastic.co/community/security/ diff --git a/packages/kbn-release-notes/src/formats/asciidoc.ts b/packages/kbn-release-notes/src/formats/asciidoc.ts index d6c707f009f323..b749e89048a8e9 100644 --- a/packages/kbn-release-notes/src/formats/asciidoc.ts +++ b/packages/kbn-release-notes/src/formats/asciidoc.ts @@ -73,7 +73,7 @@ export class AsciidocFormat extends Format { for (const pr of prsInArea) { const fixes = pr.fixes.length ? `[Fixes ${pr.fixes.join(', ')}] ` : ''; const strippedTitle = pr.title.replace(/^\s*\[[^\]]+\]\s*/, ''); - yield `* ${fixes}${strippedTitle} {pull}${pr.number}[#${pr.number}]\n`; + yield `* ${fixes}${strippedTitle} {kibana-pull}${pr.number}[#${pr.number}]\n`; if (pr.note) { yield ` - ${pr.note}\n`; } diff --git a/x-pack/dev-tools/xkb_release_notes.pl b/x-pack/dev-tools/xkb_release_notes.pl index 08da967c35e687..d8284560b40e19 100755 --- a/x-pack/dev-tools/xkb_release_notes.pl +++ b/x-pack/dev-tools/xkb_release_notes.pl @@ -111,7 +111,7 @@ sub dump_issues { } my $number = $issue->{number}; -# print encode_utf8("* $title {pull}${number}[#${number}]"); +# print encode_utf8("* $title {kibana-pull}${number}[#${number}]"); print encode_utf8("* $title"); print "\n"; print encode_utf8("// https://github.com/${User_Repo}pull/${number}[#${number}]"); From 8a6edc0043af5f853771a91f1296454a72a0db4f Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 18 Jun 2020 10:46:20 -0700 Subject: [PATCH 2/2] [DOCS] Replaces PR issue and commit attributes --- .../development-plugin-feature-registration.asciidoc | 8 ++++---- .../development-plugin-functional-tests.asciidoc | 2 +- .../plugin/development-plugin-localization.asciidoc | 6 +++--- .../plugin/development-plugin-resources.asciidoc | 10 +++++----- .../visualize/development-visualize-index.asciidoc | 2 +- docs/gs-index.asciidoc | 8 ++------ docs/index.asciidoc | 7 +------ docs/plugins/known-plugins.asciidoc | 2 +- x-pack/dev-tools/xkb_release_notes.pl | 2 +- 9 files changed, 19 insertions(+), 28 deletions(-) diff --git a/docs/developer/plugin/development-plugin-feature-registration.asciidoc b/docs/developer/plugin/development-plugin-feature-registration.asciidoc index d594a6d4255b2e..203cc201ee6262 100644 --- a/docs/developer/plugin/development-plugin-feature-registration.asciidoc +++ b/docs/developer/plugin/development-plugin-feature-registration.asciidoc @@ -22,7 +22,7 @@ init(server) { ----------- ===== Feature details -Registering a feature consists of the following fields. For more information, consult the {repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface]. +Registering a feature consists of the following fields. For more information, consult the {kib-repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface]. [cols="1a, 1a, 1a, 1a"] @@ -45,12 +45,12 @@ Registering a feature consists of the following fields. For more information, co |An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here. |`privileges` (required) -|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`]. +|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`]. |See <> and <> |The set of privileges this feature requires to function. |`subFeatures` (optional) -|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`]. +|{kib-repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`]. |See <> |The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher. @@ -68,7 +68,7 @@ Registering a feature consists of the following fields. For more information, co ===== Privilege definition The `privileges` section of feature registration allows plugins to implement read/write and read-only modes for their applications. -For a full explanation of fields and options, consult the {repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface]. +For a full explanation of fields and options, consult the {kib-repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface]. ==== Using UI Capabilities diff --git a/docs/developer/plugin/development-plugin-functional-tests.asciidoc b/docs/developer/plugin/development-plugin-functional-tests.asciidoc index 1227682b1dcf93..eda2ceb627fced 100644 --- a/docs/developer/plugin/development-plugin-functional-tests.asciidoc +++ b/docs/developer/plugin/development-plugin-functional-tests.asciidoc @@ -85,5 +85,5 @@ node ../../kibana/scripts/functional_test_runner [float] ==== Using esArchiver -We're working on documentation for this, but for now the best place to look is the original {pull}10359[pull request]. +We're working on documentation for this, but for now the best place to look is the original {kibana-pull}10359[pull request]. diff --git a/docs/developer/plugin/development-plugin-localization.asciidoc b/docs/developer/plugin/development-plugin-localization.asciidoc index 1fb8b6aa0cbde7..b0b543bd9fe33a 100644 --- a/docs/developer/plugin/development-plugin-localization.asciidoc +++ b/docs/developer/plugin/development-plugin-localization.asciidoc @@ -109,7 +109,7 @@ export const HELLO_WORLD = i18n.translate('hello.wonderful.world', { }); ----------- -Full details are {repo}tree/master/packages/kbn-i18n#vanilla-js[here]. +Full details are {kib-repo}tree/master/packages/kbn-i18n#vanilla-js[here]. [float] ===== i18n for React @@ -133,7 +133,7 @@ export const Component = () => { }; ----------- -Full details are {repo}tree/master/packages/kbn-i18n#react[here]. +Full details are {kib-repo}tree/master/packages/kbn-i18n#react[here]. @@ -153,7 +153,7 @@ The translation directive has the following syntax: > ----------- -Full details are {repo}tree/master/packages/kbn-i18n#angularjs[here]. +Full details are {kib-repo}tree/master/packages/kbn-i18n#angularjs[here]. [float] diff --git a/docs/developer/plugin/development-plugin-resources.asciidoc b/docs/developer/plugin/development-plugin-resources.asciidoc index a2fd0e23d0be4a..3a32c49e40e0f8 100644 --- a/docs/developer/plugin/development-plugin-resources.asciidoc +++ b/docs/developer/plugin/development-plugin-resources.asciidoc @@ -5,12 +5,12 @@ Here are some resources that are helpful for getting started with plugin develop [float] ==== Some light reading -Our {repo}blob/master/CONTRIBUTING.md[contributing guide] can help you get a development environment going. +Our {kib-repo}blob/master/CONTRIBUTING.md[contributing guide] can help you get a development environment going. [float] ==== Plugin Generator -We recommend that you kick-start your plugin by generating it with the {repo}tree/{branch}/packages/kbn-plugin-generator[Kibana Plugin Generator]. Run the following in the Kibana repo, and you will be asked a couple questions, see some progress bars, and have a freshly generated plugin ready for you to play with in Kibana's `plugins` folder. +We recommend that you kick-start your plugin by generating it with the {kib-repo}tree/{branch}/packages/kbn-plugin-generator[Kibana Plugin Generator]. Run the following in the Kibana repo, and you will be asked a couple questions, see some progress bars, and have a freshly generated plugin ready for you to play with in Kibana's `plugins` folder. ["source","shell"] ----------- @@ -34,7 +34,7 @@ The Kibana directory must be named `kibana`, and your plugin directory should be [float] ==== References in the code - - {repo}blob/{branch}/src/legacy/server/plugins/lib/plugin.js[Plugin class]: What options does the `kibana.Plugin` class accept? + - {kib-repo}blob/{branch}/src/legacy/server/plugins/lib/plugin.js[Plugin class]: What options does the `kibana.Plugin` class accept? - <>: What type of exports are available? [float] @@ -65,9 +65,9 @@ To enable TypeScript support, create a `tsconfig.json` file at the root of your TypeScript code is automatically converted into JavaScript during development, but not in the distributable version of Kibana. If you use the -{repo}blob/{branch}/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin, then your `.ts` and `.tsx` files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of Kibana. +{kib-repo}blob/{branch}/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin, then your `.ts` and `.tsx` files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of Kibana. ==== {kib} platform migration guide -{repo}blob/{branch}/src/core/MIGRATION.md#migrating-legacy-plugins-to-the-new-platform[This guide] +{kib-repo}blob/{branch}/src/core/MIGRATION.md#migrating-legacy-plugins-to-the-new-platform[This guide] provides an action plan for moving a legacy plugin to the new platform. diff --git a/docs/developer/visualize/development-visualize-index.asciidoc b/docs/developer/visualize/development-visualize-index.asciidoc index daefc434e1f183..ac824b4702a3c2 100644 --- a/docs/developer/visualize/development-visualize-index.asciidoc +++ b/docs/developer/visualize/development-visualize-index.asciidoc @@ -22,5 +22,5 @@ here are a few resources: * The <> documentation, where we try to capture any changes to the APIs as they occur across minors. * link:https://github.com/elastic/kibana/issues/44121[Meta issue] which is tracking the move of the plugin to the new Kibana platform * Our link:https://www.elastic.co/blog/join-our-elastic-stack-workspace-on-slack[Elastic Stack workspace on Slack]. -* The {repo}blob/{branch}/src/plugins/visualizations[source code], which will continue to be +* The {kib-repo}blob/{branch}/src/plugins/visualizations[source code], which will continue to be the most accurate source of information. diff --git a/docs/gs-index.asciidoc b/docs/gs-index.asciidoc index c5446dda676061..06996d382d90f8 100644 --- a/docs/gs-index.asciidoc +++ b/docs/gs-index.asciidoc @@ -11,14 +11,10 @@ release-state can be: released | prerelease | unreleased :docker-image: docker.elastic.co/kibana/kibana:{version} :es-ref: https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ -:kibana-ref: https://www.elastic.co/guide/en/kibana/{branch} -:xpack-ref: https://www.elastic.co/guide/en/x-pack/current/ -:repo: https://github.com/elastic/kibana/ -:issue: {repo}issues/ -:pull: {repo}pull/ -:commit: {repo}commit/ :security: https://www.elastic.co/community/security/ +include::{docs-root}/shared/attributes.asciidoc[] + include::introduction.asciidoc[] include::setup/install.asciidoc[] diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 4ffa3cac8c8dd3..66ad2f7ec306ab 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -11,12 +11,7 @@ include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] :docker-repo: docker.elastic.co/kibana/kibana :docker-image: docker.elastic.co/kibana/kibana:{version} -:repo: https://github.com/elastic/kibana/ -:issue: {repo}issues/ -:kibana-pull: {repo}pull/ -:pull: {kibana-pull} -:commit: {repo}commit/ -:blob: {repo}blob/{branch}/ +:blob: {kib-repo}blob/{branch}/ :security-ref: https://www.elastic.co/community/security/ include::{docs-root}/shared/attributes.asciidoc[] diff --git a/docs/plugins/known-plugins.asciidoc b/docs/plugins/known-plugins.asciidoc index cb70a1d1c387a4..cd07596ad37ef5 100644 --- a/docs/plugins/known-plugins.asciidoc +++ b/docs/plugins/known-plugins.asciidoc @@ -71,4 +71,4 @@ Use it to create, edit and embed visualizations, and also to search inside an em * https://github.com/datasweet-fr/kibana-datasweet-formula[Datasweet Formula] (datasweet) - enables calculated metric on any standard Kibana visualization. * https://github.com/pjhampton/kibana-prometheus-exporter[Prometheus Exporter] - exports the Kibana metrics in the prometheus format -NOTE: If you want your plugin to be added to this page, open a {repo}tree/{branch}/docs/plugins/known-plugins.asciidoc[pull request]. +NOTE: If you want your plugin to be added to this page, open a {kib-repo}tree/{branch}/docs/plugins/known-plugins.asciidoc[pull request]. diff --git a/x-pack/dev-tools/xkb_release_notes.pl b/x-pack/dev-tools/xkb_release_notes.pl index d8284560b40e19..a635a88392657e 100755 --- a/x-pack/dev-tools/xkb_release_notes.pl +++ b/x-pack/dev-tools/xkb_release_notes.pl @@ -120,7 +120,7 @@ sub dump_issues { print keys %uniq > 1 ? " (issues: " : " (issue: "; -# print join ", ", map {"{issue}${_}[#${_}]"} +# print join ", ", map {"{kib-issue}${_}[#${_}]"} # print join ", ", map {"#${_}"} print join ", ", map {"https://github.com/${User_Repo}issues/${_}[#${_}]"} sort keys %uniq;