Skip to content

Commit

Permalink
feat(1415): Add subscribe field in regex (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
supra08 authored Oct 12, 2020
1 parent 618bf96 commit 2b78547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/getNextJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ const getNextJobs = (workflowGraph, config) => {

workflowGraph.edges.forEach((edge) => {
// Check if edge src is specific branch commit or pr with regexp
const edgeSrcBranchRegExp = new RegExp('^~(pr|commit|release|tag):/(.+)/$');
const edgeSrcBranchRegExp = new RegExp('^~(pr|commit|release|tag|subscribe):/(.+)/$');
const edgeSrcBranch = edge.src.match(edgeSrcBranchRegExp);

if (edgeSrcBranch) {
// Check if trigger is specific branch commit or pr
const triggerBranchRegExp = new RegExp('^~(pr|commit|release|tag):(.+)$');
const triggerBranchRegExp = new RegExp('^~(pr|commit|release|tag|subscribe):(.+)$');
const triggerBranch = config.trigger.match(triggerBranchRegExp);

// Check whether job types of trigger and edge src match
Expand Down

0 comments on commit 2b78547

Please sign in to comment.