Skip to content

Commit

Permalink
feat: update body regex to support different gitlab URL patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 18, 2018
1 parent cc05b57 commit b36a289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ func (i Issue) AddNodeToGraph(g *gographviz.Graph, parent string) error {

func (issues Issues) prepare() error {
var (
dependsOnRegex, _ = regexp.Compile(`(?i)(require|requires|blocked by|block by|depend on|depends on|parent of) ([a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
blocksRegex, _ = regexp.Compile(`(?i)(blocks|block|address|addresses|part of|child of|fix|fixes) ([a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
isDuplicateRegex, _ = regexp.Compile(`(?i)(duplicates|duplicate|dup of|dup|duplicate of) ([a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
dependsOnRegex, _ = regexp.Compile(`(?i)(require|requires|blocked by|block by|depend on|depends on|parent of) ([a-z0-9:/_.-]+issues/[0-9]+|[a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
blocksRegex, _ = regexp.Compile(`(?i)(blocks|block|address|addresses|part of|child of|fix|fixes) ([a-z0-9:/_.-]+issues/[0-9]+|[a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
isDuplicateRegex, _ = regexp.Compile(`(?i)(duplicates|duplicate|dup of|dup|duplicate of) ([a-z0-9:/_.-]+issues/[0-9]+|[a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`)
weightMultiplierRegex, _ = regexp.Compile(`(?i)(depviz.weight_multiplier[:= ]+)([0-9]+)`)
baseWeightRegex, _ = regexp.Compile(`(?i)(depviz.base_weight[:= ]+)([0-9]+)`)
hideFromRoadmapRegex, _ = regexp.Compile(`(?i)(depviz.hide)`) // FIXME: use label
Expand Down

0 comments on commit b36a289

Please sign in to comment.