1{- This Source Code Form is subject to the terms of the Mozilla Public
2 - License, v. 2.0. If a copy of the MPL was not distributed with this
3 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
8module GitHub.App.Request
10 , executeAppRequestWithMgr
13import Data.Aeson (FromJSON)
14import GitHub.Data (Error (..))
15import GitHub.Data.Request (Request)
16import GitHub.Request (executeRequestWithMgr)
17import Network.HTTP.Client (Manager)
18import Network.HTTP.Client.TLS (newTlsManager)
20import GitHub.App.Auth (InstallationAuth, obtainAccessToken)
23executeAppRequest :: FromJSON a => InstallationAuth -> Request k a -> IO (Either Error a)
24executeAppRequest instAuth req = do
25 manager <- newTlsManager
26 x <- executeAppRequestWithMgr manager instAuth req
27#if !MIN_VERSION_http_client(0, 4, 18)
32executeAppRequestWithMgr
37 -> IO (Either Error a)
38executeAppRequestWithMgr mgr instAuth req = obtainAccessToken mgr instAuth >>= \case
39 Right auth -> executeRequestWithMgr mgr auth req
40 Left err -> pure $ Left err
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