1{-# LANGUAGE NoImplicitPrelude #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE ViewPatterns #-}
4module Stackage.GithubPings
8import Distribution.PackageDescription
9import Stackage.BuildConstraints
10import Stackage.Prelude
12-- | Determine accounts to be pinged on Github based on various metadata in the
13-- package description.
14getGithubPings :: BuildConstraints -- ^ for mapping to pingees
15 -> GenericPackageDescription -> Set Text
16getGithubPings bc gpd =
17 foldMap (\(pack -> name) -> fromMaybe (singletonSet name) (lookup name (bcGithubUsers bc))) $
18 goHomepage (homepage $ packageDescription gpd) ++
19 concatMap goRepo (sourceRepos $ packageDescription gpd)
23 [ "http://github.com/"
24 , "https://github.com/"
28 t' <- maybeToList $ stripPrefix prefix t
29 let t'' = takeWhile (/= '/') t'
30 guard $ not $ null t''
34 case (repoType sr, repoLocation sr) of
35 (Just Git, Just s) -> goHomepage s
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list