Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67b4a39

Browse files
authored
Merge pull request haskell-github#314 from phadej/prepare-0.19
Prepare for 0.19 release [wip]
2 parents e4bab2e + df2e36a commit 67b4a39

File tree

9 files changed

+233
-104
lines changed

9 files changed

+233
-104
lines changed

.travis.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# make_travis_yml_2.hs '--branch' 'master' '-o' '.travis.yml' 'github.cabal'
3+
# runghc make_travis_yml_2.hs '--branch' 'master' '-o' '.travis.yml' 'github.cabal'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -28,6 +28,8 @@ before_cache:
2828
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
2929
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
3030

31+
- rm -rfv $HOME/.cabal/packages/head.hackage
32+
3133
matrix:
3234
include:
3335
- compiler: "ghc-7.8.4"
@@ -39,15 +41,19 @@ matrix:
3941
- compiler: "ghc-8.0.2"
4042
# env: TEST=--disable-tests BENCH=--disable-benchmarks
4143
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
42-
- compiler: "ghc-8.2.1"
44+
- compiler: "ghc-8.2.2"
4345
# env: TEST=--disable-tests BENCH=--disable-benchmarks
44-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
46+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
4547

4648
before_install:
4749
- HC=${CC}
4850
- HCPKG=${HC/ghc/ghc-pkg}
4951
- unset CC
50-
- PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
52+
- ROOTDIR=$(pwd)
53+
- mkdir -p $HOME/.local/bin
54+
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
55+
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
56+
- echo $HCNUMVER
5157

5258
install:
5359
- cabal --version
@@ -56,12 +62,15 @@ install:
5662
- TEST=${TEST---enable-tests}
5763
- HADDOCK=${HADDOCK-true}
5864
- INSTALLED=${INSTALLED-true}
65+
- GHCHEAD=${GHCHEAD-false}
5966
- travis_retry cabal update -v
60-
- sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
61-
- rm -fv cabal.project.local
62-
- "echo 'packages: .' > cabal.project"
67+
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
68+
- rm -fv cabal.project cabal.project.local
69+
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
70+
- "printf 'packages: \".\"\\n' > cabal.project"
71+
- cat cabal.project
6372
- if [ -f "./configure.ac" ]; then
64-
(cd "."; autoreconf -i);
73+
(cd "." && autoreconf -i);
6574
fi
6675
- rm -f cabal.project.freeze
6776
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
@@ -73,26 +82,28 @@ install:
7382
# any command which exits with a non-zero exit code causes the build to fail.
7483
script:
7584
# test that source-distributions can be generated
76-
- (cd "."; cabal sdist)
85+
- (cd "." && cabal sdist)
7786
- mv "."/dist/github-*.tar.gz ${DISTDIR}/
78-
- cd ${DISTDIR}
87+
- cd ${DISTDIR} || false
7988
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
80-
- "printf 'packages: github-*/*.cabal\n' > cabal.project"
89+
- "printf 'packages: github-*/*.cabal\\n' > cabal.project"
90+
- cat cabal.project
8191
# this builds all libraries and executables (without tests/benchmarks)
8292
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
8393

8494
# Build with installed constraints for packages in global-db
85-
- if $INSTALLED; then
86-
echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh;
87-
else echo "Not building with installed constraints"; fi
95+
- if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
8896

8997
# build & run tests, build benchmarks
9098
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
91-
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
99+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
100+
101+
# cabal check
102+
- (cd github-* && cabal check)
92103

93104
# haddock
94105
- rm -rf ./dist-newstyle
95-
- if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
106+
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
96107

97108
# REGENDATA ["--branch","master","-o",".travis.yml","github.cabal"]
98109
# EOF

