UNPKG

@timebyping/semantic-release-slack-bot

Version:

A slack bot for semantic-release notifying release statuses

16 lines (12 loc) 422 B
import micromatch from 'micromatch' export default (pluginConfig, context) => { const { branch: { name } } = context const { branchesConfig = [], ...globalPluginConfig } = pluginConfig // eslint-disable-next-line no-unused-vars const { pattern, ...branchConfig } = branchesConfig.find(({ pattern }) => micromatch.isMatch(name, pattern)) || {} return { ...globalPluginConfig, ...branchConfig } }