module Changelogged.Types where
import Data.Text (Text)
import Prelude hiding (FilePath)
import Turtle
import GHC.Generics
type Variable = Text
type Key = Text
data Level = App | Major | Minor | Fix | Doc
deriving (Show, Enum, Bounded)
data Mode = PR | Commit
data Git = Git
{ gitHistory :: FilePath
, gitLink :: Text
, gitRevision :: Text
}
data TaggedFile = TaggedFile
{ taggedFilePath :: FilePath
, taggedFileVariable :: Variable
} deriving (Show, Generic)
data TaggedLog = TaggedLog
{ taggedLogPath :: FilePath
, taggedLogIndicator :: Maybe TaggedFile
} deriving (Show, Generic)
instance Show Mode where
show PR = "Pull request"
show Commit = "Single commit"
data WarningFormat
= WarnSimple
| WarnSuggest
deriving (Enum, Bounded)
instance Show WarningFormat where
show WarnSimple = "simple"
show WarnSuggest = "suggest"