make meta homepage and meta description optional

This commit is contained in:
Ryan Mulligan 2019-05-05 13:53:02 -07:00
parent 5eb0cbed2d
commit a780689927

View File

@ -177,12 +177,16 @@ publishPackage log updateEnv oldSrcUrl newSrcUrl attrPath result opDiff = do
case Blacklist.checkResult (packageName updateEnv) of
Right () -> lift $ Check.result updateEnv result
Left msg -> pure msg
d <- Nix.getDescription attrPath
u <- Nix.getHomepage attrPath
d <- Nix.getDescription attrPath <|> return T.empty
u <- Nix.getHomepage attrPath <|> return T.empty
let metaDescription =
"\n\nmeta.description for " <> attrPath <> " is: '" <> d <> "'."
if d == T.empty
then ""
else "\n\nmeta.description for " <> attrPath <> " is: '" <> d <> "'."
let metaHomepage =
"\n\nmeta.homepage for " <> attrPath <> " is: '" <> u
if u == T.empty
then ""
else "\n\nmeta.homepage for " <> attrPath <> " is: '" <> u
releaseUrlMessage <-
(do msg <- GH.releaseUrl newSrcUrl
return ("\n[Release on GitHub](" <> msg <> ")\n\n")) <|>
@ -273,6 +277,7 @@ prMessage updateEnv isBroken metaDescription metaHomepage releaseUrlMessage comp
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from $repologyLink.
$brokenMsg
$metaDescription
$metaHomepage
$releaseUrlMessage
$compareUrlMessage
<details>