Skip to content

Commit

Permalink
Use new rules_haskell name for bazel 2.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Mar 7, 2020
1 parent ccaf1b9 commit 139ba02
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 72 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/cabal.config
/cabal.sandbox.config
/dist
/stack.yaml.lock
/.stack-work
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
language: generic
os: linux

cache:
timeout: 600
Expand All @@ -8,7 +9,7 @@ cache:

before_install:
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://github.com/TokTok/hs-tools/releases/download/v0.1/hs-tools-v0.1.tar.gz | tar xz -C $HOME
- travis_retry curl -L https://github.com/TokTok/hs-tools/releases/download/v0.6/hs-tools-v0.6.tar.gz | tar xz -C $HOME

script:
- hlint .
Expand Down
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@ai_formation_hazel//:hazel.bzl", "hazel_library")
load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_library")
load("//third_party/haskell/hspec-discover:build_defs.bzl", "hspec_test")
load("//tools/project:build_defs.bzl", "project")

Expand Down
10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
cache:
- '%APPDATA%\cabal'
- '%APPDATA%\ghc'
- '%APPDATA%\stack'

install:
- choco install ghc --version 8.2.2
- choco install haskell-stack
- refreshenv
- cabal update
- cabal install happy --overwrite-policy=always

build_script:
- cabal update
- cabal install alex happy
- cabal install --enable-tests --enable-benchmarks --disable-documentation --only-dependencies
- stack --no-terminal build

test_script:
- cabal test
- stack --no-terminal test --coverage
10 changes: 5 additions & 5 deletions github-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ library
, containers
, cryptohash
, exceptions
, github >= 0.19
, github == 0.25
, groom
, html
, http-client >= 0.4.30
Expand All @@ -130,7 +130,7 @@ executable hub-pulls
build-depends:
base >= 4 && < 5
, bytestring
, github >= 0.19
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
Expand All @@ -143,7 +143,7 @@ executable hub-changelog
build-depends:
base >= 4 && < 5
, bytestring
, github >= 0.19
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
Expand All @@ -156,7 +156,7 @@ executable hub-roadmap
build-depends:
base >= 4 && < 5
, bytestring
, github >= 0.19
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
Expand All @@ -173,7 +173,7 @@ executable webservice
, bytestring
, case-insensitive
, expiring-cache-map
, github >= 0.19
, github == 0.25
, http-media
, http-types
, mtl
Expand Down
6 changes: 3 additions & 3 deletions src/Changelogs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ makeChangeLog wantRoadmap ownerName repoName pulls issues =
map $ \issue -> ChangeLogItem
{ clMilestone = "Backlog"
, clTitle = GitHub.issueTitle issue
, clNumber = GitHub.issueNumber issue
, clNumber = GitHub.unIssueNumber $ GitHub.issueNumber issue
}

backlogPrItems = addToBacklog backlogPrs
Expand All @@ -186,7 +186,7 @@ makeChangeLog wantRoadmap ownerName repoName pulls issues =
issue -> Just ChangeLogItem
{ clMilestone = GitHub.milestoneTitle . Maybe.fromJust . GitHub.issueMilestone $ issue
, clTitle = GitHub.issueTitle issue
, clNumber = GitHub.issueNumber issue
, clNumber = GitHub.unIssueNumber $ GitHub.issueNumber issue
}
) selectedItems

Expand All @@ -196,7 +196,7 @@ makeChangeLog wantRoadmap ownerName repoName pulls issues =
return ChangeLogItem
{ clMilestone = milestone
, clTitle = GitHub.simplePullRequestTitle issue
, clNumber = GitHub.simplePullRequestNumber issue
, clNumber = GitHub.unIssueNumber $ GitHub.simplePullRequestNumber issue
}
) selectedPrs

