Skip to content

Commit f1c34a1

Browse files
authored
Merge pull request haskell-github#446 from phadej/prepare-0.26
Prepare 0.26
2 parents 63efc7f + 878a452 commit f1c34a1

File tree

11 files changed

+146
-98
lines changed

11 files changed

+146
-98
lines changed

.travis.yml

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
#
33
# haskell-ci '--config=cabal.haskell-ci' 'cabal.project'
44
#
5+
# To regenerate the script (for example after adjusting tested-with) run
6+
#
7+
# haskell-ci regenerate
8+
#
59
# For more information, see https://github.com/haskell-CI/haskell-ci
610
#
7-
# version: 0.5.20190908
11+
# version: 0.10.1
812
#
13+
version: ~> 1.0
914
language: c
15+
os: linux
1016
dist: xenial
1117
git:
1218
# whether to recursively clone submodules
@@ -18,6 +24,7 @@ cache:
1824
directories:
1925
- $HOME/.cabal/packages
2026
- $HOME/.cabal/store
27+
- $HOME/.hlint
2128
before_cache:
2229
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2330
# remove files that are regenerated by 'cabal update'
@@ -27,22 +34,32 @@ before_cache:
2734
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
2835
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
2936
- rm -rfv $CABALHOME/packages/head.hackage
30-
matrix:
37+
jobs:
3138
include:
32-
- compiler: ghc-8.8.1
33-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
39+
- compiler: ghc-8.10.1
40+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.2"]}}
41+
os: linux
42+
- compiler: ghc-8.8.3
43+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
44+
os: linux
3445
- compiler: ghc-8.6.5
35-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
46+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
47+
os: linux
3648
- compiler: ghc-8.4.4
37-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
49+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
50+
os: linux
3851
- compiler: ghc-8.2.2
39-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
52+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
53+
os: linux
4054
- compiler: ghc-8.0.2
41-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
55+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
56+
os: linux
4257
- compiler: ghc-7.10.3
43-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-3.0"]}}
58+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.2"]}}
59+
os: linux
4460
- compiler: ghc-7.8.4
45-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-3.0"]}}
61+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.2"]}}
62+
os: linux
4663
before_install:
4764
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
4865
- WITHCOMPILER="-w $HC"
@@ -55,29 +72,8 @@ before_install:
5572
- TOP=$(pwd)
5673
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
5774
- echo $HCNUMVER
58-
- CABAL="$CABAL -vnormal+nowrap+markoutput"
75+
- CABAL="$CABAL -vnormal+nowrap"
5976
- set -o pipefail
60-
- |
61-
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
62-
echo 'BEGIN { state = "output"; }' >> .colorful.awk
63-
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
64-
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
65-
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
66-
echo ' if (state == "cabal") {' >> .colorful.awk
67-
echo ' print blue($0)' >> .colorful.awk
68-
echo ' } else {' >> .colorful.awk
69-
echo ' print $0' >> .colorful.awk
70-
echo ' }' >> .colorful.awk
71-
echo '}' >> .colorful.awk
72-
- cat .colorful.awk
73-
- |
74-
color_cabal_output () {
75-
awk -f $TOP/.colorful.awk
76-
}
77-
- echo text | color_cabal_output
78-
install:
79-
- ${CABAL} --version
80-
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
8177
- TEST=--enable-tests
8278
- BENCH=--enable-benchmarks
8379
- HEADHACKAGE=false
@@ -98,6 +94,9 @@ install:
9894
echo " prefix: $CABALHOME" >> $CABALHOME/config
9995
echo "repository hackage.haskell.org" >> $CABALHOME/config
10096
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
97+
install:
98+
- ${CABAL} --version
99+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
101100
- |
102101
echo "program-default-options" >> $CABALHOME/config
103102
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
@@ -110,25 +109,30 @@ install:
110109
- |
111110
echo "packages: ." >> cabal.project
112111
echo "packages: samples" >> cabal.project
112+
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package github' >> cabal.project ; fi
113+
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
114+
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package github-samples' >> cabal.project ; fi
115+
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
113116
- |
114-
echo "constraints: hashable ^>=1.3" >> cabal.project
115-
echo "constraints: semigroups ^>=0.19" >> cabal.project
116-
echo "constraints: github +openssl" >> cabal.project
117-
echo "optimization: False" >> cabal.project
117+
echo "constraints: hashable ^>=1.3" >> cabal.project
118+
echo "constraints: semigroups ^>=0.19" >> cabal.project
119+
echo "constraints: github +openssl" >> cabal.project
120+
echo "constraints: github-samples +openssl" >> cabal.project
121+
echo "optimization: False" >> cabal.project
118122
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(github|github-samples)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
119123
- cat cabal.project || true
120124
- cat cabal.project.local || true
121125
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
122126
- if [ -f "samples/configure.ac" ]; then (cd "samples" && autoreconf -i); fi
123-
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
127+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
124128
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
125129
- rm cabal.project.freeze
126-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
127-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
130+
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
131+
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
128132
script:
129133
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
130134
# Packaging...
131-
- ${CABAL} v2-sdist all | color_cabal_output
135+
- ${CABAL} v2-sdist all
132136
# Unpacking...
133137
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
134138
- cd ${DISTDIR} || false
@@ -142,30 +146,35 @@ script:
142146
- |
143147
echo "packages: ${PKGDIR_github}" >> cabal.project
144148
echo "packages: ${PKGDIR_github_samples}" >> cabal.project
149+
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package github' >> cabal.project ; fi
150+
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
151+
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package github-samples' >> cabal.project ; fi
152+
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
145153
- |
146-
echo "constraints: hashable ^>=1.3" >> cabal.project
147-
echo "constraints: semigroups ^>=0.19" >> cabal.project
148-
echo "constraints: github +openssl" >> cabal.project
149-
echo "optimization: False" >> cabal.project
154+
echo "constraints: hashable ^>=1.3" >> cabal.project
155+
echo "constraints: semigroups ^>=0.19" >> cabal.project
156+
echo "constraints: github +openssl" >> cabal.project
157+
echo "constraints: github-samples +openssl" >> cabal.project
158+
echo "optimization: False" >> cabal.project
150159
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(github|github-samples)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
151160
- cat cabal.project || true
152161
- cat cabal.project.local || true
153162
# Building...
154163
# this builds all libraries and executables (without tests/benchmarks)
155-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
164+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
156165
# Building with tests and benchmarks...
157166
# build & run tests, build benchmarks
158-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
167+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
159168
# Testing...
160-
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
169+
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
161170
# cabal check...
162171
- (cd ${PKGDIR_github} && ${CABAL} -vnormal check)
163172
- (cd ${PKGDIR_github_samples} && ${CABAL} -vnormal check)
164173
# haddock...
165-
- if [ $HCNUMVER -ge 80600 ] ; then ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output ; fi
174+
- if [ $HCNUMVER -ge 80600 ] ; then ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all ; fi
166175
# Building without installed constraints for packages in global-db...
167176
- rm -f cabal.project.local
168-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
177+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
169178

