Skip to content

Commit

Permalink
epics do not need to be time estimated #138
Browse files Browse the repository at this point in the history
  • Loading branch information
naazy committed Aug 18, 2017
1 parent 4d1b10f commit cf27157
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/controllers/rules/issue/time_estimation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ defmodule Dwylbot.Rules.Issue.TimeEstimation do

labels = payload["issue"]["labels"]
in_progress = Enum.any?(labels, fn(l) -> l["name"] == "in-progress" end)
epic = Enum.any?(labels, fn(l) -> l["name"] == "epic" end)
estimation = labels
|> Enum.map(fn(l) -> Regex.match?(~r/T\d{1,3}[mhd]/, l["name"]) end)
|> Enum.reduce(false, fn(x, acc) -> x || acc end)
if in_progress && !estimation do
if in_progress && !epic && !estimation do
%{
error_type: @rule_name,
actions: [
Expand Down

0 comments on commit cf27157

Please sign in to comment.