Expand Down
3 changes: 2 additions & 1 deletion src/GitHub/WebHook/Handler.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module GitHub.WebHook.Handler
( Handler (..)
, Error (..)
Expand Down Expand Up @@ -134,4 +135,4 @@ runHandler h = do

pure $ case mbDelivery of
Nothing -> Left InvalidRequest
Just uuid -> fmap ((,) uuid) res
Just uuid -> fmap (uuid,) res
5 changes: 2 additions & 3 deletions src/PullStatus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import qualified Data.Text as Text
import Data.Time.Clock (getCurrentTime)
import qualified Data.Vector as V
import qualified GitHub
import qualified GitHub.Data.Id as GitHub
import Network.HTTP.Client (Manager, newManager)
import Network.HTTP.Client.TLS (tlsManagerSettings)

Expand All @@ -32,7 +31,6 @@ getFullPr
getFullPr auth mgr owner repo =
request auth mgr
. GitHub.pullRequestR owner repo
. GitHub.Id
. GitHub.simplePullRequestNumber


Expand All @@ -57,7 +55,7 @@ makePullRequestInfo
-> PullRequestInfo
makePullRequestInfo repoName (reviewers, pr) = PullRequestInfo
{ prRepoName = GitHub.untagName repoName
, prNumber = GitHub.pullRequestNumber pr
, prNumber = GitHub.unIssueNumber $ GitHub.pullRequestNumber pr
, prUser = user
, prBranch = Text.tail branch
, prCreated = GitHub.pullRequestCreatedAt pr
Expand All @@ -72,6 +70,7 @@ makePullRequestInfo repoName (reviewers, pr) = PullRequestInfo
showMergeableState GitHub.StateBlocked = "blocked"
showMergeableState GitHub.StateClean = "clean"
showMergeableState GitHub.StateDirty = "dirty"
showMergeableState GitHub.StateDraft = "draft"
showMergeableState GitHub.StateUnknown = "unknown"
showMergeableState GitHub.StateUnstable = "unstable"

Expand Down
4 changes: 3 additions & 1 deletion src/Requests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
module Requests where

import Control.Monad.Catch (throwM)
import Data.Aeson (FromJSON)
import qualified GitHub
import Network.HTTP.Client (Manager)


request
:: Maybe GitHub.Auth
:: FromJSON a
=> Maybe GitHub.Auth
-> Manager
-> GitHub.Request 'GitHub.RO a
-> IO a
Expand Down
56 changes: 3 additions & 53 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,6 @@
---
packages: [.]
resolver: lts-6.27
resolver: lts-15.2
extra-deps:
- HUnit-1.6.0.0
- QuickCheck-2.11.3
- aeson-1.4.0.0
- aeson-compat-0.3.8
- attoparsec-0.13.2.2
- attoparsec-iso8601-1.0.0.0
- base-compat-0.10.4
- base-orphans-0.5.4
- bifunctors-5.5.3
- binary-orphans-0.1.8.0
- bsb-http-chunked-0.0.0.2
- bytestring-builder-0.10.8.1.0
- cabal-doctest-1.0.6
- case-insensitive-1.2.0.11
- cpphs-1.20.8
- exceptions-0.8.3
- fast-logger-2.4.11
- github-0.19
- hspec-2.5.5
- hspec-core-2.5.5
- hspec-discover-2.5.5
- hspec-expectations-0.8.2
- http-api-data-0.3.8.1
- http-media-0.7.1.2
- http-types-0.12.1
- mmorph-1.1.2
- natural-transformation-0.4
- network-2.7.0.2
- parsec-3.1.13.0
- quickcheck-io-0.2.0
- resourcet-1.1.11
- safe-0.3.17
- semigroupoids-5.2.1
- semigroups-0.18.5
- servant-0.13.0.1
- servant-server-0.13.0.1
- singleton-bool-0.1.4
- split-0.2.3.3
- string-conversions-0.4.0.1
- tagged-0.8.6
- text-1.2.3.0
- th-abstraction-0.2.8.0
- transformers-compat-0.5.1.4
- unix-compat-0.5.0.1
- unix-time-0.3.8
- unliftio-core-0.1.1.0
- vault-0.3.1.1
- vector-binary-instances-0.2.4
- vector-instances-3.4
- wai-extra-3.0.22.0
- warp-3.2.23
- word8-0.1.3
- binary-instances-1
- github-0.25

0 comments on commit 139ba02

Please sign in to comment.