170-
# REGENDATA ["--config=cabal.haskell-ci","cabal.project"]
179+
# REGENDATA ("0.10.1",["--config=cabal.haskell-ci","cabal.project"])
171180
# EOF

CHANGELOG.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
## Changes for 0.24
2-
3-
**Major change**:
4-
Introduce `github` n-ary combinator to hoist `... -> Request rw res`
5-
into `... -> IO (Either Error res)` (i.e. n-ary `executeRequest`).
6-
With that in place drop `.. -> IO (Either Error res)` functions.
7-
8-
This reduces symbol bloat in the library.
9-
[#415](https://github.com/phadej/github/pull/415)
1+
## Changes for 0.26
2+
3+
- Generalize PagedQuery to allow its reuse by preview github APIs
4+
[#439](https://github.com/phadej/github/pull/439)
5+
- Add endpoint for listing organizations outside collaborators
6+
[#445](https://github.com/phadej/github/pull/445)
7+
- Add endpoint for users search
8+
[#444](https://github.com/phadej/github/pull/444)
9+
- Make repoWebhookResponseStatus optional
10+
[#436](https://github.com/phadej/github/pull/436)
11+
- Teams improvements
12+
[#417](https://github.com/phadej/github/pull/417)
13+
- Add deleteReference endpoint
14+
[#388](https://github.com/phadej/github/pull/388)
15+
16+
## Changes for 0.25
1017

11-
- Remove double `withOpenSSL`
12-
[#414](https://github.com/phadej/github/pull/414)
13-
- Pull requests reviews API uses issue number
14-
[#409](https://github.com/phadej/github/pull/409)
15-
- Update `Repo`, `NewRepo` and `EditRepo` data types
16-
[#407](https://github.com/phadej/github/pull/407)
1718
- Add `executeRequestWithMgrAndRes`
1819
[#421](https://github.com/phadej/github/pull/421)
1920
- Add `limitsFromHttpResponse`
@@ -29,10 +30,27 @@ This reduces symbol bloat in the library.
2930
- Add support for collaborator permission endpoint
3031
[#425](https://github.com/phadej/github/pull/425)
3132
- Add support for the comment reply endpoint
32-
[#424](Add support for the comment reply endpoint)
33+
[#424](https://github.com/phadej/github/pull/424)
3334
- Organise exports in `GitHub`
3435
[#430](https://github.com/phadej/github/pull/430)
3536

37+
## Changes for 0.24
38+
39+
**Major change**:
40+
Introduce `github` n-ary combinator to hoist `... -> Request rw res`
41+
into `... -> IO (Either Error res)` (i.e. n-ary `executeRequest`).
42+
With that in place drop `.. -> IO (Either Error res)` functions.
43+
44+
This reduces symbol bloat in the library.
45+
[#415](https://github.com/phadej/github/pull/415)
46+
47+
- Remove double `withOpenSSL`
48+
[#414](https://github.com/phadej/github/pull/414)
49+
- Pull requests reviews API uses issue number
50+
[#409](https://github.com/phadej/github/pull/409)
51+
- Update `Repo`, `NewRepo` and `EditRepo` data types
52+
[#407](https://github.com/phadej/github/pull/407)
53+
3654
## Changes for 0.23
3755

3856
- Escape URI paths

github.cabal

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: >=1.10
22
name: github
3-
version: 0.24
3+
version: 0.26
44
synopsis: Access to the GitHub API, v3.
55
category: Network
66
description:
@@ -36,7 +36,8 @@ tested-with:
3636
|| ==8.2.2
3737
|| ==8.4.4
3838
|| ==8.6.5
39-
|| ==8.8.1
39+
|| ==8.8.3
40+
|| ==8.10.1
4041

4142
extra-source-files:
4243
README.md
@@ -163,7 +164,7 @@ library
163164

164165
-- Packages bundles with GHC, mtl and text are also here
165166
build-depends:
166-
base >=4.7 && <4.14
167+
base >=4.7 && <4.15
167168
, binary >=0.7.1.0 && <0.11
168169
, bytestring >=0.10.4.0 && <0.11
169170
, containers >=0.5.5.1 && <0.7
@@ -175,15 +176,15 @@ library
175176

176177
-- other packages
177178
build-depends:
178-
aeson >=1.4.0.0 && <1.5
179-
, base-compat >=0.10.4 && <0.12
179+
aeson >=1.4.0.0 && <1.6
180+
, base-compat >=0.11.1 && <0.12
180181
, base16-bytestring >=0.1.1.6 && <0.2
181182
, binary-instances >=1 && <1.1
182183
, cryptohash-sha1 >=0.11.100.1 && <0.12
183184
, deepseq-generics >=0.2.0.0 && <0.3
184185
, exceptions >=0.10.2 && <0.11
185186
, hashable >=1.2.7.0 && <1.4
186-
, http-client >=0.5.12 && <0.7
187+
, http-client >=0.5.12 && <0.8
187188
, http-link-header >=1.0.3.1 && <1.1
188189
, http-types >=0.12.3 && <0.13
189190
, iso8601-time >=0.1.5 && <0.2

samples/Organizations/Teams/CreateTeamFor.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main = do
1313
Github.createTeamFor'
1414
(Github.OAuth token)
1515
org
16-
(Github.CreateTeam team (Just desc) (read repos :: [String]) Github.PermissionPull)
16+
(Github.CreateTeam team (Just desc) (read repos :: [String]) Github.PrivacyClosed Github.PermissionPull)
1717
_ ->
1818
error "usage: CreateTeamFor <token> <org> <team_name> <description> <[\"repos\"]>"
1919
case result of

samples/Teams/EditTeam.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ main = do
1515
(GitHub.OAuth $ fromString token)
1616
GitHub.editTeamR
1717
(GitHub.mkTeamId $ read team_id)
18-
(GitHub.EditTeam (GitHub.mkTeamName $ fromString team_name) (Just $ fromString desc) GitHub.PermissionPull)
18+
(GitHub.EditTeam (GitHub.mkTeamName $ fromString team_name) (Just $ fromString desc) Nothing Nothing)
1919
_ ->
2020
error "usage: EditTeam <token> <team_id> <team_name> <description>"
2121
case result of

samples/github-samples.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ tested-with:
1515
|| ==8.2.2
1616
|| ==8.4.4
1717
|| ==8.6.5
18-
|| ==8.8.1
18+
|| ==8.8.3
19+
|| ==8.10.1
1920

2021
library
2122
hs-source-dirs: src

src/GitHub.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ module GitHub (
100100
referenceR,
101101
referencesR,
102102
createReferenceR,
103+
deleteReferenceR,
104+
namespacedReferencesR,
103105

104106
-- ** Trees
105107
-- | See <https://developer.github.com/v3/git/trees/>

src/GitHub/Data/GitData.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ instance Binary NewGitReference
156156
data GitReference = GitReference
157157
{ gitReferenceObject :: !GitObject
158158
, gitReferenceUrl :: !URL
159-
, gitReferenceRef :: !Text
159+
, gitReferenceRef :: !(Name GitReference)
160160
}
161161
deriving (Show, Data, Typeable, Eq, Ord, Generic)
162162

0 commit comments

Comments
 (0)