[incubator-echarts] branch next updated (3e7bdc3 -> a0fd0b7)
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a change to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git. from 3e7bdc3 rebuild: 5.0.0-beta.2 new 23a809d ts: add type to graphic component. new 98d4e7b fix: [graphic component] support textContent. new 2f5febe test: fix test of graphic component. new ec5bcf4 fix: [graphic component] compat legacy style. new a0fd0b7 Merge branch 'next' of github.com:apache/incubator-echarts into next The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: dist/echarts.js | 142239 +--- dist/echarts.js.map | 2 +- package-lock.json| 5153 +- package.json | 4 +- src/component/graphic.ts |543 +- src/option.ts| 2 + src/util/layout.ts | 2 +- test/graphic-cases.html |202 + test/ut/jest.config.js | 2 +- test/ut/spec/component/graphic/setOption.test.ts |534 +- 10 files changed, 67756 insertions(+), 80927 deletions(-) create mode 100644 test/graphic-cases.html - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts] 01/05: ts: add type to graphic component.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit 23a809ddd897c9042fa1b9f29f6cf9c65341e72d Author: 100pah AuthorDate: Tue Oct 27 02:17:11 2020 +0800 ts: add type to graphic component. --- src/component/graphic.ts | 470 +++ src/util/layout.ts | 2 +- 2 files changed, 309 insertions(+), 163 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index 430e81c..fd6ac7d 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -17,7 +17,6 @@ * under the License. */ -// @ts-nocheck import * as echarts from '../echarts'; import * as zrUtil from 'zrender/src/core/util'; @@ -26,25 +25,194 @@ import * as modelUtil from '../util/model'; import * as graphicUtil from '../util/graphic'; import * as layoutUtil from '../util/layout'; import {parsePercent} from '../util/number'; +import { ComponentOption, BoxLayoutOptionMixin, Dictionary, ZRStyleProps, OptionId } from '../util/types'; +import ComponentModel from '../model/Component'; +import Element from 'zrender/src/Element'; +import Displayable from 'zrender/src/graphic/Displayable'; +import { PathProps } from 'zrender/src/graphic/Path'; +import { ImageStyleProps } from 'zrender/src/graphic/Image'; +import GlobalModel from '../model/Global'; +import ComponentView from '../view/Component'; +import ExtensionAPI from '../ExtensionAPI'; +import { getECData } from '../util/innerStore'; + + +const TRANSFORM_PROPS = { +x: 1, +y: 1, +scaleX: 1, +scaleY: 1, +originX: 1, +originY: 1, +rotation: 1 +} as const; +type TransformProp = keyof typeof TRANSFORM_PROPS; + +interface GraphicComponentBaseElementOption extends +Partial>, +/** + * left/right/top/bottom: (like 12, '22%', 'center', default undefined) + * If left/rigth is set, shape.x/shape.cx/position will not be used. + * If top/bottom is set, shape.y/shape.cy/position will not be used. + * This mechanism is useful when you want to position a group/element + * against the right side or the center of this container. + */ +Partial> { + +/** + * element type, mandatory. + */ +type: string; + +id?: OptionId; + +// Only internal usage. Use specified value does NOT make sense. +parentId?: OptionId; +parentOption: GraphicComponentElementOption; +children: GraphicComponentElementOption[]; +hv: [boolean, boolean]; + +/** + * bounding: (enum: 'all' (default) | 'raw') + * Specify how to calculate boundingRect when locating. + * 'all': Get uioned and transformed boundingRect + * from both itself and its descendants. + * This mode simplies confining a group of elements in the bounding + * of their ancester container (e.g., using 'right: 0'). + * 'raw': Only use the boundingRect of itself and before transformed. + * This mode is similar to css behavior, which is useful when you + * want an element to be able to overflow its container. (Consider + * a rotated circle needs to be located in a corner.) + */ +bounding?: 'all' + +/** + * info: custom info. enables user to mount some info on elements and use them + * in event handlers. Update them only when user specified, otherwise, remain. + */ +info?: GraphicExtraElementInfo; + +// TODO: textContent, textConfig ? +// `false` means remove the textContent ??? +// textContent?: CustomTextOption | false; +// textConfig?: + +$action?: 'merge' | 'replace' | 'remove'; +}; +interface GraphicComponentDisplayableOption extends +GraphicComponentBaseElementOption, +Partial> { + +style?: ZRStyleProps; + +// TODO: states? +// emphasis?: GraphicComponentDisplayableOptionOnState; +// blur?: GraphicComponentDisplayableOptionOnState; +// select?: GraphicComponentDisplayableOptionOnState; +} +// TODO: states? +// interface GraphicComponentDisplayableOptionOnState extends Partial> { +// style?: ZRStyleProps; +// } +interface GraphicComponentGroupOption extends GraphicComponentBaseElementOption { +type: 'group'; + +/** + * width/height: (can only be pixel value, default 0) + * Only be used to specify contianer(group) size, if needed. And + * can not be percentage value (like '33%'). See the reason in the + * layout algorithm below. + */ +width?: number; +height?: number; + +// TODO: Can only set focus, blur on the root element. +// children: Omit[]; +children: GraphicComponentElementOption[]; +} +interface GraphicComponentZRPathOption extends GraphicComponentDisplayableOption { +shape?: PathProps['shape']; +} +interface GraphicComponentImageOption extends GraphicComponentDisplayableOption { +type: 'image'; +style?:
[incubator-echarts] 04/05: fix: [graphic component] compat legacy style.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit ec5bcf444f0338c3fe9ac8b76701e464b93e2c86 Author: 100pah AuthorDate: Wed Oct 28 03:10:57 2020 +0800 fix: [graphic component] compat legacy style. --- src/component/graphic.ts | 19 - test/graphic-cases.html | 202 +++ 2 files changed, 219 insertions(+), 2 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index 04beade..909976e 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -36,6 +36,7 @@ import ComponentView from '../view/Component'; import ExtensionAPI from '../ExtensionAPI'; import { getECData } from '../util/innerStore'; import { TextStyleProps } from 'zrender/src/graphic/Text'; +import { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../util/styleCompat'; const TRANSFORM_PROPS = { @@ -436,8 +437,9 @@ class GraphicComponentView extends ComponentView { const parentId = modelUtil.convertOptionIdName(elOption.parentId, null); const targetElParent = (parentId != null ? elMap.get(parentId) : rootGroup) as graphicUtil.Group; +const elType = elOption.type; const elOptionStyle = (elOption as GraphicComponentDisplayableOption).style; -if (elOption.type === 'text' && elOptionStyle) { +if (elType === 'text' && elOptionStyle) { // In top/bottom mode, textVerticalAlign should not be used, which cause // inaccurately locating. if (elOption.hv && elOption.hv[1]) { @@ -448,7 +450,20 @@ class GraphicComponentView extends ComponentView { } } -const textContentOption = (elOption as GraphicComponentZRPathOption).textContent; +let textContentOption = (elOption as GraphicComponentZRPathOption).textContent; +let textConfig = (elOption as GraphicComponentZRPathOption).textConfig; +if (elOptionStyle +&& isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption) +) { +const convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true); +if (!textConfig && convertResult.textConfig) { +textConfig = (elOption as GraphicComponentZRPathOption).textConfig = convertResult.textConfig; +} +if (!textContentOption && convertResult.textContent) { +textContentOption = convertResult.textContent; +} +} + // Remove unnecessary props to avoid potential problems. const elOptionCleaned = getCleanedElOption(elOption); diff --git a/test/graphic-cases.html b/test/graphic-cases.html new file mode 100644 index 000..7b4b1c4 --- /dev/null +++ b/test/graphic-cases.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +require(['echarts'/*, 'map/js/china' */], function (echarts) { +var option; +// $.getJSON('./data/nutrients.json', function (data) {}); + + +const imageURI = 'data:image/png;base64,iVBORw0KGgoNSUhEUgAAANwAAADcCAYbWs+BBmJLR0QA/wD/AP+gvaeTCXBIWXMAAAsTAAALEwEAmpwYB3RJTUUH4gIUARQAHY8+4wAAApBJREFUeNrt3cFqAjEUhlEjvv8rXzciiiBGk/He5JxdN2U649dY+KmnEwAv2uMXEeGOwERntwAEB4IDBAeCAwQHggPBAYIDwQGCA8GB4ADBgeAAwYHgAMGB4EBwgOCgpkuKq2it/r8Li2hbvGKqP6s/PycnHHv9YvSWEgQHCA4EBwgOBAeCAwQHggMEByXM+QRUE6D3suwuPafDn5MTDg50KXnVPSdxa54y/oYDwQGCA8EBggPBAYIDwYHggBE+X5rY3Y3Tey97Nn2eU+rnlGfaZa6Ft5SA4EBwgOBAcCA4QHAgOEBwIDjg [...] + + +option = { +graphic: [{ +type: 'circle', +x: 100, +y: 50, +shape: { +cx: 0, +cy: 0, +r: 50 +}, +style: { +fill: 'orange' +}, +textContent: { +style: { +text: 'x: 100, y: 50\nposition: bottom', +fill: 'blue' +} +}, +textConfig: { +position: 'bottom' +} +}, { +type: 'rect', +x: 200, +y: 0, +scaleX: 10, +scaleY: 20, +shape: { +x: 0, +y: 0, +width: 5, +height: 5 +}, +
[incubator-echarts] 01/05: ts: add type to graphic component.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit 23a809ddd897c9042fa1b9f29f6cf9c65341e72d Author: 100pah AuthorDate: Tue Oct 27 02:17:11 2020 +0800 ts: add type to graphic component. --- src/component/graphic.ts | 470 +++ src/util/layout.ts | 2 +- 2 files changed, 309 insertions(+), 163 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index 430e81c..fd6ac7d 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -17,7 +17,6 @@ * under the License. */ -// @ts-nocheck import * as echarts from '../echarts'; import * as zrUtil from 'zrender/src/core/util'; @@ -26,25 +25,194 @@ import * as modelUtil from '../util/model'; import * as graphicUtil from '../util/graphic'; import * as layoutUtil from '../util/layout'; import {parsePercent} from '../util/number'; +import { ComponentOption, BoxLayoutOptionMixin, Dictionary, ZRStyleProps, OptionId } from '../util/types'; +import ComponentModel from '../model/Component'; +import Element from 'zrender/src/Element'; +import Displayable from 'zrender/src/graphic/Displayable'; +import { PathProps } from 'zrender/src/graphic/Path'; +import { ImageStyleProps } from 'zrender/src/graphic/Image'; +import GlobalModel from '../model/Global'; +import ComponentView from '../view/Component'; +import ExtensionAPI from '../ExtensionAPI'; +import { getECData } from '../util/innerStore'; + + +const TRANSFORM_PROPS = { +x: 1, +y: 1, +scaleX: 1, +scaleY: 1, +originX: 1, +originY: 1, +rotation: 1 +} as const; +type TransformProp = keyof typeof TRANSFORM_PROPS; + +interface GraphicComponentBaseElementOption extends +Partial>, +/** + * left/right/top/bottom: (like 12, '22%', 'center', default undefined) + * If left/rigth is set, shape.x/shape.cx/position will not be used. + * If top/bottom is set, shape.y/shape.cy/position will not be used. + * This mechanism is useful when you want to position a group/element + * against the right side or the center of this container. + */ +Partial> { + +/** + * element type, mandatory. + */ +type: string; + +id?: OptionId; + +// Only internal usage. Use specified value does NOT make sense. +parentId?: OptionId; +parentOption: GraphicComponentElementOption; +children: GraphicComponentElementOption[]; +hv: [boolean, boolean]; + +/** + * bounding: (enum: 'all' (default) | 'raw') + * Specify how to calculate boundingRect when locating. + * 'all': Get uioned and transformed boundingRect + * from both itself and its descendants. + * This mode simplies confining a group of elements in the bounding + * of their ancester container (e.g., using 'right: 0'). + * 'raw': Only use the boundingRect of itself and before transformed. + * This mode is similar to css behavior, which is useful when you + * want an element to be able to overflow its container. (Consider + * a rotated circle needs to be located in a corner.) + */ +bounding?: 'all' + +/** + * info: custom info. enables user to mount some info on elements and use them + * in event handlers. Update them only when user specified, otherwise, remain. + */ +info?: GraphicExtraElementInfo; + +// TODO: textContent, textConfig ? +// `false` means remove the textContent ??? +// textContent?: CustomTextOption | false; +// textConfig?: + +$action?: 'merge' | 'replace' | 'remove'; +}; +interface GraphicComponentDisplayableOption extends +GraphicComponentBaseElementOption, +Partial> { + +style?: ZRStyleProps; + +// TODO: states? +// emphasis?: GraphicComponentDisplayableOptionOnState; +// blur?: GraphicComponentDisplayableOptionOnState; +// select?: GraphicComponentDisplayableOptionOnState; +} +// TODO: states? +// interface GraphicComponentDisplayableOptionOnState extends Partial> { +// style?: ZRStyleProps; +// } +interface GraphicComponentGroupOption extends GraphicComponentBaseElementOption { +type: 'group'; + +/** + * width/height: (can only be pixel value, default 0) + * Only be used to specify contianer(group) size, if needed. And + * can not be percentage value (like '33%'). See the reason in the + * layout algorithm below. + */ +width?: number; +height?: number; + +// TODO: Can only set focus, blur on the root element. +// children: Omit[]; +children: GraphicComponentElementOption[]; +} +interface GraphicComponentZRPathOption extends GraphicComponentDisplayableOption { +shape?: PathProps['shape']; +} +interface GraphicComponentImageOption extends GraphicComponentDisplayableOption { +type: 'image'; +style?:
[incubator-echarts] 02/05: fix: [graphic component] support textContent.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit 98d4e7b9d549cd8fa359719fc5fc92cd7b96377d Author: 100pah AuthorDate: Tue Oct 27 17:21:37 2020 +0800 fix: [graphic component] support textContent. --- src/component/graphic.ts | 67 +++- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index fd6ac7d..c8e7c6e 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -27,7 +27,7 @@ import * as layoutUtil from '../util/layout'; import {parsePercent} from '../util/number'; import { ComponentOption, BoxLayoutOptionMixin, Dictionary, ZRStyleProps, OptionId } from '../util/types'; import ComponentModel from '../model/Component'; -import Element from 'zrender/src/Element'; +import Element, { ElementTextConfig } from 'zrender/src/Element'; import Displayable from 'zrender/src/graphic/Displayable'; import { PathProps } from 'zrender/src/graphic/Path'; import { ImageStyleProps } from 'zrender/src/graphic/Image'; @@ -35,6 +35,7 @@ import GlobalModel from '../model/Global'; import ComponentView from '../view/Component'; import ExtensionAPI from '../ExtensionAPI'; import { getECData } from '../util/innerStore'; +import { TextStyleProps, TextProps } from 'zrender/src/graphic/Text'; const TRANSFORM_PROPS = { @@ -115,10 +116,8 @@ interface GraphicComponentBaseElementOption extends */ info?: GraphicExtraElementInfo; -// TODO: textContent, textConfig ? -// `false` means remove the textContent ??? -// textContent?: CustomTextOption | false; -// textConfig?: +textContent?: GraphicComponentTextOption; +textConfig?: ElementTextConfig; $action?: 'merge' | 'replace' | 'remove'; }; @@ -170,8 +169,10 @@ interface GraphicComponentImageOption extends GraphicComponentDisplayableOption // interface GraphicComponentImageOptionOnState extends GraphicComponentDisplayableOptionOnState { // style?: ImageStyleProps; // } -interface GraphicComponentTextOption extends GraphicComponentDisplayableOption { +interface GraphicComponentTextOption +extends Omit { type: 'text'; +style?: TextStyleProps; } type GraphicComponentElementOption = GraphicComponentZRPathOption @@ -371,11 +372,12 @@ class GraphicComponentModel extends ComponentModel { } } +ComponentModel.registerClass(GraphicComponentModel); + // // View // -// eslint-disable-next-line @typescript-eslint/no-unused-vars class GraphicComponentView extends ComponentView { static type = 'graphic'; @@ -424,9 +426,8 @@ class GraphicComponentView extends ComponentView { // Top-down tranverse to assign graphic settings to each elements. zrUtil.each(elOptionsToUpdate, function (elOption) { -const $action = elOption.$action; const id = modelUtil.convertOptionIdName(elOption.id, null); -const existEl = id != null ? elMap.get(id) : null; +const elExisting = id != null ? elMap.get(id) : null; const parentId = modelUtil.convertOptionIdName(elOption.parentId, null); const targetElParent = (parentId != null ? elMap.get(parentId) : rootGroup) as graphicUtil.Group; @@ -448,31 +449,46 @@ class GraphicComponentView extends ComponentView { ); } +const textContentOption = (elOption as GraphicComponentZRPathOption).textContent; // Remove unnecessary props to avoid potential problems. const elOptionCleaned = getCleanedElOption(elOption); // For simple, do not support parent change, otherwise reorder is needed. if (__DEV__) { -existEl && zrUtil.assert( -targetElParent === existEl.parent, +elExisting && zrUtil.assert( +targetElParent === elExisting.parent, 'Changing parent is not supported.' ); } -if (!$action || $action === 'merge') { -existEl -? existEl.attr(elOptionCleaned) +const $action = elOption.$action || 'merge'; +if ($action === 'merge') { +elExisting +? elExisting.attr(elOptionCleaned) : createEl(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'replace') { -removeEl(existEl, elMap); +removeEl(elExisting, elMap); createEl(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'remove') { -removeEl(existEl, elMap); +removeEl(elExisting, elMap); }
[incubator-echarts] 02/05: fix: [graphic component] support textContent.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit 98d4e7b9d549cd8fa359719fc5fc92cd7b96377d Author: 100pah AuthorDate: Tue Oct 27 17:21:37 2020 +0800 fix: [graphic component] support textContent. --- src/component/graphic.ts | 67 +++- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index fd6ac7d..c8e7c6e 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -27,7 +27,7 @@ import * as layoutUtil from '../util/layout'; import {parsePercent} from '../util/number'; import { ComponentOption, BoxLayoutOptionMixin, Dictionary, ZRStyleProps, OptionId } from '../util/types'; import ComponentModel from '../model/Component'; -import Element from 'zrender/src/Element'; +import Element, { ElementTextConfig } from 'zrender/src/Element'; import Displayable from 'zrender/src/graphic/Displayable'; import { PathProps } from 'zrender/src/graphic/Path'; import { ImageStyleProps } from 'zrender/src/graphic/Image'; @@ -35,6 +35,7 @@ import GlobalModel from '../model/Global'; import ComponentView from '../view/Component'; import ExtensionAPI from '../ExtensionAPI'; import { getECData } from '../util/innerStore'; +import { TextStyleProps, TextProps } from 'zrender/src/graphic/Text'; const TRANSFORM_PROPS = { @@ -115,10 +116,8 @@ interface GraphicComponentBaseElementOption extends */ info?: GraphicExtraElementInfo; -// TODO: textContent, textConfig ? -// `false` means remove the textContent ??? -// textContent?: CustomTextOption | false; -// textConfig?: +textContent?: GraphicComponentTextOption; +textConfig?: ElementTextConfig; $action?: 'merge' | 'replace' | 'remove'; }; @@ -170,8 +169,10 @@ interface GraphicComponentImageOption extends GraphicComponentDisplayableOption // interface GraphicComponentImageOptionOnState extends GraphicComponentDisplayableOptionOnState { // style?: ImageStyleProps; // } -interface GraphicComponentTextOption extends GraphicComponentDisplayableOption { +interface GraphicComponentTextOption +extends Omit { type: 'text'; +style?: TextStyleProps; } type GraphicComponentElementOption = GraphicComponentZRPathOption @@ -371,11 +372,12 @@ class GraphicComponentModel extends ComponentModel { } } +ComponentModel.registerClass(GraphicComponentModel); + // // View // -// eslint-disable-next-line @typescript-eslint/no-unused-vars class GraphicComponentView extends ComponentView { static type = 'graphic'; @@ -424,9 +426,8 @@ class GraphicComponentView extends ComponentView { // Top-down tranverse to assign graphic settings to each elements. zrUtil.each(elOptionsToUpdate, function (elOption) { -const $action = elOption.$action; const id = modelUtil.convertOptionIdName(elOption.id, null); -const existEl = id != null ? elMap.get(id) : null; +const elExisting = id != null ? elMap.get(id) : null; const parentId = modelUtil.convertOptionIdName(elOption.parentId, null); const targetElParent = (parentId != null ? elMap.get(parentId) : rootGroup) as graphicUtil.Group; @@ -448,31 +449,46 @@ class GraphicComponentView extends ComponentView { ); } +const textContentOption = (elOption as GraphicComponentZRPathOption).textContent; // Remove unnecessary props to avoid potential problems. const elOptionCleaned = getCleanedElOption(elOption); // For simple, do not support parent change, otherwise reorder is needed. if (__DEV__) { -existEl && zrUtil.assert( -targetElParent === existEl.parent, +elExisting && zrUtil.assert( +targetElParent === elExisting.parent, 'Changing parent is not supported.' ); } -if (!$action || $action === 'merge') { -existEl -? existEl.attr(elOptionCleaned) +const $action = elOption.$action || 'merge'; +if ($action === 'merge') { +elExisting +? elExisting.attr(elOptionCleaned) : createEl(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'replace') { -removeEl(existEl, elMap); +removeEl(elExisting, elMap); createEl(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'remove') { -removeEl(existEl, elMap); +removeEl(elExisting, elMap); }
[incubator-echarts] 04/05: fix: [graphic component] compat legacy style.
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git commit ec5bcf444f0338c3fe9ac8b76701e464b93e2c86 Author: 100pah AuthorDate: Wed Oct 28 03:10:57 2020 +0800 fix: [graphic component] compat legacy style. --- src/component/graphic.ts | 19 - test/graphic-cases.html | 202 +++ 2 files changed, 219 insertions(+), 2 deletions(-) diff --git a/src/component/graphic.ts b/src/component/graphic.ts index 04beade..909976e 100644 --- a/src/component/graphic.ts +++ b/src/component/graphic.ts @@ -36,6 +36,7 @@ import ComponentView from '../view/Component'; import ExtensionAPI from '../ExtensionAPI'; import { getECData } from '../util/innerStore'; import { TextStyleProps } from 'zrender/src/graphic/Text'; +import { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../util/styleCompat'; const TRANSFORM_PROPS = { @@ -436,8 +437,9 @@ class GraphicComponentView extends ComponentView { const parentId = modelUtil.convertOptionIdName(elOption.parentId, null); const targetElParent = (parentId != null ? elMap.get(parentId) : rootGroup) as graphicUtil.Group; +const elType = elOption.type; const elOptionStyle = (elOption as GraphicComponentDisplayableOption).style; -if (elOption.type === 'text' && elOptionStyle) { +if (elType === 'text' && elOptionStyle) { // In top/bottom mode, textVerticalAlign should not be used, which cause // inaccurately locating. if (elOption.hv && elOption.hv[1]) { @@ -448,7 +450,20 @@ class GraphicComponentView extends ComponentView { } } -const textContentOption = (elOption as GraphicComponentZRPathOption).textContent; +let textContentOption = (elOption as GraphicComponentZRPathOption).textContent; +let textConfig = (elOption as GraphicComponentZRPathOption).textConfig; +if (elOptionStyle +&& isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption) +) { +const convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true); +if (!textConfig && convertResult.textConfig) { +textConfig = (elOption as GraphicComponentZRPathOption).textConfig = convertResult.textConfig; +} +if (!textContentOption && convertResult.textContent) { +textContentOption = convertResult.textContent; +} +} + // Remove unnecessary props to avoid potential problems. const elOptionCleaned = getCleanedElOption(elOption); diff --git a/test/graphic-cases.html b/test/graphic-cases.html new file mode 100644 index 000..7b4b1c4 --- /dev/null +++ b/test/graphic-cases.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +require(['echarts'/*, 'map/js/china' */], function (echarts) { +var option; +// $.getJSON('./data/nutrients.json', function (data) {}); + + +const imageURI = 'data:image/png;base64,iVBORw0KGgoNSUhEUgAAANwAAADcCAYbWs+BBmJLR0QA/wD/AP+gvaeTCXBIWXMAAAsTAAALEwEAmpwYB3RJTUUH4gIUARQAHY8+4wAAApBJREFUeNrt3cFqAjEUhlEjvv8rXzciiiBGk/He5JxdN2U649dY+KmnEwAv2uMXEeGOwERntwAEB4IDBAeCAwQHggPBAYIDwQGCA8GB4ADBgeAAwYHgAMGB4EBwgOCgpkuKq2it/r8Li2hbvGKqP6s/PycnHHv9YvSWEgQHCA4EBwgOBAeCAwQHggMEByXM+QRUE6D3suwuPafDn5MTDg50KXnVPSdxa54y/oYDwQGCA8EBggPBAYIDwYHggBE+X5rY3Y3Tey97Nn2eU+rnlGfaZa6Ft5SA4EBwgOBAcCA4QHAgOEBwIDjg [...] + + +option = { +graphic: [{ +type: 'circle', +x: 100, +y: 50, +shape: { +cx: 0, +cy: 0, +r: 50 +}, +style: { +fill: 'orange' +}, +textContent: { +style: { +text: 'x: 100, y: 50\nposition: bottom', +fill: 'blue' +} +}, +textConfig: { +position: 'bottom' +} +}, { +type: 'rect', +x: 200, +y: 0, +scaleX: 10, +scaleY: 20, +shape: { +x: 0, +y: 0, +width: 5, +height: 5 +}, +
[incubator-echarts] branch next updated (3e7bdc3 -> a0fd0b7)
This is an automated email from the ASF dual-hosted git repository. sushuang pushed a change to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git. from 3e7bdc3 rebuild: 5.0.0-beta.2 new 23a809d ts: add type to graphic component. new 98d4e7b fix: [graphic component] support textContent. new 2f5febe test: fix test of graphic component. new ec5bcf4 fix: [graphic component] compat legacy style. new a0fd0b7 Merge branch 'next' of github.com:apache/incubator-echarts into next The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: dist/echarts.js | 142239 +--- dist/echarts.js.map | 2 +- package-lock.json| 5153 +- package.json | 4 +- src/component/graphic.ts |543 +- src/option.ts| 2 + src/util/layout.ts | 2 +- test/graphic-cases.html |202 + test/ut/jest.config.js | 2 +- test/ut/spec/component/graphic/setOption.test.ts |534 +- 10 files changed, 67756 insertions(+), 80927 deletions(-) create mode 100644 test/graphic-cases.html - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] genggs opened a new issue #13494: 折线图图例中的图标,如何能去掉两边的横线
genggs opened a new issue #13494: URL: https://github.com/apache/incubator-echarts/issues/13494 如下图,谢谢 ![Image 142](https://user-images.githubusercontent.com/11642621/97381497-2b2f0f00-1904-11eb-9196-cf5ffa27db66.png) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] closed issue #13494: 折线图图例中的图标,如何能去掉两边的横线
echarts-bot[bot] closed issue #13494: URL: https://github.com/apache/incubator-echarts/issues/13494 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13494: 折线图图例中的图标,如何能去掉两边的横线
echarts-bot[bot] commented on issue #13494: URL: https://github.com/apache/incubator-echarts/issues/13494#issuecomment-717646197 This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again. 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 如果您愿意,请使用 issue 模板重新创建 issue。 如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] branch master updated: fix: fix the logic of `isCommiter`.
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git The following commit(s) were added to refs/heads/master by this push: new ea208de fix: fix the logic of `isCommiter`. ea208de is described below commit ea208debfd5f3dc12309924895119287a800147e Author: plainheart AuthorDate: Wed Oct 28 10:54:09 2020 +0800 fix: fix the logic of `isCommiter`. --- index.js | 15 +++ src/coreCommitters.js | 7 ++- src/issue.js | 5 - src/text.js | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index f9e2462..e5af947 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const { isCoreCommitter } = require('./src/coreCommitters'); +const { isCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -74,7 +74,7 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (isCoreCommitter(commenter)) { +if (isCommitter(context.payload.comment.author_association, commenter) && !isCommenterAuthor) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for: community'); } @@ -89,7 +89,10 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -const isCore = isCoreCommitter(context.payload.pull_request.user.login); +const isCore = isCommitter( +context.payload.pull_request.author_association, +context.payload.pull_request.user.login +); let commentText = isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED; @@ -152,7 +155,7 @@ module.exports = app => { app.on(['pull_request_review.submitted'], async context => { if (context.payload.review.state === 'changes_requested' -&& isCoreCommitter(context.payload.review.user.login) +&& isCommitter(context.payload.review.author_association, context.payload.review.user.login) ) { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: revision needed'] @@ -194,7 +197,3 @@ function commentIssue(context, commentText) { function replaceAll(str, search, replacement) { return str.replace(new RegExp(search, 'g'), replacement); } - -function isCommitter(auth) { -return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER'; -} diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 75dcc9a..7520cb8 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -23,7 +23,12 @@ function isCoreCommitter(user) { return committers.indexOf(user) > -1; } +function isCommitter(auth, user) { +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || isCoreCommitter(user); +} + module.exports = { getCoreCommitters, -isCoreCommitter +isCoreCommitter, +isCommitter }; diff --git a/src/issue.js b/src/issue.js index 3fa2d98..efcbe60 100644 --- a/src/issue.js +++ b/src/issue.js @@ -1,4 +1,5 @@ const text = require('./text'); +const { isCommitter } = require('./coreCommitters'); class Issue { constructor(context) { @@ -9,7 +10,9 @@ class Issue { this.addLabels = []; this.removeLabel = null; -if (this.isUsingTemplate()) { +// if author is committer, do not check if using template +const isCore = isCommitter(this.issue.author_association, this.issue.user.login); +if (isCore || this.isUsingTemplate()) { this.init(); } else { diff --git a/src/text.js b/src/text.js index 8febc54..343b194 100644 --- a/src/text.js +++ b/src/text.js @@ -12,12 +12,12 @@ If you think you have already made your point clear without the template, or you 如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = -`Hi! We\'ve received your issue and please be patient to get responded. +`Hi! We've received your issue and please be patient to get responded. The average response time is expected to be within one day for weekdays. In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer. -If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org. Please attach the issue link if it's a technical questions. +If you don't get helped for a long time (over a week) or
[GitHub] [incubator-echarts] plainheart commented on issue #13494: 折线图图例中的图标,如何能去掉两边的横线
plainheart commented on issue #13494: URL: https://github.com/apache/incubator-echarts/issues/13494#issuecomment-717664173 设置 `legend.icon` 为 `emptyCircle` 即可。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] zqmhub opened a new issue #13495: 如何设置X轴的字间距
zqmhub opened a new issue #13495: URL: https://github.com/apache/incubator-echarts/issues/13495 如何设置X轴的字间距 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13495: 如何设置X轴的字间距
echarts-bot[bot] commented on issue #13495: URL: https://github.com/apache/incubator-echarts/issues/13495#issuecomment-717680211 This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again. 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 如果您愿意,请使用 issue 模板重新创建 issue。 如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] closed issue #13495: 如何设置X轴的字间距
echarts-bot[bot] closed issue #13495: URL: https://github.com/apache/incubator-echarts/issues/13495 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-examples] branch next updated: improve some chart examples
This is an automated email from the ASF dual-hosted git repository. wangdd pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git The following commit(s) were added to refs/heads/next by this push: new a2521a7 improve some chart examples a2521a7 is described below commit a2521a7a1f0f1c14a11158539936ca61efe5cda1 Author: Wdingding AuthorDate: Wed Oct 28 11:57:15 2020 +0800 improve some chart examples --- public/data/bubble-gradient.js | 13 ++--- public/data/calendar-simple.js | 1 + public/data/line-graphic.js| 5 +++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/public/data/bubble-gradient.js b/public/data/bubble-gradient.js index 52ed5d7..9ab5549 100644 --- a/public/data/bubble-gradient.js +++ b/public/data/bubble-gradient.js @@ -2,7 +2,7 @@ title: Bubble Chart category: scatter titleCN: 气泡图 -difficulty: 1 +difficulty: 6 */ var data = [ @@ -19,12 +19,19 @@ option = { color: '#cdd0d5' }]), title: { -text: '1990 与 2015 年各国家人均寿命与 GDP' +text: '1990 与 2015 年各国家人均寿命与 GDP' , +left: '5%', +top: '3%' }, legend: { -right: 10, +right: '10%', +top: '3%', data: ['1990', '2015'] }, +grid: { +left: '8%', +top: '10%' +}, xAxis: { splitLine: { lineStyle: { diff --git a/public/data/calendar-simple.js b/public/data/calendar-simple.js index 4e557e9..0d628bb 100644 --- a/public/data/calendar-simple.js +++ b/public/data/calendar-simple.js @@ -2,6 +2,7 @@ title: Simple Calendar titleCN: 基础日历图 category: calendar +difficulty: 0 */ function getVirtulData(year) { diff --git a/public/data/line-graphic.js b/public/data/line-graphic.js index 6180a65..dc61eb6 100644 --- a/public/data/line-graphic.js +++ b/public/data/line-graphic.js @@ -2,6 +2,7 @@ title: Custom Graphic Component titleCN: 自定义图形组件 category: line +difficulty: 9 */ option = { @@ -62,7 +63,7 @@ option = { z: 100, style: { fill: '#fff', -text: 'ECHARTS BAR CHART', +text: 'ECHARTS LINE CHART', font: 'bold 26px sans-serif' } } @@ -115,7 +116,7 @@ option = { series: [ { name: '高度(km)与气温(°C)变化关系', -type: 'bar', +type: 'line', smooth: true, barCategoryGap: 25, data:[15, -50, -56.5, -46.5, -22.1, -2.5, -27.7, -55.7, -76.5] - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] susiwen8 edited a comment on pull request #13489: feat(tooltip): added marker options. close #13413
susiwen8 edited a comment on pull request #13489: URL: https://github.com/apache/incubator-echarts/pull/13489#issuecomment-717645383 Hi @WillPower98 package-lock.json also doesn''t need to commit. Please be follow code style guide, run `npm rum lint` before commit test case still missing This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] susiwen8 commented on pull request #13489: feat(tooltip): added marker options. close #13413
susiwen8 commented on pull request #13489: URL: https://github.com/apache/incubator-echarts/pull/13489#issuecomment-717645383 Hi @WillPower98 package-lock.json also doesn''t need to commit. Please be follow code style guide, run `npm rum lint` before commit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] branch master updated: fix: fix the logic of `isCommiter`.
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git The following commit(s) were added to refs/heads/master by this push: new ea208de fix: fix the logic of `isCommiter`. ea208de is described below commit ea208debfd5f3dc12309924895119287a800147e Author: plainheart AuthorDate: Wed Oct 28 10:54:09 2020 +0800 fix: fix the logic of `isCommiter`. --- index.js | 15 +++ src/coreCommitters.js | 7 ++- src/issue.js | 5 - src/text.js | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index f9e2462..e5af947 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const { isCoreCommitter } = require('./src/coreCommitters'); +const { isCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -74,7 +74,7 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (isCoreCommitter(commenter)) { +if (isCommitter(context.payload.comment.author_association, commenter) && !isCommenterAuthor) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for: community'); } @@ -89,7 +89,10 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -const isCore = isCoreCommitter(context.payload.pull_request.user.login); +const isCore = isCommitter( +context.payload.pull_request.author_association, +context.payload.pull_request.user.login +); let commentText = isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED; @@ -152,7 +155,7 @@ module.exports = app => { app.on(['pull_request_review.submitted'], async context => { if (context.payload.review.state === 'changes_requested' -&& isCoreCommitter(context.payload.review.user.login) +&& isCommitter(context.payload.review.author_association, context.payload.review.user.login) ) { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: revision needed'] @@ -194,7 +197,3 @@ function commentIssue(context, commentText) { function replaceAll(str, search, replacement) { return str.replace(new RegExp(search, 'g'), replacement); } - -function isCommitter(auth) { -return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER'; -} diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 75dcc9a..7520cb8 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -23,7 +23,12 @@ function isCoreCommitter(user) { return committers.indexOf(user) > -1; } +function isCommitter(auth, user) { +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || isCoreCommitter(user); +} + module.exports = { getCoreCommitters, -isCoreCommitter +isCoreCommitter, +isCommitter }; diff --git a/src/issue.js b/src/issue.js index 3fa2d98..efcbe60 100644 --- a/src/issue.js +++ b/src/issue.js @@ -1,4 +1,5 @@ const text = require('./text'); +const { isCommitter } = require('./coreCommitters'); class Issue { constructor(context) { @@ -9,7 +10,9 @@ class Issue { this.addLabels = []; this.removeLabel = null; -if (this.isUsingTemplate()) { +// if author is committer, do not check if using template +const isCore = isCommitter(this.issue.author_association, this.issue.user.login); +if (isCore || this.isUsingTemplate()) { this.init(); } else { diff --git a/src/text.js b/src/text.js index 8febc54..343b194 100644 --- a/src/text.js +++ b/src/text.js @@ -12,12 +12,12 @@ If you think you have already made your point clear without the template, or you 如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = -`Hi! We\'ve received your issue and please be patient to get responded. +`Hi! We've received your issue and please be patient to get responded. The average response time is expected to be within one day for weekdays. In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer. -If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org. Please attach the issue link if it's a technical questions. +If you don't get helped for a long time (over a week) or
[GitHub] [incubator-echarts] Ovilia closed issue #13447: show "Cannot read property 'coord' of undefined" error when I use "line" and visualMap
Ovilia closed issue #13447: URL: https://github.com/apache/incubator-echarts/issues/13447 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] genggs commented on issue #13494: 折线图图例中的图标,如何能去掉两边的横线
genggs commented on issue #13494: URL: https://github.com/apache/incubator-echarts/issues/13494#issuecomment-717667647 收到,非常感谢 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] maicWorkGithub opened a new issue #11855: 打包一个支持 ES6 import 的 build
maicWorkGithub opened a new issue #11855: URL: https://github.com/apache/incubator-echarts/issues/11855 ### What problem does this feature solve? 可以在较新的浏览器里使用import ECharts from './echarts.min' ### What does the proposed API look like? 可以在较新的浏览器里使用import ECharts from './echarts.min' This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] WillPower98 commented on pull request #13489: feat(tooltip): added marker options. close #13413
WillPower98 commented on pull request #13489: URL: https://github.com/apache/incubator-echarts/pull/13489#issuecomment-717620340 Hey I made changes is it possible u can merge. ty. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] i700S commented on issue #13458: 地理实例,没有JSON文件
i700S commented on issue #13458: URL: https://github.com/apache/incubator-echarts/issues/13458#issuecomment-717667055 > `console.log(ROOT_PATH + '/data/asset/data/lines-bus.json')` 就可以看到这个文件地址 Tank you! :D 多谢! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 08/32: bot should not check template if an issue is reopened
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit f147289aa7388180091956100f30a8098b130359 Author: Ovilia AuthorDate: Fri Aug 30 11:18:47 2019 +0800 bot should not check template if an issue is reopened --- index.js| 9 ++--- src/text.js | 6 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 9b876c9..bb6c48d 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const coreCommitters = require('./src/coreCommitters'); const {LABEL_HOWTO, NOT_USING_TEMPLATE, INACTIVE_ISSUE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.reopened'], async context => { +app.on(['issues.opened'], async context => { const issue = new Issue(context); // Ignore comment because it will commented when adding invalid label @@ -23,12 +23,7 @@ module.exports = app => { })) : Promise.resolve(); -if (issue.isUsingTemplate()) { -return Promise.all([comment, addLabels, removeLabels]); -} -else { -return Promise.all([comment, addLabels, removeLabels]); -} +return Promise.all([comment, addLabels, removeLabels]); }); app.on('issues.labeled', async context => { diff --git a/src/text.js b/src/text.js index 98a445b..fac39dc 100644 --- a/src/text.js +++ b/src/text.js @@ -3,9 +3,13 @@ const NOT_USING_TEMPLATE = Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. +If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again. + 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 -如果您愿意,可以请使用 issue 模板重新创建 issue。`; +如果您愿意,可以请使用 issue 模板重新创建 issue。 + +如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = `Hi! We\'ve received your issue and please be patient to get responded. - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] branch master updated: fix: use `[x]` but not `[-]` to check if checkbox exists and is checked.
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git The following commit(s) were added to refs/heads/master by this push: new 9bc671c fix: use `[x]` but not `[-]` to check if checkbox exists and is checked. new f5cc82c Merge pull request #8 from plainheart/fix-checkbox 9bc671c is described below commit 9bc671c013440af8314de3007d7e28a61185f703 Author: plainheart AuthorDate: Thu Sep 3 09:09:24 2020 +0800 fix: use `[x]` but not `[-]` to check if checkbox exists and is checked. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 71e158e..ed40ec3 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ module.exports = app => { labelList.push('PR: author is committer'); } const content = context.payload.pull_request.body; -if (content && content.indexOf('[-] The API has been changed.') > -1) { +if (content && content.indexOf('[x] The API has been changed.') > -1) { labelList.push('PR: awaiting doc'); commentText += '\n\n' + text.PR_AWAITING_DOC; } @@ -118,7 +118,7 @@ module.exports = app => { app.on(['pull_request.edited'], async context => { const content = context.payload.pull_request.body; -if (content && content.indexOf('[-] The API has been changed.') > -1) { +if (content && content.indexOf('[x] The API has been changed.') > -1) { return context.github.issues.addLabels(context.issue({ labels: ['PR: awaiting doc'] })); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 23/32: feat: change jsfiddle to codepen
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 468891a78c5318f260101d61794ede0ac582a72b Author: Ovilia AuthorDate: Wed Apr 29 17:23:54 2020 +0800 feat: change jsfiddle to codepen --- src/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.js b/src/text.js index 3d20b05..9d13778 100644 --- a/src/text.js +++ b/src/text.js @@ -40,7 +40,7 @@ AT_ISSUE_AUTHOR Would you like to debug it by yourself? This is a quicker way to Please have a look at [How to debug ECharts](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 邏`; const MISSING_DEMO = -`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.`; +`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://gallery.echartsjs.com/editor.html.`; const ISSUE_TAGGED_PRIORITY_HIGH = `This issue is labeled with \`priority: high\`, which means it's a frequently asked problem and we will fix it ASAP.`; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 25/32: update committers
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 0bb310ea9085dd391e2960bae7ad365e17ce9f39 Author: Ovilia AuthorDate: Thu Aug 6 11:00:18 2020 +0800 update committers --- index.js | 8 +--- src/coreCommitters.js | 7 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 0563fc7..542578d 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); +const isCoreCommitter = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -88,13 +89,14 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -const auth = context.payload.pull_request.author_association; +// const auth = context.payload.pull_request.author_association; +const isCore = isCoreCommitter(context.payload.issue.user.login); const comment = context.github.issues.createComment(context.issue({ -body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED +body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED })); const labelList = ['PR: awaiting review']; -if (isCommitter(auth)) { +if (isCore) { labelList.push('PR: author is committer'); } const addLabel = context.github.issues.addLabels(context.issue({ diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 7fb05cb..75dcc9a 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -3,11 +3,16 @@ const committers = [ '100pah', 'Ovilia', 'deqingli', +'Wdingding', 'susiwen8', 'cuijian-dexter', 'SnailSword', 'plainheart', -'wf123537200' +'wf123537200', +'yufeng04', +'chfw', +'alex2wong', +'ClemMakesApps' ]; function getCoreCommitters() { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 02/32: feat: close issue, comment, add labels
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit c2db0ff40e4a97bf80381477e4038ed91f008c12 Author: Ovilia AuthorDate: Tue Nov 20 14:00:21 2018 +0800 feat: close issue, comment, add labels --- README.md | 15 +- index.js | 47 ++ jest.config.js| 8 - package-lock.json | 847 -- package.json | 43 +- src/index.ts | 15 - src/issue.js | 157 +++ test/fixtures/issues.opened.mine.json | 237 ++ test/index.test.js| 46 ++ test/index.test.ts| 52 --- travis.yml| 6 + tsconfig.json | 25 - 12 files changed, 805 insertions(+), 693 deletions(-) diff --git a/README.md b/README.md index 7fdaca7..85124c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # echarts-robot -> A GitHub App built with [Probot](https://github.com/probot/probot) that ECharts Robot +A robot for ECharts issues. ## Setup @@ -8,19 +8,6 @@ # Install dependencies npm install -# Run typescript -npm run build - # Run the bot npm start ``` - -## Contributing - -If you have suggestions for how echarts-robot could be improved, or want to report a bug, open an issue! We'd love all and any contributions. - -For more, check out the [Contributing Guide](CONTRIBUTING.md). - -## License - -[Apache 2.0](LICENSE) © 2018 Ovilia diff --git a/index.js b/index.js new file mode 100644 index 000..0d42caa --- /dev/null +++ b/index.js @@ -0,0 +1,47 @@ +const Issue = require('./src/issue'); + +module.exports = app => { +app.on(['issues.opened', 'issues.edited'], async context => { +const issue = new Issue(context); + +if (!issue.isUsingTemplate()) { +// Close issue +const comment = context.github.issues.createComment(context.issue({ +body: issue.response +})); + +const close = context.github.issues.edit(context.issue({ +state: 'closed' +})); + +return Promise.all([comment, close]); +} +else { +const addLabels = issue.tags.length +? context.github.issues.addLabels(context.issue({ +labels: issue.tags +})) +: Promise.resolve(); + +const removeLabels = issue.isMeetAllRequires() +? context.github.issues.deleteLabel(context.issue({ +name: 'waiting-for-author' +})) +: context.github.issues.deleteLabel(context.issue({ +name: 'waiting-for-help' +})); +removeLabels.catch(err => { +// Ignore error caused by not existing. +if (err.message !== 'Not Found') { +throw(err); +} +}); + +const comment = context.github.issues.createComment(context.issue({ +body: issue.response +})); + +return Promise.all([addLabels, removeLabels, comment]); +} +}); +} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 0edf48c..000 --- a/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - roots: ['/src/', '/test/'], - transform: { -'^.+\\.tsx?$': 'ts-jest' - }, - testRegex: '(/__tests__/.*|\\.(test|spec))\\.[tj]sx?$', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] -} diff --git a/package-lock.json b/package-lock.json index 6854b11..7310a08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,16 +46,6 @@ "node-fetch": "^2.1.1", "universal-user-agent": "^2.0.0", "url-template": "^2.0.8" - }, - "dependencies": { -"debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz;, - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { -"ms": "^2.1.1" - } -} } }, "@octokit/webhooks": { @@ -65,27 +55,18 @@ "requires": { "buffer-equal-constant-time": "^1.0.1", "debug": "^4.0.0" + }, + "dependencies": { +"debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz;, + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "requires": { +"ms": "^2.1.1" + } +} } }, -"@types/jest": { - "version": "23.3.9", -
[incubator-echarts-bot] 05/32: feat: update for new issue template
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 1c1fd56a52728146cc01062e57c98df3c3f235fc Author: Ovilia AuthorDate: Wed Feb 20 20:16:20 2019 +0800 feat: update for new issue template --- index.js | 103 +++--- src/coreCommitters.js | 4 +- src/issue.js | 150 ++ src/text.js | 59 4 files changed, 162 insertions(+), 154 deletions(-) diff --git a/index.js b/index.js index 338360d..847df80 100644 --- a/index.js +++ b/index.js @@ -1,55 +1,59 @@ const Issue = require('./src/issue'); const coreCommitters = require('./src/coreCommitters'); +const {PR_OPENED, PR_MERGED, PR_NOT_MERGED, LABEL_HOWTO, NOT_USING_TEMPLATE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.edited'], async context => { +app.on(['issues.opened', 'issues.edited', 'issues.reopened'], async context => { const issue = new Issue(context); -if (!issue.isUsingTemplate()) { -// Close issue -const comment = context.github.issues.createComment(context.issue({ -body: issue.response -})); +// Ignore comment because it will commented when adding invalid label +const comment = issue.response === NOT_USING_TEMPLATE +? Promise.resolve() +: commentIssue(context, issue.response); -const close = context.github.issues.edit(context.issue({ -state: 'closed' -})); +const addLabels = issue.addLabels.length +? context.github.issues.addLabels(context.issue({ +labels: issue.addLabels +})) +: Promise.resolve(); -return Promise.all([comment, close]); +const removeLabels = issue.removeLabels.length +? context.github.issues.addLabels(context.issue({ +labels: issue.removeLabels +})) +: Promise.resolve(); + +if (issue.isUsingTemplate()) { +return Promise.all([comment, addLabels, removeLabel]); } else { -const addLabels = issue.tags.length -? context.github.issues.addLabels(context.issue({ -labels: issue.tags -})) -: Promise.resolve(); - -const removeLabel = getRemoveLabel( -context, -issue.isMeetAllRequires() -? 'waiting-for-author' -: 'waiting-for-help' -); +return Promise.all([comment, addLabels, removeLabels]); +} +}); -const comment = context.github.issues.createComment(context.issue({ -body: issue.response -})); +app.on('issues.labeled', async context => { +switch (context.payload.label.name) { +case 'invalid': +return Promise.all([commentIssue(context, NOT_USING_TEMPLATE), closeIssue(context)]); -return Promise.all([addLabels, removeLabel, comment]); +case 'howto': +return Promise.all([commentIssue(context, LABEL_HOWTO), closeIssue(context)]); } }); app.on('issue_comment.created', async context => { const commenter = context.payload.comment.user.login; -let removeLabel, addLabel; -if (coreCommitters.isCoreCommitter(commenter)) { +const isCommenterAuthor = commenter === context.payload.issue.user.login; +let removeLabel; +let addLabel; +if (coreCommitters.isCoreCommitter(commenter) && !isCommenterAuthor) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for-help'); addLabel = context.github.issues.addLabels(context.issue({ labels: ['waiting-for-author'] })); } -else if (commenter === context.payload.issue.user.login) { +else if (isCommenterAuthor) { // New comment from issue author removeLabel = getRemoveLabel(context, 'waiting-for-author'); addLabel = context.github.issues.addLabels(context.issue({ @@ -58,6 +62,27 @@ module.exports = app => { } return Promise.all([removeLabel, addLabel]); }); + +// Pull Requests Not Tested Yet +// app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +// console.log('pull request open'); +// const comment = context.github.issues.createComment(context.issue({ +// body: PR_OPENED +// })); + +// return Promise.all([comment]); +// }); + +// app.on(['pull_request.closed'], async context => { +// console.log('pull
[incubator-echarts-bot] 28/32: fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update).
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 2f2ce155c0c77df6a8e774c37ab7c50758738fdf Author: plainheart AuthorDate: Thu Aug 20 18:25:03 2020 +0800 fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b3858c9..212df55 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const isCoreCommitter = require('./src/coreCommitters'); +const { isCoreCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -157,7 +157,7 @@ function getRemoveLabel(context, name) { } function closeIssue(context) { -const closeIssue = context.github.issues.edit(context.issue({ +const closeIssue = context.github.issues.update(context.issue({ state: 'closed' })); return closeIssue; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 22/32: fix: contributor should not be considered as committer
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit be9ebad0753d4353746ed5af8ba743f8fd5c48f8 Author: Ovilia AuthorDate: Mon Apr 20 09:59:35 2020 +0800 fix: contributor should not be considered as committer --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f93bd41..0563fc7 100644 --- a/index.js +++ b/index.js @@ -173,5 +173,5 @@ function replaceAll(str, search, replacement) { } function isCommitter(auth) { -return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || auth === 'CONTRIBUTOR'; +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER'; } - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 03/32: feat: listen to comments
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 4526a41d164814c17ed4a20e2498d0f24caf4cba Author: Ovilia AuthorDate: Tue Nov 20 16:08:30 2018 +0800 feat: listen to comments --- index.js | 55 ++- src/coreCommitters.js | 19 ++ src/issue.js | 2 +- 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/index.js b/index.js index 0d42caa..338360d 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ const Issue = require('./src/issue'); +const coreCommitters = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened', 'issues.edited'], async context => { @@ -23,25 +24,51 @@ module.exports = app => { })) : Promise.resolve(); -const removeLabels = issue.isMeetAllRequires() -? context.github.issues.deleteLabel(context.issue({ -name: 'waiting-for-author' -})) -: context.github.issues.deleteLabel(context.issue({ -name: 'waiting-for-help' -})); -removeLabels.catch(err => { -// Ignore error caused by not existing. -if (err.message !== 'Not Found') { -throw(err); -} -}); +const removeLabel = getRemoveLabel( +context, +issue.isMeetAllRequires() +? 'waiting-for-author' +: 'waiting-for-help' +); const comment = context.github.issues.createComment(context.issue({ body: issue.response })); -return Promise.all([addLabels, removeLabels, comment]); +return Promise.all([addLabels, removeLabel, comment]); +} +}); + +app.on('issue_comment.created', async context => { +const commenter = context.payload.comment.user.login; +let removeLabel, addLabel; +if (coreCommitters.isCoreCommitter(commenter)) { +// New comment from core committers +removeLabel = getRemoveLabel(context, 'waiting-for-help'); +addLabel = context.github.issues.addLabels(context.issue({ +labels: ['waiting-for-author'] +})); +} +else if (commenter === context.payload.issue.user.login) { +// New comment from issue author +removeLabel = getRemoveLabel(context, 'waiting-for-author'); +addLabel = context.github.issues.addLabels(context.issue({ +labels: ['waiting-for-help'] +})); +} +return Promise.all([removeLabel, addLabel]); +}); +} + +function getRemoveLabel(context, name) { +return context.github.issues.deleteLabel( +context.issue({ +name: name +}) +).catch(err => { +// Ignore error caused by not existing. +if (err.message !== 'Not Found') { +throw(err); } }); } diff --git a/src/coreCommitters.js b/src/coreCommitters.js new file mode 100644 index 000..6d9cf9f --- /dev/null +++ b/src/coreCommitters.js @@ -0,0 +1,19 @@ +const committers = [ +'pissang', +'100pah', +'Ovilia', +'deqingli' +]; + +function getCoreCommitters() { +return committers; +} + +function isCoreCommitter(user) { +return committers.indexOf(user) > -1; +} + +module.exports = { +getCoreCommitters: getCoreCommitters, +isCoreCommitter: isCoreCommitter +}; diff --git a/src/issue.js b/src/issue.js index a8be8f8..73077ff 100644 --- a/src/issue.js +++ b/src/issue.js @@ -150,7 +150,7 @@ class Issue { } _matches(text) { -return this.body.indexOf('- [x] ' + text) > -1; +return this.body.indexOf('- [x] Required: ' + text) > -1; } } - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 20/32: feat: pr label
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 27926dba30a77a7a07bb7123f62bcb1992199514 Author: Ovilia AuthorDate: Mon Feb 17 11:47:52 2020 +0800 feat: pr label --- index.js| 27 --- src/text.js | 4 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index fe0422a..2c51d00 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ const Issue = require('./src/issue'); -const coreCommitters = require('./src/coreCommitters'); const text = require('./src/text'); module.exports = app => { @@ -33,7 +32,6 @@ module.exports = app => { ); }; -// console.log(context.payload); switch (context.payload.label.name) { case 'invalid': return Promise.all([commentIssue(context, text.NOT_USING_TEMPLATE), closeIssue(context)]); @@ -44,6 +42,15 @@ module.exports = app => { case 'inactive': return Promise.all([commentIssue(context, text.INACTIVE_ISSUE), closeIssue(context)]); +case 'missing-demo': +return Promise.all([ +commentIssue(context, replaceAt(text.MISSING_DEMO)), +getRemoveLabel(context, 'waiting-for: community'), +context.github.issues.addLabels(context.issue({ +labels: ['waiting-for: author'] +})) +]); + // case 'waiting-for: author': // return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); @@ -66,9 +73,9 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (coreCommitters.isCoreCommitter(commenter) && !isCommenterAuthor) { +if (isCommitter(context.payload.comment.author_association)) { // New comment from core committers -removeLabel = getRemoveLabel(context, 'waiting-for: help'); +removeLabel = getRemoveLabel(context, 'waiting-for: community'); } else if (isCommenterAuthor) { // New comment from issue author @@ -80,8 +87,7 @@ module.exports = app => { return Promise.all([removeLabel, addLabel]); }); -// Pull Requests Not Tested Yet -app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +app.on(['pull_request.opened'], async context => { const auth = context.payload.pull_request.author_association; const comment = context.github.issues.createComment(context.issue({ body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED @@ -95,8 +101,15 @@ module.exports = app => { labels: labelList })); +return Promise.all([comment, addLabel]); +}); + +app.on(['pull_request.synchronize'], async context => { +const addLabel = context.github.issues.addLabels(context.issue({ +labels: ['PR: awaiting review'] +})); const removeLabel = getRemoveLabel(context, 'PR: revision needed'); -return Promise.all([comment, addLabel, removeLabel]); +return Promise.all([addLabel, removeLabel]); }); app.on(['pull_request.closed'], async context => { diff --git a/src/text.js b/src/text.js index ab01a9a..3d20b05 100644 --- a/src/text.js +++ b/src/text.js @@ -39,6 +39,9 @@ AT_ISSUE_AUTHOR Would you like to debug it by yourself? This is a quicker way to Please have a look at [How to debug ECharts](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 邏`; +const MISSING_DEMO = +`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.`; + const ISSUE_TAGGED_PRIORITY_HIGH = `This issue is labeled with \`priority: high\`, which means it's a frequently asked problem and we will fix it ASAP.`; @@ -76,6 +79,7 @@ module.exports = { NOT_USING_TEMPLATE, ISSUE_CREATED, ISSUE_UPDATED, +MISSING_DEMO, INACTIVE_ISSUE, PR_OPENED, LABEL_HOWTO, - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] branch master updated: fix: use `[x]` but not `[-]` to check if checkbox exists and is checked.
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git The following commit(s) were added to refs/heads/master by this push: new 9bc671c fix: use `[x]` but not `[-]` to check if checkbox exists and is checked. new f5cc82c Merge pull request #8 from plainheart/fix-checkbox 9bc671c is described below commit 9bc671c013440af8314de3007d7e28a61185f703 Author: plainheart AuthorDate: Thu Sep 3 09:09:24 2020 +0800 fix: use `[x]` but not `[-]` to check if checkbox exists and is checked. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 71e158e..ed40ec3 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ module.exports = app => { labelList.push('PR: author is committer'); } const content = context.payload.pull_request.body; -if (content && content.indexOf('[-] The API has been changed.') > -1) { +if (content && content.indexOf('[x] The API has been changed.') > -1) { labelList.push('PR: awaiting doc'); commentText += '\n\n' + text.PR_AWAITING_DOC; } @@ -118,7 +118,7 @@ module.exports = app => { app.on(['pull_request.edited'], async context => { const content = context.payload.pull_request.body; -if (content && content.indexOf('[-] The API has been changed.') > -1) { +if (content && content.indexOf('[x] The API has been changed.') > -1) { return context.github.issues.addLabels(context.issue({ labels: ['PR: awaiting doc'] })); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 17/32: Merge pull request #4 from apache/revert-1-dependabot/npm_and_yarn/js-yaml-3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 64a146d4bc14dfedc5aa0125dcff3f91eb4b8e13 Merge: d7baba9 3be90e7 Author: Ovilia AuthorDate: Mon Nov 4 15:50:12 2019 +0800 Merge pull request #4 from apache/revert-1-dependabot/npm_and_yarn/js-yaml-3.13.1 Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1" package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 10/32: chore(deps): bump js-yaml from 3.12.0 to 3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 384bff138ed0a54b488cbaa7c344560b361882aa Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:34 2019 + chore(deps): bump js-yaml from 3.12.0 to 3.13.1 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..d70d5fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11",
[incubator-echarts-bot] 24/32: update committer
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 5bbfd102dd75b6b563aba5f152f4b48f56c5ad43 Author: Ovilia AuthorDate: Thu Jun 18 13:26:51 2020 +0800 update committer --- src/coreCommitters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 10bf89f..7fb05cb 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -5,7 +5,9 @@ const committers = [ 'deqingli', 'susiwen8', 'cuijian-dexter', -'SnailSword' +'SnailSword', +'plainheart', +'wf123537200' ]; function getCoreCommitters() { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 16/32: Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1"
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 3be90e78add914ea0916688032b831baa6161676 Author: Ovilia AuthorDate: Mon Nov 4 15:49:57 2019 +0800 Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1" --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bad9fc0..96de564 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5065,9 +5065,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz;, - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz;, + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 12/32: chore(deps): bump lodash from 4.17.11 to 4.17.15
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 4536f361cbbe04832e74bb3cc7389c644dfc2037 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:40 2019 + chore(deps): bump lodash from 4.17.11 to 4.17.15 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..bf03d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true,
[incubator-echarts-bot] branch master updated (721cb2e -> 62958eb)
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git. from 721cb2e feat: add "PR: awaiting doc" label if doc changed new cc09b9c fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). new 8f730a6 Merge branch 'master' of https://github.com/apache/incubator-echarts-bot new 127e62e fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some texts. new 62958eb Merge pull request #7 from plainheart/master The 32 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 29/32: Merge branch 'master' of https://github.com/apache/incubator-echarts-bot
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 8f730a6d935e606dd6ea5c7c45fe464dabd66461 Merge: cc09b9c 2f2ce15 Author: plainheart AuthorDate: Fri Aug 21 11:43:32 2020 +0800 Merge branch 'master' of https://github.com/apache/incubator-echarts-bot - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 11/32: chore(deps): bump mixin-deep from 1.3.1 to 1.3.2
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit bf06166bc41cc14b0cf60674f40e0d71d503efcd Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:38 2019 + chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..51093cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev":
[incubator-echarts-bot] 19/32: feat: pull request handling
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit ab6abe3034644b4d5de5331351c3df4919f422d8 Author: Ovilia AuthorDate: Mon Jan 13 19:17:44 2020 +0800 feat: pull request handling --- .gitignore| 2 +- index.js | 73 --- src/coreCommitters.js | 5 +++- src/text.js | 14 +- 4 files changed, 63 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index b8e0d49..990cb14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.env +.env* lib node_modules .DS_Store diff --git a/index.js b/index.js index 48374ca..fe0422a 100644 --- a/index.js +++ b/index.js @@ -44,8 +44,8 @@ module.exports = app => { case 'inactive': return Promise.all([commentIssue(context, text.INACTIVE_ISSUE), closeIssue(context)]); -case 'waiting-for: author': -return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); +// case 'waiting-for: author': +// return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); case 'difficulty: easy': return commentIssue(context, replaceAt(text.ISSUE_TAGGED_EASY)); @@ -56,6 +56,12 @@ module.exports = app => { }); app.on('issue_comment.created', async context => { +const isPr = context.payload.issue.html_url.indexOf('/pull/') > -1; +if (isPr) { +// Do nothing when pr is commented +return; +} + const commenter = context.payload.comment.user.login; const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; @@ -75,25 +81,46 @@ module.exports = app => { }); // Pull Requests Not Tested Yet -// app.on(['pull_request.opened', 'pull_request.reopened'], async context => { -// console.log('pull request open'); -// const comment = context.github.issues.createComment(context.issue({ -// body: text.PR_OPENED -// })); - -// return Promise.all([comment]); -// }); - -// app.on(['pull_request.closed'], async context => { -// console.log('pull request close'); -// console.log(context.payload); -// const isMerged = context.payload['pull_request'].merged; -// const comment = context.github.issues.createComment(context.issue({ -// body: isMerged ? text.PR_MERGED : text.PR_NOT_MERGED -// })); - -// return Promise.all([comment]); -// }); +app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +const auth = context.payload.pull_request.author_association; +const comment = context.github.issues.createComment(context.issue({ +body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED +})); + +const labelList = ['PR: awaiting review']; +if (isCommitter(auth)) { +labelList.push('PR: author is committer'); +} +const addLabel = context.github.issues.addLabels(context.issue({ +labels: labelList +})); + +const removeLabel = getRemoveLabel(context, 'PR: revision needed'); +return Promise.all([comment, addLabel, removeLabel]); +}); + +app.on(['pull_request.closed'], async context => { +const isMerged = context.payload['pull_request'].merged; +if (isMerged) { +const comment = context.github.issues.createComment(context.issue({ +body: text.PR_MERGED +})); +return Promise.all([comment]); +} +}); + +app.on(['pull_request_review.submitted'], async context => { +if (context.payload.review.state === 'changes_requested' +&& isCommitter(context.payload.review.author_association) +) { +const addLabel = context.github.issues.addLabels(context.issue({ +labels: ['PR: revision needed'] +})); + +const removeLabel = getRemoveLabel(context, 'PR: awaiting review'); +return Promise.all([addLabel, removeLabel]); +} +}); } function getRemoveLabel(context, name) { @@ -126,3 +153,7 @@ function commentIssue(context, commentText) { function replaceAll(str, search, replacement) { return str.replace(new RegExp(search, 'g'), replacement); } + +function isCommitter(auth) { +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || auth === 'CONTRIBUTOR'; +} diff --git a/src/coreCommitters.js b/src/coreCommitters.js index c13147e..10bf89f 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -2,7 +2,10 @@ const committers = [ 'pissang', '100pah', 'Ovilia', -'deqingli' +'deqingli', +'susiwen8', +
[incubator-echarts-bot] 26/32: fix: pull request is committer checking
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit a58c2318116c505577d40dcffb9b467a36955b05 Author: Ovilia AuthorDate: Fri Aug 14 13:19:57 2020 +0800 fix: pull request is committer checking --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 542578d..b3858c9 100644 --- a/index.js +++ b/index.js @@ -90,7 +90,7 @@ module.exports = app => { app.on(['pull_request.opened'], async context => { // const auth = context.payload.pull_request.author_association; -const isCore = isCoreCommitter(context.payload.issue.user.login); +const isCore = isCoreCommitter(context.payload.pull_request.user.login); const comment = context.github.issues.createComment(context.issue({ body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED })); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 25/32: update committers
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 0bb310ea9085dd391e2960bae7ad365e17ce9f39 Author: Ovilia AuthorDate: Thu Aug 6 11:00:18 2020 +0800 update committers --- index.js | 8 +--- src/coreCommitters.js | 7 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 0563fc7..542578d 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); +const isCoreCommitter = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -88,13 +89,14 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -const auth = context.payload.pull_request.author_association; +// const auth = context.payload.pull_request.author_association; +const isCore = isCoreCommitter(context.payload.issue.user.login); const comment = context.github.issues.createComment(context.issue({ -body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED +body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED })); const labelList = ['PR: awaiting review']; -if (isCommitter(auth)) { +if (isCore) { labelList.push('PR: author is committer'); } const addLabel = context.github.issues.addLabels(context.issue({ diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 7fb05cb..75dcc9a 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -3,11 +3,16 @@ const committers = [ '100pah', 'Ovilia', 'deqingli', +'Wdingding', 'susiwen8', 'cuijian-dexter', 'SnailSword', 'plainheart', -'wf123537200' +'wf123537200', +'yufeng04', +'chfw', +'alex2wong', +'ClemMakesApps' ]; function getCoreCommitters() { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] branch master updated (721cb2e -> 62958eb)
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git. from 721cb2e feat: add "PR: awaiting doc" label if doc changed new cc09b9c fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). new 8f730a6 Merge branch 'master' of https://github.com/apache/incubator-echarts-bot new 127e62e fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some texts. new 62958eb Merge pull request #7 from plainheart/master The 32 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 31/32: feat: add "PR: awaiting doc" label if doc changed
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 721cb2eb6f32f109402d7295476bc0a7a2958c91 Author: Ovilia AuthorDate: Mon Aug 31 13:47:54 2020 +0800 feat: add "PR: awaiting doc" label if doc changed --- index.js| 28 +--- src/text.js | 4 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 212df55..71e158e 100644 --- a/index.js +++ b/index.js @@ -91,14 +91,24 @@ module.exports = app => { app.on(['pull_request.opened'], async context => { // const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); -const comment = context.github.issues.createComment(context.issue({ -body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED -})); +let commentText = isCore +? text.PR_OPENED_BY_COMMITTER +: text.PR_OPENED; const labelList = ['PR: awaiting review']; if (isCore) { labelList.push('PR: author is committer'); } +const content = context.payload.pull_request.body; +if (content && content.indexOf('[-] The API has been changed.') > -1) { +labelList.push('PR: awaiting doc'); +commentText += '\n\n' + text.PR_AWAITING_DOC; +} + +const comment = context.github.issues.createComment(context.issue({ +body: commentText +})); + const addLabel = context.github.issues.addLabels(context.issue({ labels: labelList })); @@ -106,6 +116,18 @@ module.exports = app => { return Promise.all([comment, addLabel]); }); +app.on(['pull_request.edited'], async context => { +const content = context.payload.pull_request.body; +if (content && content.indexOf('[-] The API has been changed.') > -1) { +return context.github.issues.addLabels(context.issue({ +labels: ['PR: awaiting doc'] +})); +} +else { +return getRemoveLabel(context, 'PR: awaiting doc'); +} +}); + app.on(['pull_request.synchronize'], async context => { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: awaiting review'] diff --git a/src/text.js b/src/text.js index 9d13778..8f0764b 100644 --- a/src/text.js +++ b/src/text.js @@ -54,6 +54,9 @@ const PR_OPENED_BY_COMMITTER = PR_OPENED + ` The pull request is marked to be \`PR: author is committer\` because you are a committer of this project.`; +const PR_AWAITING_DOC = `Document changes are required in this PR. Please also make a PR to [apache/incubator-echarts-doc](https://github.com/apache/incubator-echarts-doc) for document changes. When the doc PR is merged, the maintainers will remove the \`PR: awaiting doc\` label. +`; + const PR_MERGED = `Congratulations! Your PR has been merged. Thanks for your contribution! `; @@ -86,6 +89,7 @@ module.exports = { PR_MERGED, PR_OPENED_BY_COMMITTER, PR_NOT_MERGED, +PR_AWAITING_DOC, ISSUE_TAGGED_WAITING_AUTHOR, ISSUE_TAGGED_EASY, ISSUE_TAGGED_PRIORITY_HIGH - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 27/32: fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update).
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit cc09b9c6266a139c9184fec1f64c08b33bef9a82 Author: plainheart AuthorDate: Thu Aug 20 18:25:03 2020 +0800 fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b3858c9..212df55 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const isCoreCommitter = require('./src/coreCommitters'); +const { isCoreCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -157,7 +157,7 @@ function getRemoveLabel(context, name) { } function closeIssue(context) { -const closeIssue = context.github.issues.edit(context.issue({ +const closeIssue = context.github.issues.update(context.issue({ state: 'closed' })); return closeIssue; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 30/32: fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some tex
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 127e62e8dae5ca7d7126390d7f0d6d32ff87cbf5 Author: plainheart AuthorDate: Tue Aug 25 11:18:05 2020 +0800 fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some texts. --- index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 212df55..6224d0c 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = app => { }); app.on('issues.labeled', async context => { -var replaceAt = function (comment) { +const replaceAt = function (comment) { return replaceAll( comment, 'AT_ISSUE_AUTHOR', @@ -74,7 +74,7 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (isCommitter(context.payload.comment.author_association)) { +if (isCoreCommitter(commenter)) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for: community'); } @@ -89,7 +89,6 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -// const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); const comment = context.github.issues.createComment(context.issue({ body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED @@ -131,7 +130,7 @@ module.exports = app => { app.on(['pull_request_review.submitted'], async context => { if (context.payload.review.state === 'changes_requested' -&& isCommitter(context.payload.review.author_association) +&& isCoreCommitter(context.payload.review.user.login) ) { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: revision needed'] diff --git a/src/text.js b/src/text.js index 9d13778..3615f46 100644 --- a/src/text.js +++ b/src/text.js @@ -7,9 +7,9 @@ If you think you have already made your point clear without the template, or you 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 -如果您愿意,可以请使用 issue 模板重新创建 issue。 +如果您愿意,请使用 issue 模板重新创建 issue。 -如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。`; +如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = `Hi! We\'ve received your issue and please be patient to get responded. @@ -19,7 +19,7 @@ In the meanwhile, please make sure that **you have posted enough image to demo y If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org. Please attach the issue link if it's a technical questions. -If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html). +If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html). Have a nice day! `; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 14/32: Merge pull request #3 from apache/dependabot/npm_and_yarn/lodash-4.17.15
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 075c311e0b6f2236f8d742dd60b89a29f370b558 Merge: 66697c0 4536f36 Author: Ovilia AuthorDate: Thu Sep 26 10:08:25 2019 +0800 Merge pull request #3 from apache/dependabot/npm_and_yarn/lodash-4.17.15 chore(deps): bump lodash from 4.17.11 to 4.17.15 package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 13/32: Merge pull request #2 from apache/dependabot/npm_and_yarn/mixin-deep-1.3.2
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 66697c04888d25ed38749c72ab77584789aa90b0 Merge: 1b3abb0 bf06166 Author: Ovilia AuthorDate: Thu Sep 26 10:08:02 2019 +0800 Merge pull request #2 from apache/dependabot/npm_and_yarn/mixin-deep-1.3.2 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 04/32: chore: add .data for glitch
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 47170c5f3ba78cd47f8a7f7e9ddbaabfe1cdf5c4 Author: Ovilia AuthorDate: Mon Feb 18 15:24:35 2019 +0800 chore: add .data for glitch --- .data/empty | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.data/empty b/.data/empty new file mode 100644 index 000..e69de29 - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 26/32: fix: pull request is committer checking
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit a58c2318116c505577d40dcffb9b467a36955b05 Author: Ovilia AuthorDate: Fri Aug 14 13:19:57 2020 +0800 fix: pull request is committer checking --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 542578d..b3858c9 100644 --- a/index.js +++ b/index.js @@ -90,7 +90,7 @@ module.exports = app => { app.on(['pull_request.opened'], async context => { // const auth = context.payload.pull_request.author_association; -const isCore = isCoreCommitter(context.payload.issue.user.login); +const isCore = isCoreCommitter(context.payload.pull_request.user.login); const comment = context.github.issues.createComment(context.issue({ body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED })); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 15/32: Merge pull request #1 from apache/dependabot/npm_and_yarn/js-yaml-3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit d7baba984a3a0b34c91f25abc2c7050d984844ad Merge: 075c311 384bff1 Author: Ovilia AuthorDate: Thu Sep 26 10:08:41 2019 +0800 Merge pull request #1 from apache/dependabot/npm_and_yarn/js-yaml-3.13.1 chore(deps): bump js-yaml from 3.12.0 to 3.13.1 package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 28/32: fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update).
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 2f2ce155c0c77df6a8e774c37ab7c50758738fdf Author: plainheart AuthorDate: Thu Aug 20 18:25:03 2020 +0800 fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b3858c9..212df55 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const isCoreCommitter = require('./src/coreCommitters'); +const { isCoreCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -157,7 +157,7 @@ function getRemoveLabel(context, name) { } function closeIssue(context) { -const closeIssue = context.github.issues.edit(context.issue({ +const closeIssue = context.github.issues.update(context.issue({ state: 'closed' })); return closeIssue; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 07/32: doc: update issue text, add email info
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 69d7ca14d8d202c40d5990919239bfc976bd1ab0 Author: Ovilia AuthorDate: Thu Aug 22 13:16:13 2019 +0800 doc: update issue text, add email info --- src/text.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/text.js b/src/text.js index 82dc7a0..98a445b 100644 --- a/src/text.js +++ b/src/text.js @@ -13,6 +13,10 @@ The average response time is expected to be within one day for weekdays. In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer. +If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org . + +If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html). + Have a nice day! `; const INACTIVE_ISSUE = @@ -38,7 +42,7 @@ You may send an email to dev-subscr...@echarts.apache.org to subscribe our devel const PR_NOT_MERGED = `I'm sorry your PR didn't get merged. Don't get frustrated. Maybe next time. ` const LABEL_HOWTO = -`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). +`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). You may also send an email about your question to d...@echarts.apache.org if you like. Here's why: - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 02/32: feat: close issue, comment, add labels
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit c2db0ff40e4a97bf80381477e4038ed91f008c12 Author: Ovilia AuthorDate: Tue Nov 20 14:00:21 2018 +0800 feat: close issue, comment, add labels --- README.md | 15 +- index.js | 47 ++ jest.config.js| 8 - package-lock.json | 847 -- package.json | 43 +- src/index.ts | 15 - src/issue.js | 157 +++ test/fixtures/issues.opened.mine.json | 237 ++ test/index.test.js| 46 ++ test/index.test.ts| 52 --- travis.yml| 6 + tsconfig.json | 25 - 12 files changed, 805 insertions(+), 693 deletions(-) diff --git a/README.md b/README.md index 7fdaca7..85124c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # echarts-robot -> A GitHub App built with [Probot](https://github.com/probot/probot) that ECharts Robot +A robot for ECharts issues. ## Setup @@ -8,19 +8,6 @@ # Install dependencies npm install -# Run typescript -npm run build - # Run the bot npm start ``` - -## Contributing - -If you have suggestions for how echarts-robot could be improved, or want to report a bug, open an issue! We'd love all and any contributions. - -For more, check out the [Contributing Guide](CONTRIBUTING.md). - -## License - -[Apache 2.0](LICENSE) © 2018 Ovilia diff --git a/index.js b/index.js new file mode 100644 index 000..0d42caa --- /dev/null +++ b/index.js @@ -0,0 +1,47 @@ +const Issue = require('./src/issue'); + +module.exports = app => { +app.on(['issues.opened', 'issues.edited'], async context => { +const issue = new Issue(context); + +if (!issue.isUsingTemplate()) { +// Close issue +const comment = context.github.issues.createComment(context.issue({ +body: issue.response +})); + +const close = context.github.issues.edit(context.issue({ +state: 'closed' +})); + +return Promise.all([comment, close]); +} +else { +const addLabels = issue.tags.length +? context.github.issues.addLabels(context.issue({ +labels: issue.tags +})) +: Promise.resolve(); + +const removeLabels = issue.isMeetAllRequires() +? context.github.issues.deleteLabel(context.issue({ +name: 'waiting-for-author' +})) +: context.github.issues.deleteLabel(context.issue({ +name: 'waiting-for-help' +})); +removeLabels.catch(err => { +// Ignore error caused by not existing. +if (err.message !== 'Not Found') { +throw(err); +} +}); + +const comment = context.github.issues.createComment(context.issue({ +body: issue.response +})); + +return Promise.all([addLabels, removeLabels, comment]); +} +}); +} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 0edf48c..000 --- a/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - roots: ['/src/', '/test/'], - transform: { -'^.+\\.tsx?$': 'ts-jest' - }, - testRegex: '(/__tests__/.*|\\.(test|spec))\\.[tj]sx?$', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] -} diff --git a/package-lock.json b/package-lock.json index 6854b11..7310a08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,16 +46,6 @@ "node-fetch": "^2.1.1", "universal-user-agent": "^2.0.0", "url-template": "^2.0.8" - }, - "dependencies": { -"debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz;, - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { -"ms": "^2.1.1" - } -} } }, "@octokit/webhooks": { @@ -65,27 +55,18 @@ "requires": { "buffer-equal-constant-time": "^1.0.1", "debug": "^4.0.0" + }, + "dependencies": { +"debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz;, + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "requires": { +"ms": "^2.1.1" + } +} } }, -"@types/jest": { - "version": "23.3.9", -
[incubator-echarts-bot] 14/32: Merge pull request #3 from apache/dependabot/npm_and_yarn/lodash-4.17.15
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 075c311e0b6f2236f8d742dd60b89a29f370b558 Merge: 66697c0 4536f36 Author: Ovilia AuthorDate: Thu Sep 26 10:08:25 2019 +0800 Merge pull request #3 from apache/dependabot/npm_and_yarn/lodash-4.17.15 chore(deps): bump lodash from 4.17.11 to 4.17.15 package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 19/32: feat: pull request handling
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit ab6abe3034644b4d5de5331351c3df4919f422d8 Author: Ovilia AuthorDate: Mon Jan 13 19:17:44 2020 +0800 feat: pull request handling --- .gitignore| 2 +- index.js | 73 --- src/coreCommitters.js | 5 +++- src/text.js | 14 +- 4 files changed, 63 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index b8e0d49..990cb14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.env +.env* lib node_modules .DS_Store diff --git a/index.js b/index.js index 48374ca..fe0422a 100644 --- a/index.js +++ b/index.js @@ -44,8 +44,8 @@ module.exports = app => { case 'inactive': return Promise.all([commentIssue(context, text.INACTIVE_ISSUE), closeIssue(context)]); -case 'waiting-for: author': -return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); +// case 'waiting-for: author': +// return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); case 'difficulty: easy': return commentIssue(context, replaceAt(text.ISSUE_TAGGED_EASY)); @@ -56,6 +56,12 @@ module.exports = app => { }); app.on('issue_comment.created', async context => { +const isPr = context.payload.issue.html_url.indexOf('/pull/') > -1; +if (isPr) { +// Do nothing when pr is commented +return; +} + const commenter = context.payload.comment.user.login; const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; @@ -75,25 +81,46 @@ module.exports = app => { }); // Pull Requests Not Tested Yet -// app.on(['pull_request.opened', 'pull_request.reopened'], async context => { -// console.log('pull request open'); -// const comment = context.github.issues.createComment(context.issue({ -// body: text.PR_OPENED -// })); - -// return Promise.all([comment]); -// }); - -// app.on(['pull_request.closed'], async context => { -// console.log('pull request close'); -// console.log(context.payload); -// const isMerged = context.payload['pull_request'].merged; -// const comment = context.github.issues.createComment(context.issue({ -// body: isMerged ? text.PR_MERGED : text.PR_NOT_MERGED -// })); - -// return Promise.all([comment]); -// }); +app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +const auth = context.payload.pull_request.author_association; +const comment = context.github.issues.createComment(context.issue({ +body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED +})); + +const labelList = ['PR: awaiting review']; +if (isCommitter(auth)) { +labelList.push('PR: author is committer'); +} +const addLabel = context.github.issues.addLabels(context.issue({ +labels: labelList +})); + +const removeLabel = getRemoveLabel(context, 'PR: revision needed'); +return Promise.all([comment, addLabel, removeLabel]); +}); + +app.on(['pull_request.closed'], async context => { +const isMerged = context.payload['pull_request'].merged; +if (isMerged) { +const comment = context.github.issues.createComment(context.issue({ +body: text.PR_MERGED +})); +return Promise.all([comment]); +} +}); + +app.on(['pull_request_review.submitted'], async context => { +if (context.payload.review.state === 'changes_requested' +&& isCommitter(context.payload.review.author_association) +) { +const addLabel = context.github.issues.addLabels(context.issue({ +labels: ['PR: revision needed'] +})); + +const removeLabel = getRemoveLabel(context, 'PR: awaiting review'); +return Promise.all([addLabel, removeLabel]); +} +}); } function getRemoveLabel(context, name) { @@ -126,3 +153,7 @@ function commentIssue(context, commentText) { function replaceAll(str, search, replacement) { return str.replace(new RegExp(search, 'g'), replacement); } + +function isCommitter(auth) { +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || auth === 'CONTRIBUTOR'; +} diff --git a/src/coreCommitters.js b/src/coreCommitters.js index c13147e..10bf89f 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -2,7 +2,10 @@ const committers = [ 'pissang', '100pah', 'Ovilia', -'deqingli' +'deqingli', +'susiwen8', +
[incubator-echarts-bot] 20/32: feat: pr label
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 27926dba30a77a7a07bb7123f62bcb1992199514 Author: Ovilia AuthorDate: Mon Feb 17 11:47:52 2020 +0800 feat: pr label --- index.js| 27 --- src/text.js | 4 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index fe0422a..2c51d00 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ const Issue = require('./src/issue'); -const coreCommitters = require('./src/coreCommitters'); const text = require('./src/text'); module.exports = app => { @@ -33,7 +32,6 @@ module.exports = app => { ); }; -// console.log(context.payload); switch (context.payload.label.name) { case 'invalid': return Promise.all([commentIssue(context, text.NOT_USING_TEMPLATE), closeIssue(context)]); @@ -44,6 +42,15 @@ module.exports = app => { case 'inactive': return Promise.all([commentIssue(context, text.INACTIVE_ISSUE), closeIssue(context)]); +case 'missing-demo': +return Promise.all([ +commentIssue(context, replaceAt(text.MISSING_DEMO)), +getRemoveLabel(context, 'waiting-for: community'), +context.github.issues.addLabels(context.issue({ +labels: ['waiting-for: author'] +})) +]); + // case 'waiting-for: author': // return commentIssue(context, replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR)); @@ -66,9 +73,9 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (coreCommitters.isCoreCommitter(commenter) && !isCommenterAuthor) { +if (isCommitter(context.payload.comment.author_association)) { // New comment from core committers -removeLabel = getRemoveLabel(context, 'waiting-for: help'); +removeLabel = getRemoveLabel(context, 'waiting-for: community'); } else if (isCommenterAuthor) { // New comment from issue author @@ -80,8 +87,7 @@ module.exports = app => { return Promise.all([removeLabel, addLabel]); }); -// Pull Requests Not Tested Yet -app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +app.on(['pull_request.opened'], async context => { const auth = context.payload.pull_request.author_association; const comment = context.github.issues.createComment(context.issue({ body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED @@ -95,8 +101,15 @@ module.exports = app => { labels: labelList })); +return Promise.all([comment, addLabel]); +}); + +app.on(['pull_request.synchronize'], async context => { +const addLabel = context.github.issues.addLabels(context.issue({ +labels: ['PR: awaiting review'] +})); const removeLabel = getRemoveLabel(context, 'PR: revision needed'); -return Promise.all([comment, addLabel, removeLabel]); +return Promise.all([addLabel, removeLabel]); }); app.on(['pull_request.closed'], async context => { diff --git a/src/text.js b/src/text.js index ab01a9a..3d20b05 100644 --- a/src/text.js +++ b/src/text.js @@ -39,6 +39,9 @@ AT_ISSUE_AUTHOR Would you like to debug it by yourself? This is a quicker way to Please have a look at [How to debug ECharts](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 邏`; +const MISSING_DEMO = +`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.`; + const ISSUE_TAGGED_PRIORITY_HIGH = `This issue is labeled with \`priority: high\`, which means it's a frequently asked problem and we will fix it ASAP.`; @@ -76,6 +79,7 @@ module.exports = { NOT_USING_TEMPLATE, ISSUE_CREATED, ISSUE_UPDATED, +MISSING_DEMO, INACTIVE_ISSUE, PR_OPENED, LABEL_HOWTO, - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 22/32: fix: contributor should not be considered as committer
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit be9ebad0753d4353746ed5af8ba743f8fd5c48f8 Author: Ovilia AuthorDate: Mon Apr 20 09:59:35 2020 +0800 fix: contributor should not be considered as committer --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f93bd41..0563fc7 100644 --- a/index.js +++ b/index.js @@ -173,5 +173,5 @@ function replaceAll(str, search, replacement) { } function isCommitter(auth) { -return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER' || auth === 'CONTRIBUTOR'; +return auth === 'COLLABORATOR' || auth === 'MEMBER' || auth === 'OWNER'; } - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 07/32: doc: update issue text, add email info
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 69d7ca14d8d202c40d5990919239bfc976bd1ab0 Author: Ovilia AuthorDate: Thu Aug 22 13:16:13 2019 +0800 doc: update issue text, add email info --- src/text.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/text.js b/src/text.js index 82dc7a0..98a445b 100644 --- a/src/text.js +++ b/src/text.js @@ -13,6 +13,10 @@ The average response time is expected to be within one day for weekdays. In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer. +If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org . + +If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html). + Have a nice day! `; const INACTIVE_ISSUE = @@ -38,7 +42,7 @@ You may send an email to dev-subscr...@echarts.apache.org to subscribe our devel const PR_NOT_MERGED = `I'm sorry your PR didn't get merged. Don't get frustrated. Maybe next time. ` const LABEL_HOWTO = -`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). +`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). You may also send an email about your question to d...@echarts.apache.org if you like. Here's why: - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 32/32: Merge pull request #7 from plainheart/master
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 62958eb2ca7f2196ec62b99e3f9ef5647163f49c Merge: 721cb2e 127e62e Author: Zhongxiang.Wang AuthorDate: Wed Oct 28 08:57:45 2020 +0800 Merge pull request #7 from plainheart/master fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership in organization. index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --cc index.js index 71e158e,6224d0c..4a05bbc --- a/index.js +++ b/index.js @@@ -89,11 -89,10 +89,10 @@@ module.exports = app => }); app.on(['pull_request.opened'], async context => { - // const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); -const comment = context.github.issues.createComment(context.issue({ -body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED -})); +let commentText = isCore +? text.PR_OPENED_BY_COMMITTER +: text.PR_OPENED; const labelList = ['PR: awaiting review']; if (isCore) { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 29/32: Merge branch 'master' of https://github.com/apache/incubator-echarts-bot
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 8f730a6d935e606dd6ea5c7c45fe464dabd66461 Merge: cc09b9c 2f2ce15 Author: plainheart AuthorDate: Fri Aug 21 11:43:32 2020 +0800 Merge branch 'master' of https://github.com/apache/incubator-echarts-bot - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 17/32: Merge pull request #4 from apache/revert-1-dependabot/npm_and_yarn/js-yaml-3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 64a146d4bc14dfedc5aa0125dcff3f91eb4b8e13 Merge: d7baba9 3be90e7 Author: Ovilia AuthorDate: Mon Nov 4 15:50:12 2019 +0800 Merge pull request #4 from apache/revert-1-dependabot/npm_and_yarn/js-yaml-3.13.1 Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1" package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 23/32: feat: change jsfiddle to codepen
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 468891a78c5318f260101d61794ede0ac582a72b Author: Ovilia AuthorDate: Wed Apr 29 17:23:54 2020 +0800 feat: change jsfiddle to codepen --- src/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.js b/src/text.js index 3d20b05..9d13778 100644 --- a/src/text.js +++ b/src/text.js @@ -40,7 +40,7 @@ AT_ISSUE_AUTHOR Would you like to debug it by yourself? This is a quicker way to Please have a look at [How to debug ECharts](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 邏`; const MISSING_DEMO = -`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.`; +`AT_ISSUE_AUTHOR Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://gallery.echartsjs.com/editor.html.`; const ISSUE_TAGGED_PRIORITY_HIGH = `This issue is labeled with \`priority: high\`, which means it's a frequently asked problem and we will fix it ASAP.`; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 24/32: update committer
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 5bbfd102dd75b6b563aba5f152f4b48f56c5ad43 Author: Ovilia AuthorDate: Thu Jun 18 13:26:51 2020 +0800 update committer --- src/coreCommitters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreCommitters.js b/src/coreCommitters.js index 10bf89f..7fb05cb 100644 --- a/src/coreCommitters.js +++ b/src/coreCommitters.js @@ -5,7 +5,9 @@ const committers = [ 'deqingli', 'susiwen8', 'cuijian-dexter', -'SnailSword' +'SnailSword', +'plainheart', +'wf123537200' ]; function getCoreCommitters() { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 27/32: fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update).
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit cc09b9c6266a139c9184fec1f64c08b33bef9a82 Author: plainheart AuthorDate: Thu Aug 20 18:25:03 2020 +0800 fix: fix `isCoreCommitter` import bug and update a deprecated usage(edit -> update). --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b3858c9..212df55 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const Issue = require('./src/issue'); const text = require('./src/text'); -const isCoreCommitter = require('./src/coreCommitters'); +const { isCoreCommitter } = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened'], async context => { @@ -157,7 +157,7 @@ function getRemoveLabel(context, name) { } function closeIssue(context) { -const closeIssue = context.github.issues.edit(context.issue({ +const closeIssue = context.github.issues.update(context.issue({ state: 'closed' })); return closeIssue; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 31/32: feat: add "PR: awaiting doc" label if doc changed
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 721cb2eb6f32f109402d7295476bc0a7a2958c91 Author: Ovilia AuthorDate: Mon Aug 31 13:47:54 2020 +0800 feat: add "PR: awaiting doc" label if doc changed --- index.js| 28 +--- src/text.js | 4 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 212df55..71e158e 100644 --- a/index.js +++ b/index.js @@ -91,14 +91,24 @@ module.exports = app => { app.on(['pull_request.opened'], async context => { // const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); -const comment = context.github.issues.createComment(context.issue({ -body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED -})); +let commentText = isCore +? text.PR_OPENED_BY_COMMITTER +: text.PR_OPENED; const labelList = ['PR: awaiting review']; if (isCore) { labelList.push('PR: author is committer'); } +const content = context.payload.pull_request.body; +if (content && content.indexOf('[-] The API has been changed.') > -1) { +labelList.push('PR: awaiting doc'); +commentText += '\n\n' + text.PR_AWAITING_DOC; +} + +const comment = context.github.issues.createComment(context.issue({ +body: commentText +})); + const addLabel = context.github.issues.addLabels(context.issue({ labels: labelList })); @@ -106,6 +116,18 @@ module.exports = app => { return Promise.all([comment, addLabel]); }); +app.on(['pull_request.edited'], async context => { +const content = context.payload.pull_request.body; +if (content && content.indexOf('[-] The API has been changed.') > -1) { +return context.github.issues.addLabels(context.issue({ +labels: ['PR: awaiting doc'] +})); +} +else { +return getRemoveLabel(context, 'PR: awaiting doc'); +} +}); + app.on(['pull_request.synchronize'], async context => { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: awaiting review'] diff --git a/src/text.js b/src/text.js index 9d13778..8f0764b 100644 --- a/src/text.js +++ b/src/text.js @@ -54,6 +54,9 @@ const PR_OPENED_BY_COMMITTER = PR_OPENED + ` The pull request is marked to be \`PR: author is committer\` because you are a committer of this project.`; +const PR_AWAITING_DOC = `Document changes are required in this PR. Please also make a PR to [apache/incubator-echarts-doc](https://github.com/apache/incubator-echarts-doc) for document changes. When the doc PR is merged, the maintainers will remove the \`PR: awaiting doc\` label. +`; + const PR_MERGED = `Congratulations! Your PR has been merged. Thanks for your contribution! `; @@ -86,6 +89,7 @@ module.exports = { PR_MERGED, PR_OPENED_BY_COMMITTER, PR_NOT_MERGED, +PR_AWAITING_DOC, ISSUE_TAGGED_WAITING_AUTHOR, ISSUE_TAGGED_EASY, ISSUE_TAGGED_PRIORITY_HIGH - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 04/32: chore: add .data for glitch
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 47170c5f3ba78cd47f8a7f7e9ddbaabfe1cdf5c4 Author: Ovilia AuthorDate: Mon Feb 18 15:24:35 2019 +0800 chore: add .data for glitch --- .data/empty | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.data/empty b/.data/empty new file mode 100644 index 000..e69de29 - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 03/32: feat: listen to comments
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 4526a41d164814c17ed4a20e2498d0f24caf4cba Author: Ovilia AuthorDate: Tue Nov 20 16:08:30 2018 +0800 feat: listen to comments --- index.js | 55 ++- src/coreCommitters.js | 19 ++ src/issue.js | 2 +- 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/index.js b/index.js index 0d42caa..338360d 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ const Issue = require('./src/issue'); +const coreCommitters = require('./src/coreCommitters'); module.exports = app => { app.on(['issues.opened', 'issues.edited'], async context => { @@ -23,25 +24,51 @@ module.exports = app => { })) : Promise.resolve(); -const removeLabels = issue.isMeetAllRequires() -? context.github.issues.deleteLabel(context.issue({ -name: 'waiting-for-author' -})) -: context.github.issues.deleteLabel(context.issue({ -name: 'waiting-for-help' -})); -removeLabels.catch(err => { -// Ignore error caused by not existing. -if (err.message !== 'Not Found') { -throw(err); -} -}); +const removeLabel = getRemoveLabel( +context, +issue.isMeetAllRequires() +? 'waiting-for-author' +: 'waiting-for-help' +); const comment = context.github.issues.createComment(context.issue({ body: issue.response })); -return Promise.all([addLabels, removeLabels, comment]); +return Promise.all([addLabels, removeLabel, comment]); +} +}); + +app.on('issue_comment.created', async context => { +const commenter = context.payload.comment.user.login; +let removeLabel, addLabel; +if (coreCommitters.isCoreCommitter(commenter)) { +// New comment from core committers +removeLabel = getRemoveLabel(context, 'waiting-for-help'); +addLabel = context.github.issues.addLabels(context.issue({ +labels: ['waiting-for-author'] +})); +} +else if (commenter === context.payload.issue.user.login) { +// New comment from issue author +removeLabel = getRemoveLabel(context, 'waiting-for-author'); +addLabel = context.github.issues.addLabels(context.issue({ +labels: ['waiting-for-help'] +})); +} +return Promise.all([removeLabel, addLabel]); +}); +} + +function getRemoveLabel(context, name) { +return context.github.issues.deleteLabel( +context.issue({ +name: name +}) +).catch(err => { +// Ignore error caused by not existing. +if (err.message !== 'Not Found') { +throw(err); } }); } diff --git a/src/coreCommitters.js b/src/coreCommitters.js new file mode 100644 index 000..6d9cf9f --- /dev/null +++ b/src/coreCommitters.js @@ -0,0 +1,19 @@ +const committers = [ +'pissang', +'100pah', +'Ovilia', +'deqingli' +]; + +function getCoreCommitters() { +return committers; +} + +function isCoreCommitter(user) { +return committers.indexOf(user) > -1; +} + +module.exports = { +getCoreCommitters: getCoreCommitters, +isCoreCommitter: isCoreCommitter +}; diff --git a/src/issue.js b/src/issue.js index a8be8f8..73077ff 100644 --- a/src/issue.js +++ b/src/issue.js @@ -150,7 +150,7 @@ class Issue { } _matches(text) { -return this.body.indexOf('- [x] ' + text) > -1; +return this.body.indexOf('- [x] Required: ' + text) > -1; } } - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 11/32: chore(deps): bump mixin-deep from 1.3.1 to 1.3.2
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit bf06166bc41cc14b0cf60674f40e0d71d503efcd Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:38 2019 + chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..51093cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev":
[incubator-echarts-bot] 13/32: Merge pull request #2 from apache/dependabot/npm_and_yarn/mixin-deep-1.3.2
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 66697c04888d25ed38749c72ab77584789aa90b0 Merge: 1b3abb0 bf06166 Author: Ovilia AuthorDate: Thu Sep 26 10:08:02 2019 +0800 Merge pull request #2 from apache/dependabot/npm_and_yarn/mixin-deep-1.3.2 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 06/32: update text
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit d5a89efd97807c97b32462c2fca2dfce3a3860f5 Author: Ovilia AuthorDate: Mon May 27 10:48:53 2019 +0800 update text --- .data/empty | 0 index.js| 9 ++--- src/text.js | 10 -- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.data/empty b/.data/empty deleted file mode 100644 index e69de29..000 diff --git a/index.js b/index.js index 847df80..9b876c9 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,9 @@ const Issue = require('./src/issue'); const coreCommitters = require('./src/coreCommitters'); -const {PR_OPENED, PR_MERGED, PR_NOT_MERGED, LABEL_HOWTO, NOT_USING_TEMPLATE} = require('./src/text'); +const {LABEL_HOWTO, NOT_USING_TEMPLATE, INACTIVE_ISSUE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.edited', 'issues.reopened'], async context => { +app.on(['issues.opened', 'issues.reopened'], async context => { const issue = new Issue(context); // Ignore comment because it will commented when adding invalid label @@ -24,7 +24,7 @@ module.exports = app => { : Promise.resolve(); if (issue.isUsingTemplate()) { -return Promise.all([comment, addLabels, removeLabel]); +return Promise.all([comment, addLabels, removeLabels]); } else { return Promise.all([comment, addLabels, removeLabels]); @@ -38,6 +38,9 @@ module.exports = app => { case 'howto': return Promise.all([commentIssue(context, LABEL_HOWTO), closeIssue(context)]); + +case 'inactive': +return Promise.all([commentIssue(context, INACTIVE_ISSUE), closeIssue(context)]); } }); diff --git a/src/text.js b/src/text.js index 22df08d..82dc7a0 100644 --- a/src/text.js +++ b/src/text.js @@ -1,6 +1,6 @@ const NOT_USING_TEMPLATE = `This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. -Sorry for this, but it helps saving our maintainers' time so that more developers get helped. +Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 @@ -15,6 +15,9 @@ In the meanwhile, please make sure that **you have posted enough image to demo y Have a nice day! `; +const INACTIVE_ISSUE = +`This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.`; + const ISSUE_UPDATED = `An update has been made to this issue. The maintainers are right on their way. `; @@ -35,7 +38,9 @@ You may send an email to dev-subscr...@echarts.apache.org to subscribe our devel const PR_NOT_MERGED = `I'm sorry your PR didn't get merged. Don't get frustrated. Maybe next time. ` const LABEL_HOWTO = -`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts). Here's why: +`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). + +Here's why: Maintaining open source projects, especially popular ones, is [hard work](https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/). As ECharts's user base has grown, we are getting more and more usage questions, bug reports, feature requests and pull requests every single day. @@ -52,6 +57,7 @@ module.exports = { NOT_USING_TEMPLATE, ISSUE_CREATED, ISSUE_UPDATED, +INACTIVE_ISSUE, PR_OPENED, LABEL_HOWTO, PR_MERGED, - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 08/32: bot should not check template if an issue is reopened
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit f147289aa7388180091956100f30a8098b130359 Author: Ovilia AuthorDate: Fri Aug 30 11:18:47 2019 +0800 bot should not check template if an issue is reopened --- index.js| 9 ++--- src/text.js | 6 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 9b876c9..bb6c48d 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const coreCommitters = require('./src/coreCommitters'); const {LABEL_HOWTO, NOT_USING_TEMPLATE, INACTIVE_ISSUE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.reopened'], async context => { +app.on(['issues.opened'], async context => { const issue = new Issue(context); // Ignore comment because it will commented when adding invalid label @@ -23,12 +23,7 @@ module.exports = app => { })) : Promise.resolve(); -if (issue.isUsingTemplate()) { -return Promise.all([comment, addLabels, removeLabels]); -} -else { -return Promise.all([comment, addLabels, removeLabels]); -} +return Promise.all([comment, addLabels, removeLabels]); }); app.on('issues.labeled', async context => { diff --git a/src/text.js b/src/text.js index 98a445b..fac39dc 100644 --- a/src/text.js +++ b/src/text.js @@ -3,9 +3,13 @@ const NOT_USING_TEMPLATE = Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. +If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again. + 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 -如果您愿意,可以请使用 issue 模板重新创建 issue。`; +如果您愿意,可以请使用 issue 模板重新创建 issue。 + +如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = `Hi! We\'ve received your issue and please be patient to get responded. - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 09/32: change label name
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 1b3abb0671b3a85ae1a83d9170b9183e50911607 Author: Ovilia AuthorDate: Sat Aug 31 16:47:11 2019 +0800 change label name --- src/issue.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/issue.js b/src/issue.js index 1d1d770..0b3472e 100644 --- a/src/issue.js +++ b/src/issue.js @@ -45,11 +45,11 @@ class Issue { break; case 'edited': this.response = ISSUE_UPDATED; -this.removeLabels.push('waiting-for-help'); +this.removeLabels.push('waiting-for: help'); break; } -this.addLabels.push('waiting-for-help'); +this.addLabels.push('waiting-for: help'); this.addLabels.push('pending'); this.addLabels.push(this.issueType); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 09/32: change label name
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 1b3abb0671b3a85ae1a83d9170b9183e50911607 Author: Ovilia AuthorDate: Sat Aug 31 16:47:11 2019 +0800 change label name --- src/issue.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/issue.js b/src/issue.js index 1d1d770..0b3472e 100644 --- a/src/issue.js +++ b/src/issue.js @@ -45,11 +45,11 @@ class Issue { break; case 'edited': this.response = ISSUE_UPDATED; -this.removeLabels.push('waiting-for-help'); +this.removeLabels.push('waiting-for: help'); break; } -this.addLabels.push('waiting-for-help'); +this.addLabels.push('waiting-for: help'); this.addLabels.push('pending'); this.addLabels.push(this.issueType); - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 32/32: Merge pull request #7 from plainheart/master
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 62958eb2ca7f2196ec62b99e3f9ef5647163f49c Merge: 721cb2e 127e62e Author: Zhongxiang.Wang AuthorDate: Wed Oct 28 08:57:45 2020 +0800 Merge pull request #7 from plainheart/master fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership in organization. index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --cc index.js index 71e158e,6224d0c..4a05bbc --- a/index.js +++ b/index.js @@@ -89,11 -89,10 +89,10 @@@ module.exports = app => }); app.on(['pull_request.opened'], async context => { - // const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); -const comment = context.github.issues.createComment(context.issue({ -body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED -})); +let commentText = isCore +? text.PR_OPENED_BY_COMMITTER +: text.PR_OPENED; const labelList = ['PR: awaiting review']; if (isCore) { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 30/32: fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some tex
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 127e62e8dae5ca7d7126390d7f0d6d32ff87cbf5 Author: plainheart AuthorDate: Tue Aug 25 11:18:05 2020 +0800 fix: use `isCoreCommitter` instead of `isCommitter` to be compatible with the committers who are hiding their membership visibility in organization. and updated some texts. --- index.js| 7 +++ src/text.js | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 212df55..6224d0c 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = app => { }); app.on('issues.labeled', async context => { -var replaceAt = function (comment) { +const replaceAt = function (comment) { return replaceAll( comment, 'AT_ISSUE_AUTHOR', @@ -74,7 +74,7 @@ module.exports = app => { const isCommenterAuthor = commenter === context.payload.issue.user.login; let removeLabel; let addLabel; -if (isCommitter(context.payload.comment.author_association)) { +if (isCoreCommitter(commenter)) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for: community'); } @@ -89,7 +89,6 @@ module.exports = app => { }); app.on(['pull_request.opened'], async context => { -// const auth = context.payload.pull_request.author_association; const isCore = isCoreCommitter(context.payload.pull_request.user.login); const comment = context.github.issues.createComment(context.issue({ body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED @@ -131,7 +130,7 @@ module.exports = app => { app.on(['pull_request_review.submitted'], async context => { if (context.payload.review.state === 'changes_requested' -&& isCommitter(context.payload.review.author_association) +&& isCoreCommitter(context.payload.review.user.login) ) { const addLabel = context.github.issues.addLabels(context.issue({ labels: ['PR: revision needed'] diff --git a/src/text.js b/src/text.js index 9d13778..3615f46 100644 --- a/src/text.js +++ b/src/text.js @@ -7,9 +7,9 @@ If you think you have already made your point clear without the template, or you 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。 -如果您愿意,可以请使用 issue 模板重新创建 issue。 +如果您愿意,请使用 issue 模板重新创建 issue。 -如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。`; +如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。`; const ISSUE_CREATED = `Hi! We\'ve received your issue and please be patient to get responded. @@ -19,7 +19,7 @@ In the meanwhile, please make sure that **you have posted enough image to demo y If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org. Please attach the issue link if it's a technical questions. -If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html). +If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html). Have a nice day! `; - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 21/32: update pr label
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 2a03d653dd19b8e236e6eeb1f8b5f5f65f2e9d88 Author: Ovilia AuthorDate: Tue Mar 3 13:13:37 2020 +0800 update pr label --- index.js | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2c51d00..f93bd41 100644 --- a/index.js +++ b/index.js @@ -113,13 +113,18 @@ module.exports = app => { }); app.on(['pull_request.closed'], async context => { +const actions = [ +getRemoveLabel(context, 'PR: revision needed'), +getRemoveLabel(context, 'PR: awaiting review') +]; const isMerged = context.payload['pull_request'].merged; if (isMerged) { const comment = context.github.issues.createComment(context.issue({ body: text.PR_MERGED })); -return Promise.all([comment]); +actions.push(comment); } +return Promise.all(actions); }); app.on(['pull_request_review.submitted'], async context => { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 06/32: update text
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit d5a89efd97807c97b32462c2fca2dfce3a3860f5 Author: Ovilia AuthorDate: Mon May 27 10:48:53 2019 +0800 update text --- .data/empty | 0 index.js| 9 ++--- src/text.js | 10 -- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.data/empty b/.data/empty deleted file mode 100644 index e69de29..000 diff --git a/index.js b/index.js index 847df80..9b876c9 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,9 @@ const Issue = require('./src/issue'); const coreCommitters = require('./src/coreCommitters'); -const {PR_OPENED, PR_MERGED, PR_NOT_MERGED, LABEL_HOWTO, NOT_USING_TEMPLATE} = require('./src/text'); +const {LABEL_HOWTO, NOT_USING_TEMPLATE, INACTIVE_ISSUE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.edited', 'issues.reopened'], async context => { +app.on(['issues.opened', 'issues.reopened'], async context => { const issue = new Issue(context); // Ignore comment because it will commented when adding invalid label @@ -24,7 +24,7 @@ module.exports = app => { : Promise.resolve(); if (issue.isUsingTemplate()) { -return Promise.all([comment, addLabels, removeLabel]); +return Promise.all([comment, addLabels, removeLabels]); } else { return Promise.all([comment, addLabels, removeLabels]); @@ -38,6 +38,9 @@ module.exports = app => { case 'howto': return Promise.all([commentIssue(context, LABEL_HOWTO), closeIssue(context)]); + +case 'inactive': +return Promise.all([commentIssue(context, INACTIVE_ISSUE), closeIssue(context)]); } }); diff --git a/src/text.js b/src/text.js index 22df08d..82dc7a0 100644 --- a/src/text.js +++ b/src/text.js @@ -1,6 +1,6 @@ const NOT_USING_TEMPLATE = `This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. -Sorry for this, but it helps saving our maintainers' time so that more developers get helped. +Sorry for this, but it helps save our maintainers' time so that more developers get helped. Feel free to create another issue using the issue template. 这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。 @@ -15,6 +15,9 @@ In the meanwhile, please make sure that **you have posted enough image to demo y Have a nice day! `; +const INACTIVE_ISSUE = +`This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.`; + const ISSUE_UPDATED = `An update has been made to this issue. The maintainers are right on their way. `; @@ -35,7 +38,9 @@ You may send an email to dev-subscr...@echarts.apache.org to subscribe our devel const PR_NOT_MERGED = `I'm sorry your PR didn't get merged. Don't get frustrated. Maybe next time. ` const LABEL_HOWTO = -`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts). Here's why: +`Sorry, but please ask *how-to* questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts) or [segmentfault(中文)](https://segmentfault.com/t/echarts). + +Here's why: Maintaining open source projects, especially popular ones, is [hard work](https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/). As ECharts's user base has grown, we are getting more and more usage questions, bug reports, feature requests and pull requests every single day. @@ -52,6 +57,7 @@ module.exports = { NOT_USING_TEMPLATE, ISSUE_CREATED, ISSUE_UPDATED, +INACTIVE_ISSUE, PR_OPENED, LABEL_HOWTO, PR_MERGED, - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 10/32: chore(deps): bump js-yaml from 3.12.0 to 3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 384bff138ed0a54b488cbaa7c344560b361882aa Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:34 2019 + chore(deps): bump js-yaml from 3.12.0 to 3.13.1 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..d70d5fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11",
[incubator-echarts-bot] 15/32: Merge pull request #1 from apache/dependabot/npm_and_yarn/js-yaml-3.13.1
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit d7baba984a3a0b34c91f25abc2c7050d984844ad Merge: 075c311 384bff1 Author: Ovilia AuthorDate: Thu Sep 26 10:08:41 2019 +0800 Merge pull request #1 from apache/dependabot/npm_and_yarn/js-yaml-3.13.1 chore(deps): bump js-yaml from 3.12.0 to 3.13.1 package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 16/32: Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1"
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 3be90e78add914ea0916688032b831baa6161676 Author: Ovilia AuthorDate: Mon Nov 4 15:49:57 2019 +0800 Revert "chore(deps): bump js-yaml from 3.12.0 to 3.13.1" --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bad9fc0..96de564 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5065,9 +5065,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz;, - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz;, + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 12/32: chore(deps): bump lodash from 4.17.11 to 4.17.15
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 4536f361cbbe04832e74bb3cc7389c644dfc2037 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 25 10:22:40 2019 + chore(deps): bump lodash from 4.17.11 to 4.17.15 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15) Signed-off-by: dependabot[bot] --- package-lock.json | 89 ++- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7310a08..bf03d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "dependencies": { "acorn": { "version": "3.3.0", - "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz;, "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true } @@ -170,6 +170,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz;, "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -628,7 +629,7 @@ }, "async": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz;, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz;, "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { @@ -686,7 +687,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -699,7 +700,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2312,7 +2313,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz;, "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -2354,7 +2355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2493,7 +2494,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -2524,7 +2525,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz;, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -2551,7 +2552,7 @@ "dependencies": { "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz;, "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3091,7 +3092,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3112,12 +3114,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true,
[incubator-echarts-bot] 21/32: update pr label
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 2a03d653dd19b8e236e6eeb1f8b5f5f65f2e9d88 Author: Ovilia AuthorDate: Tue Mar 3 13:13:37 2020 +0800 update pr label --- index.js | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2c51d00..f93bd41 100644 --- a/index.js +++ b/index.js @@ -113,13 +113,18 @@ module.exports = app => { }); app.on(['pull_request.closed'], async context => { +const actions = [ +getRemoveLabel(context, 'PR: revision needed'), +getRemoveLabel(context, 'PR: awaiting review') +]; const isMerged = context.payload['pull_request'].merged; if (isMerged) { const comment = context.github.issues.createComment(context.issue({ body: text.PR_MERGED })); -return Promise.all([comment]); +actions.push(comment); } +return Promise.all(actions); }); app.on(['pull_request_review.submitted'], async context => { - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-bot] 05/32: feat: update for new issue template
This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git commit 1c1fd56a52728146cc01062e57c98df3c3f235fc Author: Ovilia AuthorDate: Wed Feb 20 20:16:20 2019 +0800 feat: update for new issue template --- index.js | 103 +++--- src/coreCommitters.js | 4 +- src/issue.js | 150 ++ src/text.js | 59 4 files changed, 162 insertions(+), 154 deletions(-) diff --git a/index.js b/index.js index 338360d..847df80 100644 --- a/index.js +++ b/index.js @@ -1,55 +1,59 @@ const Issue = require('./src/issue'); const coreCommitters = require('./src/coreCommitters'); +const {PR_OPENED, PR_MERGED, PR_NOT_MERGED, LABEL_HOWTO, NOT_USING_TEMPLATE} = require('./src/text'); module.exports = app => { -app.on(['issues.opened', 'issues.edited'], async context => { +app.on(['issues.opened', 'issues.edited', 'issues.reopened'], async context => { const issue = new Issue(context); -if (!issue.isUsingTemplate()) { -// Close issue -const comment = context.github.issues.createComment(context.issue({ -body: issue.response -})); +// Ignore comment because it will commented when adding invalid label +const comment = issue.response === NOT_USING_TEMPLATE +? Promise.resolve() +: commentIssue(context, issue.response); -const close = context.github.issues.edit(context.issue({ -state: 'closed' -})); +const addLabels = issue.addLabels.length +? context.github.issues.addLabels(context.issue({ +labels: issue.addLabels +})) +: Promise.resolve(); -return Promise.all([comment, close]); +const removeLabels = issue.removeLabels.length +? context.github.issues.addLabels(context.issue({ +labels: issue.removeLabels +})) +: Promise.resolve(); + +if (issue.isUsingTemplate()) { +return Promise.all([comment, addLabels, removeLabel]); } else { -const addLabels = issue.tags.length -? context.github.issues.addLabels(context.issue({ -labels: issue.tags -})) -: Promise.resolve(); - -const removeLabel = getRemoveLabel( -context, -issue.isMeetAllRequires() -? 'waiting-for-author' -: 'waiting-for-help' -); +return Promise.all([comment, addLabels, removeLabels]); +} +}); -const comment = context.github.issues.createComment(context.issue({ -body: issue.response -})); +app.on('issues.labeled', async context => { +switch (context.payload.label.name) { +case 'invalid': +return Promise.all([commentIssue(context, NOT_USING_TEMPLATE), closeIssue(context)]); -return Promise.all([addLabels, removeLabel, comment]); +case 'howto': +return Promise.all([commentIssue(context, LABEL_HOWTO), closeIssue(context)]); } }); app.on('issue_comment.created', async context => { const commenter = context.payload.comment.user.login; -let removeLabel, addLabel; -if (coreCommitters.isCoreCommitter(commenter)) { +const isCommenterAuthor = commenter === context.payload.issue.user.login; +let removeLabel; +let addLabel; +if (coreCommitters.isCoreCommitter(commenter) && !isCommenterAuthor) { // New comment from core committers removeLabel = getRemoveLabel(context, 'waiting-for-help'); addLabel = context.github.issues.addLabels(context.issue({ labels: ['waiting-for-author'] })); } -else if (commenter === context.payload.issue.user.login) { +else if (isCommenterAuthor) { // New comment from issue author removeLabel = getRemoveLabel(context, 'waiting-for-author'); addLabel = context.github.issues.addLabels(context.issue({ @@ -58,6 +62,27 @@ module.exports = app => { } return Promise.all([removeLabel, addLabel]); }); + +// Pull Requests Not Tested Yet +// app.on(['pull_request.opened', 'pull_request.reopened'], async context => { +// console.log('pull request open'); +// const comment = context.github.issues.createComment(context.issue({ +// body: PR_OPENED +// })); + +// return Promise.all([comment]); +// }); + +// app.on(['pull_request.closed'], async context => { +// console.log('pull
[GitHub] [incubator-echarts] WillPower98 commented on a change in pull request #13489: feat(tooltip): added marker options. close #13413
WillPower98 commented on a change in pull request #13489: URL: https://github.com/apache/incubator-echarts/pull/13489#discussion_r513144768 ## File path: src/util/format.ts ## @@ -202,19 +202,26 @@ interface GetTooltipMarkerOpt { // id name for marker. If only one marker is in a rich text, this can be omitted. // By default: 'markerX' markerId?: string; +size?: string; } // Only support color string -export function getTooltipMarker(color: ColorString, extraCssText?: string): TooltipMarker; +export function getTooltipMarker(color: ColorString, size?: string, extraCssText?: string): TooltipMarker; export function getTooltipMarker(opt: GetTooltipMarkerOpt): TooltipMarker; export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extraCssText?: string): TooltipMarker { const opt = zrUtil.isString(inOpt) ? { color: inOpt, -extraCssText: extraCssText +extraCssText: extraCssText, +size: inOpt Review comment: ok. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia commented on issue #13486: 地图中的放大缩小功能对series中配置的散点图无效
Ovilia commented on issue #13486: URL: https://github.com/apache/incubator-echarts/issues/13486#issuecomment-717645193 散点图大小的单位是像素,而不是坐标系的单位,所以你的需求不适用于散点图,建议使用自定义系列,参见 https://echarts.apache.org/zh/tutorial.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%B3%BB%E5%88%97 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #13489: feat(tooltip): added marker options. close #13413
susiwen8 commented on a change in pull request #13489: URL: https://github.com/apache/incubator-echarts/pull/13489#discussion_r513131659 ## File path: src/util/format.ts ## @@ -202,19 +202,26 @@ interface GetTooltipMarkerOpt { // id name for marker. If only one marker is in a rich text, this can be omitted. // By default: 'markerX' markerId?: string; +size?: string; } // Only support color string -export function getTooltipMarker(color: ColorString, extraCssText?: string): TooltipMarker; +export function getTooltipMarker(color: ColorString, size?: string, extraCssText?: string): TooltipMarker; export function getTooltipMarker(opt: GetTooltipMarkerOpt): TooltipMarker; export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extraCssText?: string): TooltipMarker { const opt = zrUtil.isString(inOpt) ? { color: inOpt, -extraCssText: extraCssText +extraCssText: extraCssText, +size: inOpt Review comment: `getTooltipMarker ` was called in [here](https://github.com/apache/incubator-echarts/blob/next/src/component/tooltip/tooltipMarkup.ts#L484) So you might want add an attribute `size` for `getTooltipMarker` ```js const marker = getTooltipMarker({ color: colorStr, type: markerType, renderMode, markerId: markerId, size: size }); ``` You should track all the way up to find the function that starts to build marker and pass `size` at that function This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] pissang closed issue #13458: 地理实例,没有JSON文件
pissang closed issue #13458: URL: https://github.com/apache/incubator-echarts/issues/13458 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] plainheart commented on issue #13495: 如何设置X轴的字间距
plainheart commented on issue #13495: URL: https://github.com/apache/incubator-echarts/issues/13495#issuecomment-717712683 暂无直接的方法可以设置字间距,不过有一个变通方案供参考。 ```js axisLabel: { formatter: function (label) { return label.split('').join(String.fromCharCode(8202)); } } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] pissang commented on issue #11855: 打包一个支持 ES6 import 的 build
pissang commented on issue #11855: URL: https://github.com/apache/incubator-echarts/issues/11855#issuecomment-717710467 Added in https://github.com/apache/incubator-echarts/commit/cb5cfdc0682402380824ba9756bf116b3b945d14 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts] branch next updated: chore: add esm bundle #11855
This is an automated email from the ASF dual-hosted git repository. shenyi pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git The following commit(s) were added to refs/heads/next by this push: new cb5cfdc chore: add esm bundle #11855 cb5cfdc is described below commit cb5cfdc0682402380824ba9756bf116b3b945d14 Author: pissang AuthorDate: Wed Oct 28 13:35:55 2020 +0800 chore: add esm bundle #11855 --- build/build.js| 28 - build/config.js | 5 +-- build/release.js | 25 package.json | 1 + src/util/model.ts | 4 +- src/util/types.ts | 3 +- test/browser-esm.html | 107 ++ 7 files changed, 149 insertions(+), 24 deletions(-) diff --git a/build/build.js b/build/build.js index 592b3f6..24da784 100755 --- a/build/build.js +++ b/build/build.js @@ -29,6 +29,7 @@ const transformDEV = require('./transform-dev'); const UglifyJS = require("uglify-js"); const preamble = require('./preamble'); const {buildI18n} = require('./build-i18n') +const terser = require('terser'); async function run() { @@ -89,7 +90,7 @@ async function run() { ) .option( '--format ', -'The format of output bundle. Can be "umd", "amd", "iife", "cjs", "es".' +'The format of output bundle. Can be "umd", "amd", "iife", "cjs", "esm".' ) .option( '-i, --input ', @@ -220,19 +221,28 @@ async function build(configs, min, sourcemap) { chalk.cyan.dim(' ...') ) console.time('Minify'); -const uglifyResult = UglifyJS.minify( -// Convert __DEV__ to false and let uglify remove the dead code; -transformDEV.transform(sourceCode, false, 'false').code, -{ +// Convert __DEV__ to false and let uglify remove the dead code; +const transformedCode = transformDEV.transform(sourceCode, false, 'false').code; +let minifyResult; +if (singleConfig.output.format !== 'esm') { +minifyResult = UglifyJS.minify(transformedCode, { output: { preamble: preamble.js } +}); +if (minifyResult.error) { +throw new Error(minifyResult.error); } -); -if (uglifyResult.error) { -throw new Error(uglifyResult.error); } -fs.writeFileSync(fileMinPath, uglifyResult.code, 'utf-8'); +else { +// Use terser for esm minify because uglify doesn't support esm code. +minifyResult = await terser.minify(transformedCode, { +format: { +preamble: preamble.js +} +}) +} +fs.writeFileSync(fileMinPath, minifyResult.code, 'utf-8'); console.timeEnd('Minify'); console.log( diff --git a/build/config.js b/build/config.js index 06e88db..d0798c7 100644 --- a/build/config.js +++ b/build/config.js @@ -83,7 +83,6 @@ function preparePlugins( /** * @param {Object} [opt] * @param {string} [opt.type=''] '' or 'simple' or 'common' - * @param {string} [opt.lang=undefined] null/undefined/'' or 'en' or 'fi' or a file path. * @param {string} [opt.input=undefined] If set, `opt.output` is required too, and `opt.type` is ignored. * @param {string} [opt.output=undefined] If set, `opt.input` is required too, and `opt.type` is ignored. * @param {boolean} [opt.sourcemap] If set, `opt.input` is required too, and `opt.type` is ignored. @@ -94,11 +93,11 @@ function preparePlugins( exports.createECharts = function (opt = {}) { let srcType = opt.type ? '.' + opt.type : '.all'; let postfixType = opt.type ? '.' + opt.type : ''; -let postfixLang = opt.lang ? '-' + opt.lang.toLowerCase() : ''; let input = opt.input; let output = opt.output; let sourcemap = opt.sourcemap; let format = opt.format || 'umd'; +let postfixFormat = (format !== 'umd') ? '.' + format.toLowerCase() : ''; if (input != null || output != null) { // Based on process.cwd(); @@ -107,7 +106,7 @@ exports.createECharts = function (opt = {}) { } else { input = nodePath.resolve(ecDir, `src/echarts${srcType}.ts`); -output = nodePath.resolve(ecDir, `dist/echarts${postfixLang}${postfixType}.js`); +output = nodePath.resolve(ecDir, `dist/echarts${postfixFormat}${postfixType}.js`); } const include = [ diff --git a/build/release.js b/build/release.js index 667e6ca..a198503 100644 --- a/build/release.js +++ b/build/release.js @@ -42,19 +42,28 @@ function release() { } } -['', 'simple', 'common', 'extension'].forEach(function (type) { - -
[GitHub] [incubator-echarts] pissang removed a comment on issue #11855: 打包一个支持 ES6 import 的 build
pissang removed a comment on issue #11855: URL: https://github.com/apache/incubator-echarts/issues/11855#issuecomment-717710467 Added in https://github.com/apache/incubator-echarts/commit/cb5cfdc0682402380824ba9756bf116b3b945d14 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[incubator-echarts-examples] branch next updated: fix en titles on some examples
This is an automated email from the ASF dual-hosted git repository. shenyi pushed a commit to branch next in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git The following commit(s) were added to refs/heads/next by this push: new 46c679d fix en titles on some examples 46c679d is described below commit 46c679d3f7d2afa2f43049071897480149c822fb Author: pissang AuthorDate: Tue Oct 27 14:01:06 2020 +0800 fix en titles on some examples --- public/data/bar-animation-delay.js| 3 ++- public/data/bar-brush.js | 3 ++- public/data/bar-gradient.js | 3 ++- public/data/bar-negative.js | 3 ++- public/data/bar-negative2.js | 3 ++- public/data/bar-polar-real-estate.js | 2 +- public/data/bar-polar-stack-radial.js | 3 ++- public/data/bar-polar-stack.js| 3 ++- public/data/bar-stack.js | 3 ++- public/data/bar-tick-align.js | 3 ++- public/data/bar-waterfall.js | 3 ++- public/data/bar-waterfall2.js | 3 ++- 12 files changed, 23 insertions(+), 12 deletions(-) diff --git a/public/data/bar-animation-delay.js b/public/data/bar-animation-delay.js index 2065361..e06247a 100644 --- a/public/data/bar-animation-delay.js +++ b/public/data/bar-animation-delay.js @@ -1,5 +1,6 @@ /* -title: 柱状图动画延迟 +title: Animation Delay +titleCN: 柱状图动画延迟 category: bar difficulty: 5 */ diff --git a/public/data/bar-brush.js b/public/data/bar-brush.js index 29c4b5a..82f6178 100644 --- a/public/data/bar-brush.js +++ b/public/data/bar-brush.js @@ -1,5 +1,6 @@ /* -title: 柱状图框选 +title: Brush Select on Column Chart +titleCN: 柱状图框选 category: bar difficulty: 4 */ diff --git a/public/data/bar-gradient.js b/public/data/bar-gradient.js index 51a6a7c..a98dd16 100644 --- a/public/data/bar-gradient.js +++ b/public/data/bar-gradient.js @@ -1,5 +1,6 @@ /* -title: 特性示例:渐变色 阴影 点击缩放 +title: Clickable Column Chart with Gradient +titleCN: 特性示例:渐变色 阴影 点击缩放 category: bar difficulty: 3 */ diff --git a/public/data/bar-negative.js b/public/data/bar-negative.js index 9a1f40e..8cfd1c6 100644 --- a/public/data/bar-negative.js +++ b/public/data/bar-negative.js @@ -1,5 +1,6 @@ /* -title: 正负条形图 +title: Bar Chart with Negative Value +titleCN: 正负条形图 category: bar difficulty: 4 */ diff --git a/public/data/bar-negative2.js b/public/data/bar-negative2.js index 62eb462..64fcde9 100644 --- a/public/data/bar-negative2.js +++ b/public/data/bar-negative2.js @@ -1,5 +1,6 @@ /* -title: 交错正负轴标签 +title: Bar Chart with Negative Value +titleCN: 交错正负轴标签 category: bar difficulty: 2 */ diff --git a/public/data/bar-polar-real-estate.js b/public/data/bar-polar-real-estate.js index 76e642a..f77dede 100644 --- a/public/data/bar-polar-real-estate.js +++ b/public/data/bar-polar-real-estate.js @@ -1,5 +1,5 @@ /* -title: 极坐标系下的堆叠柱状图 +title: Bar Chart on Polar category: bar difficulty: 7 */ diff --git a/public/data/bar-polar-stack-radial.js b/public/data/bar-polar-stack-radial.js index 7faf61b..f076e6f 100644 --- a/public/data/bar-polar-stack-radial.js +++ b/public/data/bar-polar-stack-radial.js @@ -1,5 +1,6 @@ /* -title: 极坐标系下的堆叠柱状图 +title: Stacked Bar Chart on Polar(Radial) +titleCN: 极坐标系下的堆叠柱状图 category: bar difficulty: 7 */ diff --git a/public/data/bar-polar-stack.js b/public/data/bar-polar-stack.js index 7d1a8dc..8812346 100644 --- a/public/data/bar-polar-stack.js +++ b/public/data/bar-polar-stack.js @@ -1,5 +1,6 @@ /* -title: 极坐标系下的堆叠柱状图 +title: Stacked Bar Chart on Polar +titleCN: 极坐标系下的堆叠柱状图 category: bar difficulty: 7 */ diff --git a/public/data/bar-stack.js b/public/data/bar-stack.js index a36ae92..8d87101 100644 --- a/public/data/bar-stack.js +++ b/public/data/bar-stack.js @@ -1,5 +1,6 @@ /* -title: 堆叠柱状图 +title: Stacked Column Chart +titleCN: 堆叠柱状图 category: bar difficulty: 3 */ diff --git a/public/data/bar-tick-align.js b/public/data/bar-tick-align.js index bc2d045..7707cd0 100644 --- a/public/data/bar-tick-align.js +++ b/public/data/bar-tick-align.js @@ -1,5 +1,6 @@ /* -title: 坐标轴刻度与标签对齐 +title: Axis Align with Tick +titleCN: 坐标轴刻度与标签对齐 category: bar difficulty: 0 */ diff --git a/public/data/bar-waterfall.js b/public/data/bar-waterfall.js index 8951f90..5e03b5c 100644 --- a/public/data/bar-waterfall.js +++ b/public/data/bar-waterfall.js @@ -1,5 +1,6 @@ /* -title: '深圳月最低生活费组成(单位:元)' +title: Waterfall Chart +titleCN: 瀑布图(柱状图模拟) category: bar difficulty: 1 */ diff --git a/public/data/bar-waterfall2.js b/public/data/bar-waterfall2.js index 4b85e65..d661a64 100644 --- a/public/data/bar-waterfall2.js +++ b/public/data/bar-waterfall2.js @@ -1,5 +1,6 @@ /* -title: 阶梯瀑布图 +title: Waterfall Chart +titleCN: 阶梯瀑布图(柱状图模拟) category: bar difficulty: 3 */ - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] jadedrip opened a new issue #13491: xAxis 'time' 类型不能设置 最大最小值,图表会乱掉
jadedrip opened a new issue #13491: URL: https://github.com/apache/incubator-echarts/issues/13491 ### Version 4.9.0 ### Steps to reproduce 复制代码到网页 https://echarts.apache.org/examples/zh/editor.html?c=line-simple 就可复现 ### What is expected? 正常显示 ### What is actually happening? 图表混乱 --- option = { "animation": false, "xAxis": { "type": "time", "axisLine": { "show": false }, "axisTick": { "show": false }, "splitLine": { "show": false }, "min": "2019-11-01", "max": "2019-11-30" }, "yAxis": { "type": "value" }, "legend": { "data": ["深睡", "浅睡"] }, "series": [{ "name": "深睡", "type": "bar", "stack": "总量", "label": { "show": true, "position": "insideRight" }, "data": [ ["2019-11-21", 0.8] ] }, { "name": "浅睡", "type": "bar", "stack": "总量", "label": { "show": true, "position": "insideRight" }, "data": ["2019-11-21", 0.2] }] } This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13491: xAxis 'time' 类型不能设置 最大最小值,图表会乱掉
echarts-bot[bot] commented on issue #13491: URL: https://github.com/apache/incubator-echarts/issues/13491#issuecomment-717013212 Hi! We've received your issue and please be patient to get responded. The average response time is expected to be within one day for weekdays. In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to d...@echarts.apache.org. Please attach the issue link if it's a technical questions. If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html). Have a nice day! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org