forked from haskell-github/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData.hs
More file actions
143 lines (126 loc) · 3.34 KB
/
Data.hs
File metadata and controls
143 lines (126 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- This module re-exports the @GitHub.Data.@ and "GitHub.Auth" submodules.
module GitHub.Data (
-- * Tagged types
-- ** Name
Name,
mkName,
untagName,
mkOwnerName,
mkUserName,
mkTeamName,
mkOrganizationName,
mkRepoName,
mkCommitName,
fromUserName,
fromOrganizationName,
-- ** Id
Id,
mkId,
untagId,
mkOwnerId,
mkUserId,
mkTeamId,
mkOrganizationId,
mkRepoId,
fromUserId,
fromOrganizationId,
-- * IssueNumber
IssueNumber (..),
-- * Module re-exports
module GitHub.Auth,
module GitHub.Data.Activities,
module GitHub.Data.Comments,
module GitHub.Data.Content,
module GitHub.Data.Definitions,
module GitHub.Data.DeployKeys,
module GitHub.Data.Deployments,
module GitHub.Data.Email,
module GitHub.Data.Events,
module GitHub.Data.Gists,
module GitHub.Data.GitData,
module GitHub.Data.Invitation,
module GitHub.Data.Issues,
module GitHub.Data.Milestone,
module GitHub.Data.Options,
module GitHub.Data.PublicSSHKeys,
module GitHub.Data.PullRequests,
module GitHub.Data.RateLimit,
module GitHub.Data.Releases,
module GitHub.Data.Repos,
module GitHub.Data.Request,
module GitHub.Data.Reviews,
module GitHub.Data.Search,
module GitHub.Data.Statuses,
module GitHub.Data.Teams,
module GitHub.Data.URL,
module GitHub.Data.Webhooks,
module GitHub.Data.Webhooks.Validate,
) where
import GitHub.Internal.Prelude
import Prelude ()
import GitHub.Auth
import GitHub.Data.Activities
import GitHub.Data.Comments
import GitHub.Data.Content
import GitHub.Data.Definitions
import GitHub.Data.DeployKeys
import GitHub.Data.Deployments
import GitHub.Data.Email
import GitHub.Data.Events
import GitHub.Data.Gists
import GitHub.Data.GitData
import GitHub.Data.Id
import GitHub.Data.Invitation
import GitHub.Data.Issues
import GitHub.Data.Milestone
import GitHub.Data.Name
import GitHub.Data.Options
import GitHub.Data.PublicSSHKeys
import GitHub.Data.PullRequests
import GitHub.Data.RateLimit
import GitHub.Data.Releases
import GitHub.Data.Repos
import GitHub.Data.Request
import GitHub.Data.Reviews
import GitHub.Data.Search
import GitHub.Data.Statuses
import GitHub.Data.Teams
import GitHub.Data.URL
import GitHub.Data.Webhooks
import GitHub.Data.Webhooks.Validate
mkOwnerId :: Int -> Id Owner
mkOwnerId = Id
mkOwnerName :: Text -> Name Owner
mkOwnerName = N
mkUserId :: Int -> Id User
mkUserId = Id
mkUserName :: Text -> Name User
mkUserName = N
mkTeamId :: Int -> Id Team
mkTeamId = Id
mkTeamName :: Text -> Name Team
mkTeamName = N
mkOrganizationId :: Int -> Id Organization
mkOrganizationId = Id
mkOrganizationName :: Text -> Name Organization
mkOrganizationName = N
mkRepoId :: Int -> Id Repo
mkRepoId = Id
mkRepoName :: Text -> Name Repo
mkRepoName = N
mkCommitName :: Text -> Name Commit
mkCommitName = N
fromOrganizationName :: Name Organization -> Name Owner
fromOrganizationName = N . untagName
fromUserName :: Name User -> Name Owner
fromUserName = N . untagName
fromOrganizationId :: Id Organization -> Id Owner
fromOrganizationId = Id . untagId
fromUserId :: Id User -> Id Owner
fromUserId = Id . untagId