1module CompaREST.GitHub.Action.Config
8import qualified Data.Text as T
9import qualified GitHub as GH
14 { githubToken :: GH.Auth
15 , repoOwner :: GH.Name GH.Owner
16 , repoName :: GH.Name GH.Repo
20 , sha :: GH.Name GH.Commit
23instance FromEnv Config where
25 token <- GH.OAuth <$> env "GITHUB_TOKEN"
27 T.split (== '/') <$> env "REPO" >>= \case
28 [owner, name] -> pure (owner, name)
29 _ -> fail "malformed repo"
30 projectName <- env "PROJECT_NAME"
31 footerText <- env "FOOTER"
32 root <- envMaybe "ROOT" .!= "."
37 , repoOwner = GH.mkName Proxy owner
38 , repoName = GH.mkName Proxy repo
39 , projectName = projectName
40 , footerText = footerText
42 , sha = GH.mkName Proxy sha
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