packages feed

gh (empty) → 0.1.0.0

raw patch · 4 files changed

+154/−0 lines, 4 filesdep +basedep +ghdep +hspec

Dependencies added: base, gh, hspec, hspec-discover, process, relude, which

Files

+ gh.cabal view
@@ -0,0 +1,114 @@+cabal-version: 2.0++-- This file has been generated from package.yaml by hpack version 0.37.0.+--+-- see: https://github.com/sol/hpack++name:           gh+version:        0.1.0.0+synopsis:       Haskell bindings for gh CLI+description:    A standalone library for gh CLI operations+category:       System+homepage:       https://github.com/juspay/vira/tree/main/packages/gh+author:         Sridhar Ratnakumar+maintainer:     srid@srid.ca+copyright:      2025 Juspay+license:        MIT+build-type:     Simple++library+  exposed-modules:+      GH.Signoff+  other-modules:+      Paths_gh+  autogen-modules:+      Paths_gh+  hs-source-dirs:+      src+  default-extensions:+      DataKinds+      DeriveDataTypeable+      DeriveGeneric+      DeriveTraversable+      DerivingStrategies+      DerivingVia+      ExplicitForAll+      FlexibleContexts+      FlexibleInstances+      GeneralizedNewtypeDeriving+      ImportQualifiedPost+      LambdaCase+      MultiParamTypeClasses+      MultiWayIf+      NamedFieldPuns+      NoStarIsType+      NumericUnderscores+      OverloadedStrings+      ScopedTypeVariables+      StrictData+      TypeApplications+      TypeFamilies+      TypeOperators+      TypeSynonymInstances+      ViewPatterns+  ghc-options: -Wall -optP-Wno-nonportable-include-path -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wunused-foralls -fprint-explicit-foralls -fprint-explicit-kinds+  build-depends:+      base ==4.*+    , process+    , relude >=1.0+    , which+  mixins:+      base hiding (Prelude)+    , relude (Relude as Prelude, Relude.Container.One)+    , relude +  default-language: GHC2021++executable gh-test+  main-is: Spec.hs+  other-modules:+      GH.SignoffSpec+      Paths_gh+  autogen-modules:+      Paths_gh+  hs-source-dirs:+      test+  default-extensions:+      DataKinds+      DeriveDataTypeable+      DeriveGeneric+      DeriveTraversable+      DerivingStrategies+      DerivingVia+      ExplicitForAll+      FlexibleContexts+      FlexibleInstances+      GeneralizedNewtypeDeriving+      ImportQualifiedPost+      LambdaCase+      MultiParamTypeClasses+      MultiWayIf+      NamedFieldPuns+      NoStarIsType+      NumericUnderscores+      OverloadedStrings+      ScopedTypeVariables+      StrictData+      TypeApplications+      TypeFamilies+      TypeOperators+      TypeSynonymInstances+      ViewPatterns+  ghc-options: -Wall -optP-Wno-nonportable-include-path -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wunused-foralls -fprint-explicit-foralls -fprint-explicit-kinds -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      base ==4.*+    , gh+    , hspec+    , hspec-discover+    , process+    , relude >=1.0+    , which+  mixins:+      base hiding (Prelude)+    , relude (Relude as Prelude, Relude.Container.One)+    , relude +  default-language: GHC2021
+ src/GH/Signoff.hs view
@@ -0,0 +1,30 @@+{-# LANGUAGE TemplateHaskell #-}++{- | Working with gh-signoff++A standalone library for gh-signoff operations.+-}+module GH.Signoff (ghSignoffProcess) where++import System.Info qualified as SysInfo+import System.Process (CreateProcess, proc)+import System.Which (staticWhich)++{- | Path to the `gh-signoff` executable++This should be available in the PATH, thanks to Nix and `which` library.+-}+ghSignoffBin :: FilePath+ghSignoffBin = $(staticWhich "gh-signoff")++{- | System platform string++Computed from System.Info at runtime in Nix format (arch-os).+-}+nixSystem :: String+nixSystem = SysInfo.arch <> "-" <> SysInfo.os++-- | Create a process to run gh-signoff create with force flag and platform context+ghSignoffProcess :: String -> String -> CreateProcess+ghSignoffProcess name k =+  proc ghSignoffBin ["create", "-f", name <> "/" <> nixSystem <> "/" <> k]
+ test/GH/SignoffSpec.hs view
@@ -0,0 +1,9 @@+module GH.SignoffSpec where++import Test.Hspec++spec :: Spec+spec = do+  describe "gh-signoff" $ do+    it "placeholder test" $ do+      True `shouldBe` True
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}