UNPKG

@timebyping/semantic-release-slack-bot

Version:

A slack bot for semantic-release notifying release statuses

23 lines (18 loc) 783 B
/** * Copyright © Time By Ping, Inc. 2025. All rights reserved. * * Any unauthorized reproduction, distribution, public display, public * performance or derivatization thereof can constitute, among other things, an * infringement of Time By Ping Inc.'s exclusive rights under the Copyright Law * of the U.S. (17 U.S.C. § 106) and may subject the infringer thereof to * severe legal liability. */ import micromatch from 'micromatch'; export default (pluginConfig, context) => { const { branch: { name }, } = context; const { branchesConfig = [], ...globalPluginConfig } = pluginConfig; const { pattern, ...branchConfig } = branchesConfig.find(({ pattern }) => micromatch.isMatch(name, pattern)) || {}; return { ...globalPluginConfig, ...branchConfig }; };