CHANGELOG.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
Changes for 0.18
1+
## Changes for 0.19
2+
3+
- Fix issue event type enumeration
4+
[#301](https://github.com/phadej/github/issues/301)
5+
- Include label info in `IssseEvent`
6+
[#302](https://github.com/phadej/github/issues/302)
7+
- Fix `ShowRepo` example
8+
[#306](https://github.com/phadej/github/pull/306)
9+
- Add "Get archive link" API
10+
[#307](https://github.com/phadej/github/pull/307)
11+
- Make "repo" in PullRequestCommit nullable (repository can be gone)
12+
[#311](https://github.com/phadej/github/pull/311)
13+
- Add read-only emails endpoint
14+
[#313](https://github.com/phadej/github/pull/313)
15+
- Organisation membership API
16+
[#312](https://github.com/phadej/github/pull/312)
17+
- Fix isPullRequestMerged and other boolean responses
18+
[#312](https://github.com/phadej/github/pull/312)
19+
- Add `behind` pull request mergeable state
20+
[#308](https://github.com/phadej/github/pull/308)
21+
- Add list organisation invitations endpoint
22+
23+
## Changes for 0.18
24+
225
- Endpoints for deleting issue comments.
326
[#294](https://github.com/phadej/github/pull/294)
427
- Endpoints for (un)starring gists.
@@ -12,21 +35,23 @@ Changes for 0.18
1235
- Add requested reviewers field to pull request records.
1336
[#292](https://github.com/phadej/github/pull/292)
1437

15-
Changes for 0.17.0
38+
## Changes for 0.17.0
39+
1640
- Add `Ord Request` instance
1741
- Repository contents
1842
- Repository starring endpoints
1943
- Pull Request review endpoints
2044

21-
Changes for 0.16.0
45+
## Changes for 0.16.0
46+
2247
- Add support for `mergeable_state = "blocked".`
2348
- Fix HTTP status code of merge PR
2449
- Supports newest versions of dependencies
2550
- user events
2651
- release endpoints
2752
- forkExistingRepo
2853

29-
Changes for 0.15.0
54+
## Changes for 0.15.0
3055

3156
- Reworked `PullRequest` (notably `pullRequestsFor`)
3257
- Reworked PR and Issue filtering
@@ -48,15 +73,15 @@ Changes for 0.15.0
4873

4974
See [git commit summary](https://github.com/phadej/github/compare/v0.14.1...v0.15.0)
5075

51-
Changes for 0.14.1
76+
## Changes for 0.14.1
5277

5378
- Add `membersOfWithR`, `listTeamMembersR`
5479
- Add related enums: `OrgMemberFilter`, `OrgMemberRole`, `TeamMemberRole`
5580
- Add `Enum` and `Bounded` instances to `Privacy`, `Permission`,
5681
`RepoPublicity`
5782
- Don't require network access for search tests
5883

59-
Changes for 0.14.0
84+
## Changes for 0.14.0
6085

6186
Large API changes:
6287

@@ -67,27 +92,27 @@ Large API changes:
6792
- Add `Binary` instances for all data
6893
- `GithubOwner` is a `newtype` of `Either User Organization`. There's still `SimpleOwner`.
6994

70-
Changes for 0.5.0:
95+
## Changes for 0.5.0:
7196

7297
* OAuth.
7398
* New function: `Github.Repos.organizationRepo`, to get the repo for a specific organization.
7499
* Introduce a new `newRepoAutoInit` flag to `NewRepo`, for whether to initialize a repo while creating it.
75100
* Relax the attoparsec version requirements.
76101
* The above by [John Wiegley](https://github.com/jwiegley).
77102

78-
Changes for 0.4.1:
103+
## Changes for 0.4.1:
79104

80105
* Stop using the uri package.
81106
* Use aeson version 0.6.1.0.
82107
* Use attoparsec version 0.10.3.0.
83108
* Use http-conduit over 1.8.
84109
* Use unordered-containers between 0.2 and 0.3.
85110

86-
Changes for 0.4.0:
111+
## Changes for 0.4.0:
87112

88113
* Use http-conduit version 1.4.1.10.
89114

90-
Changes for 0.3.0:
115+
## Changes for 0.3.0:
91116

92117
* Re-instantiate the Blobs API.
93118
* `repoDescription1` and `repoPushedAt` are a `Maybe GithubDate`.
@@ -97,11 +122,11 @@ Changes for 0.3.0:
97122
ever-changing `http-conduit` package.
98123
* Features by [Pavel Ryzhov](https://github.com/paulrzcz) and [Simon Hengel](https://github.com/sol).
99124

100-
Changes for 0.2.1:
125+
## Changes for 0.2.1:
101126

102127
* Expand the unordered-containers dependency to anything in 0.1.x .
103128

104-
Changes for 0.2.0:
129+
## Changes for 0.2.0:
105130

106131
* `milestoneDueOn` and `repoLanguage` are now `Maybe` types.
107132
* Introduce `GithubOwner` as the sum type for a `GithubUser` or `GithubOrganization`. Everything that once produced a `GithubUser` now produces a `GithubOwner`. All record accessors have changed their names

github.cabal

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: github
2-
version: 0.18
3-
x-revision: 1
2+
version: 0.19
43
synopsis: Access to the GitHub API, v3.
54
description:
65
The GitHub API provides programmatic access to the full
@@ -26,7 +25,7 @@ homepage: https://github.com/phadej/github
2625
copyright: Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016 Oleg Grenrus
2726
category: Network
2827
build-type: Simple
29-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
28+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
3029
cabal-version: >=1.10
3130
extra-source-files:
3231
README.md,
@@ -80,6 +79,7 @@ Library
8079
GitHub.Data.Gists
8180
GitHub.Data.GitData
8281
GitHub.Data.Id
82+
GitHub.Data.Invitation
8383
GitHub.Data.Issues
8484
GitHub.Data.Milestone
8585
GitHub.Data.Name
@@ -131,38 +131,42 @@ Library
131131
GitHub.Endpoints.Users.Followers
132132
GitHub.Request
133133

134-
-- Packages needed in order to build this package.
135-
build-depends: base >=4.7 && <4.11,
136-
aeson >=0.7.0.6 && <1.3,
137-
base-compat >=0.9.1 && <0.10,
138-
base16-bytestring >=0.1.1.6 && <0.2,
139-
binary >=0.7.1.0 && <0.10,
140-
binary-orphans >=0.1.0.0 && <0.2,
141-
byteable >=0.1.1 && <0.2,
142-
bytestring >=0.10.4.0 && <0.11,
143-
containers >=0.5.5.1 && <0.6,
144-
cryptohash >=0.11 && <0.12,
145-
deepseq >=1.3.0.2 && <1.5,
146-
deepseq-generics >=0.1.1.2 && <0.3,
147-
exceptions >=0.8.0.2 && <0.9,
148-
hashable >=1.2.3.3 && <1.3,
149-
http-client >=0.4.8.1 && <0.6,
150-
http-client-tls >=0.2.2 && <0.4,
151-
http-link-header >=1.0.1 && <1.1,
152-
http-types >=0.8.6 && <0.12,
153-
iso8601-time >=0.1.4 && <0.2,
154-
mtl >=2.1.3.1 && <2.3,
155-
network-uri >=2.6.0.3 && <2.7,
156-
semigroups >=0.16.2.2 && <0.19,
157-
text >=1.2.0.6 && <1.3,
158-
time >=1.4 && <1.9,
159-
transformers >=0.3.0.0 && <0.6,
160-
transformers-compat >=0.4.0.3 && <0.6,
161-
unordered-containers >=0.2 && <0.3,
162-
vector >=0.10.12.3 && <0.13,
163-
vector-instances >=3.3.0.1 && <3.5,
134+
-- Packages bundles with GHC, mtl and text are also here
135+
build-depends:
136+
base >=4.7 && <4.11,
137+
bytestring >=0.10.4.0 && <0.11,
138+
containers >=0.5.5.1 && <0.6,
139+
deepseq >=1.3.0.2 && <1.5,
140+
mtl (>=2.1.3.1 && <2.2) || (>=2.2.1 && <2.3),
141+
text >=1.2.0.6 && <1.3,
142+
time >=1.4 && <1.10,
143+
transformers >=0.3.0.0 && <0.6
164144

165-
tls >=1.3.5
145+
-- other packages
146+
build-depends:
147+
aeson >=0.7.0.6 && <1.3,
148+
base-compat >=0.9.1 && <0.10,
149+
base16-bytestring >=0.1.1.6 && <0.2,
150+
binary >=0.7.1.0 && <0.10,
151+
binary-orphans >=0.1.0.0 && <0.2,
152+
byteable >=0.1.1 && <0.2,
153+
cryptohash >=0.11 && <0.12,
154+
deepseq-generics >=0.1.1.2 && <0.3,
155+
exceptions >=0.8.0.2 && <0.9,
156+
hashable >=1.2.3.3 && <1.3,
157+
http-client >=0.4.8.1 && <0.6,
158+
http-client-tls >=0.2.2 && <0.4,
159+
http-link-header >=1.0.1 && <1.1,
160+
http-types >=0.12.1 && <0.13,
161+
iso8601-time >=0.1.4 && <0.2,
162+
network-uri >=2.6.0.3 && <2.7,
163+
semigroups >=0.16.2.2 && <0.19,
164+
transformers-compat >=0.4.0.3 && <0.6,
165+
unordered-containers >=0.2 && <0.3,
166+
vector >=0.10.12.3 && <0.13,
167+
vector-instances >=3.3.0.1 && <3.5,
168+
169+
tls >=1.3.5
166170

167171
if flag(aeson-compat)
168172
build-depends: aeson-compat >=0.3.0.0 && <0.4

src/GitHub.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ module GitHub (
162162
membersOfR,
163163
membersOfWithR,
164164
isMemberOfR,
165+
orgInvitationsR,
165166

166167
-- ** Teams
167168
-- | See <https://developer.github.com/v3/orgs/teams/>

src/GitHub/Data.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module GitHub.Data (
4141
module GitHub.Data.Events,
4242
module GitHub.Data.Gists,
4343
module GitHub.Data.GitData,
44+
module GitHub.Data.Invitation,
4445
module GitHub.Data.Issues,
4546
module GitHub.Data.Milestone,
4647
module GitHub.Data.Options,
@@ -70,6 +71,7 @@ import GitHub.Data.Events
7071
import GitHub.Data.Gists
7172
import GitHub.Data.GitData
7273
import GitHub.Data.Id
74+
import GitHub.Data.Invitation
7375
import GitHub.Data.Issues
7476
import GitHub.Data.Milestone
7577
import GitHub.Data.Name

src/GitHub/Data/Definitions.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import qualified Data.Text as T
1818

1919
import GitHub.Data.Id (Id)
2020
import GitHub.Data.Name (Name)
21-
import GitHub.Data.URL (URL)
21+
import GitHub.Data.URL (URL (..))
2222

2323
-- | Errors have been tagged according to their source, so you can more easily
2424
-- dispatch and handle them.
@@ -254,5 +254,5 @@ instance Binary IssueLabel
254254
instance FromJSON IssueLabel where
255255
parseJSON = withObject "IssueLabel" $ \o -> IssueLabel
256256
<$> o .: "color"
257-
<*> o .: "url"
257+
<*> o .:? "url" .!= URL "" -- in events there aren't URL
258258
<*> o .: "name"

0 commit comments

Comments
 (0)