@@ -17,96 +17,98 @@ import GitHub.Types.Base.RepoOwner
1717-- Repository
1818
1919data Repository = Repository
20- { repositoryAllowAutoMerge :: Maybe Bool
21- , repositoryAllowForking :: Bool
22- , repositoryAllowMergeCommit :: Maybe Bool
23- , repositoryAllowRebaseMerge :: Maybe Bool
24- , repositoryAllowSquashMerge :: Maybe Bool
25- , repositoryAllowUpdateBranch :: Maybe Bool
26- , repositoryArchived :: Bool
27- , repositoryArchiveUrl :: Text
28- , repositoryAssigneesUrl :: Text
29- , repositoryBlobsUrl :: Text
30- , repositoryBranchesUrl :: Text
31- , repositoryCloneUrl :: Text
32- , repositoryCollaboratorsUrl :: Text
33- , repositoryCommentsUrl :: Text
34- , repositoryCommitsUrl :: Text
35- , repositoryCompareUrl :: Text
36- , repositoryContentsUrl :: Text
37- , repositoryContributorsUrl :: Text
38- , repositoryCreatedAt :: DateTime
39- , repositoryCustomProperties :: Value -- TODO(iphydf): Figure out what this actually is.
40- , repositoryDefaultBranch :: Text
41- , repositoryDeleteBranchOnMerge :: Maybe Bool
42- , repositoryDeploymentsUrl :: Text
43- , repositoryDescription :: Maybe Text
44- , repositoryDisabled :: Bool
45- , repositoryDownloadsUrl :: Text
46- , repositoryEventsUrl :: Text
47- , repositoryFork :: Bool
48- , repositoryForks :: Int
49- , repositoryForksCount :: Int
50- , repositoryForksUrl :: Text
51- , repositoryFullName :: Text
52- , repositoryGitCommitsUrl :: Text
53- , repositoryGitRefsUrl :: Text
54- , repositoryGitTagsUrl :: Text
55- , repositoryGitUrl :: Text
56- , repositoryIsTemplate :: Bool
57- , repositoryHasDiscussions :: Bool
58- , repositoryHasDownloads :: Bool
59- , repositoryHasIssues :: Bool
60- , repositoryHasPages :: Bool
61- , repositoryHasProjects :: Bool
62- , repositoryHasWiki :: Bool
63- , repositoryHomepage :: Maybe Text
64- , repositoryHooksUrl :: Text
65- , repositoryHtmlUrl :: Text
66- , repositoryId :: Int
67- , repositoryIssueCommentUrl :: Text
68- , repositoryIssueEventsUrl :: Text
69- , repositoryIssuesUrl :: Text
70- , repositoryKeysUrl :: Text
71- , repositoryLabelsUrl :: Text
72- , repositoryLanguage :: Maybe Text
73- , repositoryLanguagesUrl :: Text
74- , repositoryLicense :: Maybe License
75- , repositoryMasterBranch :: Maybe Text
76- , repositoryMergesUrl :: Text
77- , repositoryMilestonesUrl :: Text
78- , repositoryMirrorUrl :: Maybe Text
79- , repositoryName :: Text
80- , repositoryNodeId :: Text
81- , repositoryNotificationsUrl :: Text
82- , repositoryOpenIssues :: Int
83- , repositoryOpenIssuesCount :: Int
84- , repositoryOrganization :: Maybe Text
85- , repositoryOwner :: RepoOwner
86- , repositoryPrivate :: Bool
87- , repositoryPublic :: Maybe Bool
88- , repositoryPullsUrl :: Text
89- , repositoryPushedAt :: Maybe DateTime
90- , repositoryReleasesUrl :: Text
91- , repositorySize :: Int
92- , repositorySshUrl :: Text
93- , repositoryStargazers :: Maybe Int
94- , repositoryStargazersCount :: Int
95- , repositoryStargazersUrl :: Text
96- , repositoryStatusesUrl :: Text
97- , repositorySubscribersUrl :: Text
98- , repositorySubscriptionUrl :: Text
99- , repositorySvnUrl :: Text
100- , repositoryTagsUrl :: Text
101- , repositoryTeamsUrl :: Text
102- , repositoryTopics :: [Text ]
103- , repositoryTreesUrl :: Text
104- , repositoryUpdatedAt :: DateTime
105- , repositoryUrl :: Text
106- , repositoryVisibility :: Text
107- , repositoryWatchers :: Int
108- , repositoryWatchersCount :: Int
109- , repositoryWebCommitSignoffRequired :: Bool
20+ { repositoryAllowAutoMerge :: Maybe Bool
21+ , repositoryAllowForking :: Bool
22+ , repositoryAllowMergeCommit :: Maybe Bool
23+ , repositoryAllowRebaseMerge :: Maybe Bool
24+ , repositoryAllowSquashMerge :: Maybe Bool
25+ , repositoryAllowUpdateBranch :: Maybe Bool
26+ , repositoryArchived :: Bool
27+ , repositoryArchiveUrl :: Text
28+ , repositoryAssigneesUrl :: Text
29+ , repositoryBlobsUrl :: Text
30+ , repositoryBranchesUrl :: Text
31+ , repositoryCloneUrl :: Text
32+ , repositoryCollaboratorsUrl :: Text
33+ , repositoryCommentsUrl :: Text
34+ , repositoryCommitsUrl :: Text
35+ , repositoryCompareUrl :: Text
36+ , repositoryContentsUrl :: Text
37+ , repositoryContributorsUrl :: Text
38+ , repositoryCreatedAt :: DateTime
39+ , repositoryCustomProperties :: Value -- TODO(iphydf): Figure out what this actually is.
40+ , repositoryDefaultBranch :: Text
41+ , repositoryDeleteBranchOnMerge :: Maybe Bool
42+ , repositoryDeploymentsUrl :: Text
43+ , repositoryDescription :: Maybe Text
44+ , repositoryDisabled :: Bool
45+ , repositoryDownloadsUrl :: Text
46+ , repositoryEventsUrl :: Text
47+ , repositoryFork :: Bool
48+ , repositoryForks :: Int
49+ , repositoryForksCount :: Int
50+ , repositoryForksUrl :: Text
51+ , repositoryFullName :: Text
52+ , repositoryGitCommitsUrl :: Text
53+ , repositoryGitRefsUrl :: Text
54+ , repositoryGitTagsUrl :: Text
55+ , repositoryGitUrl :: Text
56+ , repositoryIsTemplate :: Bool
57+ , repositoryHasDiscussions :: Bool
58+ , repositoryHasDownloads :: Bool
59+ , repositoryHasIssues :: Bool
60+ , repositoryHasPages :: Bool
61+ , repositoryHasProjects :: Bool
62+ , repositoryHasPullRequests :: Maybe Bool
63+ , repositoryHasWiki :: Bool
64+ , repositoryHomepage :: Maybe Text
65+ , repositoryHooksUrl :: Text
66+ , repositoryHtmlUrl :: Text
67+ , repositoryId :: Int
68+ , repositoryIssueCommentUrl :: Text
69+ , repositoryIssueEventsUrl :: Text
70+ , repositoryIssuesUrl :: Text
71+ , repositoryKeysUrl :: Text
72+ , repositoryLabelsUrl :: Text
73+ , repositoryLanguage :: Maybe Text
74+ , repositoryLanguagesUrl :: Text
75+ , repositoryLicense :: Maybe License
76+ , repositoryMasterBranch :: Maybe Text
77+ , repositoryMergesUrl :: Text
78+ , repositoryMilestonesUrl :: Text
79+ , repositoryMirrorUrl :: Maybe Text
80+ , repositoryName :: Text
81+ , repositoryNodeId :: Text
82+ , repositoryNotificationsUrl :: Text
83+ , repositoryOpenIssues :: Int
84+ , repositoryOpenIssuesCount :: Int
85+ , repositoryOrganization :: Maybe Text
86+ , repositoryOwner :: RepoOwner
87+ , repositoryPrivate :: Bool
88+ , repositoryPullRequestCreationPolicy :: Maybe Text
89+ , repositoryPublic :: Maybe Bool
90+ , repositoryPullsUrl :: Text
91+ , repositoryPushedAt :: Maybe DateTime
92+ , repositoryReleasesUrl :: Text
93+ , repositorySize :: Int
94+ , repositorySshUrl :: Text
95+ , repositoryStargazers :: Maybe Int
96+ , repositoryStargazersCount :: Int
97+ , repositoryStargazersUrl :: Text
98+ , repositoryStatusesUrl :: Text
99+ , repositorySubscribersUrl :: Text
100+ , repositorySubscriptionUrl :: Text
101+ , repositorySvnUrl :: Text
102+ , repositoryTagsUrl :: Text
103+ , repositoryTeamsUrl :: Text
104+ , repositoryTopics :: [Text ]
105+ , repositoryTreesUrl :: Text
106+ , repositoryUpdatedAt :: DateTime
107+ , repositoryUrl :: Text
108+ , repositoryVisibility :: Text
109+ , repositoryWatchers :: Int
110+ , repositoryWatchersCount :: Int
111+ , repositoryWebCommitSignoffRequired :: Bool
110112 } deriving (Eq , Show , Read )
111113
112114
@@ -154,6 +156,7 @@ instance FromJSON Repository where
154156 <*> x .: " has_issues"
155157 <*> x .: " has_pages"
156158 <*> x .: " has_projects"
159+ <*> x .:? " has_pull_requests"
157160 <*> x .: " has_wiki"
158161 <*> x .: " homepage"
159162 <*> x .: " hooks_url"
@@ -179,6 +182,7 @@ instance FromJSON Repository where
179182 <*> x .:? " organization"
180183 <*> x .: " owner"
181184 <*> x .: " private"
185+ <*> x .:? " pull_request_creation_policy"
182186 <*> x .:? " public"
183187 <*> x .: " pulls_url"
184188 <*> x .: " pushed_at"
@@ -249,6 +253,7 @@ instance ToJSON Repository where
249253 , " has_issues" .= repositoryHasIssues
250254 , " has_pages" .= repositoryHasPages
251255 , " has_projects" .= repositoryHasProjects
256+ , " has_pull_requests" .= repositoryHasPullRequests
252257 , " has_wiki" .= repositoryHasWiki
253258 , " homepage" .= repositoryHomepage
254259 , " hooks_url" .= repositoryHooksUrl
@@ -271,32 +276,33 @@ instance ToJSON Repository where
271276 , " notifications_url" .= repositoryNotificationsUrl
272277 , " open_issues" .= repositoryOpenIssues
273278 , " open_issues_count" .= repositoryOpenIssuesCount
274- , " organization" .= repositoryOrganization
275- , " owner" .= repositoryOwner
276- , " private" .= repositoryPrivate
277- , " public" .= repositoryPublic
278- , " pulls_url" .= repositoryPullsUrl
279- , " pushed_at" .= repositoryPushedAt
280- , " releases_url" .= repositoryReleasesUrl
281- , " size" .= repositorySize
282- , " ssh_url" .= repositorySshUrl
283- , " stargazers" .= repositoryStargazers
284- , " stargazers_count" .= repositoryStargazersCount
285- , " stargazers_url" .= repositoryStargazersUrl
286- , " statuses_url" .= repositoryStatusesUrl
287- , " subscribers_url" .= repositorySubscribersUrl
288- , " subscription_url" .= repositorySubscriptionUrl
289- , " svn_url" .= repositorySvnUrl
290- , " tags_url" .= repositoryTagsUrl
291- , " teams_url" .= repositoryTeamsUrl
292- , " topics" .= repositoryTopics
293- , " trees_url" .= repositoryTreesUrl
294- , " updated_at" .= repositoryUpdatedAt
295- , " url" .= repositoryUrl
296- , " visibility" .= repositoryVisibility
297- , " watchers" .= repositoryWatchers
298- , " watchers_count" .= repositoryWatchersCount
299- , " web_commit_signoff_required" .= repositoryWebCommitSignoffRequired
279+ , " organization" .= repositoryOrganization
280+ , " owner" .= repositoryOwner
281+ , " private" .= repositoryPrivate
282+ , " pull_request_creation_policy" .= repositoryPullRequestCreationPolicy
283+ , " public" .= repositoryPublic
284+ , " pulls_url" .= repositoryPullsUrl
285+ , " pushed_at" .= repositoryPushedAt
286+ , " releases_url" .= repositoryReleasesUrl
287+ , " size" .= repositorySize
288+ , " ssh_url" .= repositorySshUrl
289+ , " stargazers" .= repositoryStargazers
290+ , " stargazers_count" .= repositoryStargazersCount
291+ , " stargazers_url" .= repositoryStargazersUrl
292+ , " statuses_url" .= repositoryStatusesUrl
293+ , " subscribers_url" .= repositorySubscribersUrl
294+ , " subscription_url" .= repositorySubscriptionUrl
295+ , " svn_url" .= repositorySvnUrl
296+ , " tags_url" .= repositoryTagsUrl
297+ , " teams_url" .= repositoryTeamsUrl
298+ , " topics" .= repositoryTopics
299+ , " trees_url" .= repositoryTreesUrl
300+ , " updated_at" .= repositoryUpdatedAt
301+ , " url" .= repositoryUrl
302+ , " visibility" .= repositoryVisibility
303+ , " watchers" .= repositoryWatchers
304+ , " watchers_count" .= repositoryWatchersCount
305+ , " web_commit_signoff_required" .= repositoryWebCommitSignoffRequired
300306 ]
301307
302308
@@ -392,3 +398,5 @@ instance Arbitrary Repository where
392398 <*> arbitrary
393399 <*> arbitrary
394400 <*> arbitrary
401+ <*> arbitrary
402+ <*> arbitrary
0 commit comments