Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ haskell_library(
"src/GitHub/Types/Base/*.hs",
"src/GitHub/Types/Base*.hs",
]),
ghcopts = ["-j4"],
src_strip_prefix = "src",
tags = [
"haskell",
Expand All @@ -34,7 +33,6 @@ haskell_library(
"src/GitHub/Types/Events/*.hs",
"src/GitHub/Types/Event*.hs",
]),
ghcopts = ["-j4"],
src_strip_prefix = "src",
tags = [
"haskell",
Expand Down Expand Up @@ -101,9 +99,7 @@ haskell_library(

hspec_test(
name = "testsuite",
size = "small",
args = [
"-j4",
"+RTS",
"-N4",
],
Expand Down
1 change: 1 addition & 0 deletions github-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ library
GitHub.Types.Base.Deployment
GitHub.Types.Base.DeploymentPayload
GitHub.Types.Base.DeploymentStatus
GitHub.Types.Base.EditRepo
GitHub.Types.Base.Hook
GitHub.Types.Base.HookConfig
GitHub.Types.Base.Installation
Expand Down
240 changes: 124 additions & 116 deletions src/GitHub/Types/Base/Repository.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,96 +17,98 @@ import GitHub.Types.Base.RepoOwner
-- Repository

data Repository = Repository
{ repositoryAllowAutoMerge :: Maybe Bool
, repositoryAllowForking :: Bool
, repositoryAllowMergeCommit :: Maybe Bool
, repositoryAllowRebaseMerge :: Maybe Bool
, repositoryAllowSquashMerge :: Maybe Bool
, repositoryAllowUpdateBranch :: Maybe Bool
, repositoryArchived :: Bool
, repositoryArchiveUrl :: Text
, repositoryAssigneesUrl :: Text
, repositoryBlobsUrl :: Text
, repositoryBranchesUrl :: Text
, repositoryCloneUrl :: Text
, repositoryCollaboratorsUrl :: Text
, repositoryCommentsUrl :: Text
, repositoryCommitsUrl :: Text
, repositoryCompareUrl :: Text
, repositoryContentsUrl :: Text
, repositoryContributorsUrl :: Text
, repositoryCreatedAt :: DateTime
, repositoryCustomProperties :: Value -- TODO(iphydf): Figure out what this actually is.
, repositoryDefaultBranch :: Text
, repositoryDeleteBranchOnMerge :: Maybe Bool
, repositoryDeploymentsUrl :: Text
, repositoryDescription :: Maybe Text
, repositoryDisabled :: Bool
, repositoryDownloadsUrl :: Text
, repositoryEventsUrl :: Text
, repositoryFork :: Bool
, repositoryForks :: Int
, repositoryForksCount :: Int
, repositoryForksUrl :: Text
, repositoryFullName :: Text
, repositoryGitCommitsUrl :: Text
, repositoryGitRefsUrl :: Text
, repositoryGitTagsUrl :: Text
, repositoryGitUrl :: Text
, repositoryIsTemplate :: Bool
, repositoryHasDiscussions :: Bool
, repositoryHasDownloads :: Bool
, repositoryHasIssues :: Bool
, repositoryHasPages :: Bool
, repositoryHasProjects :: Bool
, repositoryHasWiki :: Bool
, repositoryHomepage :: Maybe Text
, repositoryHooksUrl :: Text
, repositoryHtmlUrl :: Text
, repositoryId :: Int
, repositoryIssueCommentUrl :: Text
, repositoryIssueEventsUrl :: Text
, repositoryIssuesUrl :: Text
, repositoryKeysUrl :: Text
, repositoryLabelsUrl :: Text
, repositoryLanguage :: Maybe Text
, repositoryLanguagesUrl :: Text
, repositoryLicense :: Maybe License
, repositoryMasterBranch :: Maybe Text
, repositoryMergesUrl :: Text
, repositoryMilestonesUrl :: Text
, repositoryMirrorUrl :: Maybe Text
, repositoryName :: Text
, repositoryNodeId :: Text
, repositoryNotificationsUrl :: Text
, repositoryOpenIssues :: Int
, repositoryOpenIssuesCount :: Int
, repositoryOrganization :: Maybe Text
, repositoryOwner :: RepoOwner
, repositoryPrivate :: Bool
, repositoryPublic :: Maybe Bool
, repositoryPullsUrl :: Text
, repositoryPushedAt :: Maybe DateTime
, repositoryReleasesUrl :: Text
, repositorySize :: Int
, repositorySshUrl :: Text
, repositoryStargazers :: Maybe Int
, repositoryStargazersCount :: Int
, repositoryStargazersUrl :: Text
, repositoryStatusesUrl :: Text
, repositorySubscribersUrl :: Text
, repositorySubscriptionUrl :: Text
, repositorySvnUrl :: Text
, repositoryTagsUrl :: Text
, repositoryTeamsUrl :: Text
, repositoryTopics :: [Text]
, repositoryTreesUrl :: Text
, repositoryUpdatedAt :: DateTime
, repositoryUrl :: Text
, repositoryVisibility :: Text
, repositoryWatchers :: Int
, repositoryWatchersCount :: Int
, repositoryWebCommitSignoffRequired :: Bool
{ repositoryAllowAutoMerge :: Maybe Bool
, repositoryAllowForking :: Bool
, repositoryAllowMergeCommit :: Maybe Bool
, repositoryAllowRebaseMerge :: Maybe Bool
, repositoryAllowSquashMerge :: Maybe Bool
, repositoryAllowUpdateBranch :: Maybe Bool
, repositoryArchived :: Bool
, repositoryArchiveUrl :: Text
, repositoryAssigneesUrl :: Text
, repositoryBlobsUrl :: Text
, repositoryBranchesUrl :: Text
, repositoryCloneUrl :: Text
, repositoryCollaboratorsUrl :: Text
, repositoryCommentsUrl :: Text
, repositoryCommitsUrl :: Text
, repositoryCompareUrl :: Text
, repositoryContentsUrl :: Text
, repositoryContributorsUrl :: Text
, repositoryCreatedAt :: DateTime
, repositoryCustomProperties :: Value -- TODO(iphydf): Figure out what this actually is.
, repositoryDefaultBranch :: Text
, repositoryDeleteBranchOnMerge :: Maybe Bool
, repositoryDeploymentsUrl :: Text
, repositoryDescription :: Maybe Text
, repositoryDisabled :: Bool
, repositoryDownloadsUrl :: Text
, repositoryEventsUrl :: Text
, repositoryFork :: Bool
, repositoryForks :: Int
, repositoryForksCount :: Int
, repositoryForksUrl :: Text
, repositoryFullName :: Text
, repositoryGitCommitsUrl :: Text
, repositoryGitRefsUrl :: Text
, repositoryGitTagsUrl :: Text
, repositoryGitUrl :: Text
, repositoryIsTemplate :: Bool
, repositoryHasDiscussions :: Bool
, repositoryHasDownloads :: Bool
, repositoryHasIssues :: Bool
, repositoryHasPages :: Bool
, repositoryHasProjects :: Bool
, repositoryHasPullRequests :: Maybe Bool
, repositoryHasWiki :: Bool
, repositoryHomepage :: Maybe Text
, repositoryHooksUrl :: Text
, repositoryHtmlUrl :: Text
, repositoryId :: Int
, repositoryIssueCommentUrl :: Text
, repositoryIssueEventsUrl :: Text
, repositoryIssuesUrl :: Text
, repositoryKeysUrl :: Text
, repositoryLabelsUrl :: Text
, repositoryLanguage :: Maybe Text
, repositoryLanguagesUrl :: Text
, repositoryLicense :: Maybe License
, repositoryMasterBranch :: Maybe Text
, repositoryMergesUrl :: Text
, repositoryMilestonesUrl :: Text
, repositoryMirrorUrl :: Maybe Text
, repositoryName :: Text
, repositoryNodeId :: Text
, repositoryNotificationsUrl :: Text
, repositoryOpenIssues :: Int
, repositoryOpenIssuesCount :: Int
, repositoryOrganization :: Maybe Text
, repositoryOwner :: RepoOwner
, repositoryPrivate :: Bool
, repositoryPullRequestCreationPolicy :: Maybe Text
, repositoryPublic :: Maybe Bool
, repositoryPullsUrl :: Text
, repositoryPushedAt :: Maybe DateTime
, repositoryReleasesUrl :: Text
, repositorySize :: Int
, repositorySshUrl :: Text
, repositoryStargazers :: Maybe Int
, repositoryStargazersCount :: Int
, repositoryStargazersUrl :: Text
, repositoryStatusesUrl :: Text
, repositorySubscribersUrl :: Text
, repositorySubscriptionUrl :: Text
, repositorySvnUrl :: Text
, repositoryTagsUrl :: Text
, repositoryTeamsUrl :: Text
, repositoryTopics :: [Text]
, repositoryTreesUrl :: Text
, repositoryUpdatedAt :: DateTime
, repositoryUrl :: Text
, repositoryVisibility :: Text
, repositoryWatchers :: Int
, repositoryWatchersCount :: Int
, repositoryWebCommitSignoffRequired :: Bool
} deriving (Eq, Show, Read)


Expand Down Expand Up @@ -154,6 +156,7 @@ instance FromJSON Repository where
<*> x .: "has_issues"
<*> x .: "has_pages"
<*> x .: "has_projects"
<*> x .:? "has_pull_requests"
<*> x .: "has_wiki"
<*> x .: "homepage"
<*> x .: "hooks_url"
Expand All @@ -179,6 +182,7 @@ instance FromJSON Repository where
<*> x .:? "organization"
<*> x .: "owner"
<*> x .: "private"
<*> x .:? "pull_request_creation_policy"
<*> x .:? "public"
<*> x .: "pulls_url"
<*> x .: "pushed_at"
Expand Down Expand Up @@ -249,6 +253,7 @@ instance ToJSON Repository where
, "has_issues" .= repositoryHasIssues
, "has_pages" .= repositoryHasPages
, "has_projects" .= repositoryHasProjects
, "has_pull_requests" .= repositoryHasPullRequests
, "has_wiki" .= repositoryHasWiki
, "homepage" .= repositoryHomepage
, "hooks_url" .= repositoryHooksUrl
Expand All @@ -271,32 +276,33 @@ instance ToJSON Repository where
, "notifications_url" .= repositoryNotificationsUrl
, "open_issues" .= repositoryOpenIssues
, "open_issues_count" .= repositoryOpenIssuesCount
, "organization" .= repositoryOrganization
, "owner" .= repositoryOwner
, "private" .= repositoryPrivate
, "public" .= repositoryPublic
, "pulls_url" .= repositoryPullsUrl
, "pushed_at" .= repositoryPushedAt
, "releases_url" .= repositoryReleasesUrl
, "size" .= repositorySize
, "ssh_url" .= repositorySshUrl
, "stargazers" .= repositoryStargazers
, "stargazers_count" .= repositoryStargazersCount
, "stargazers_url" .= repositoryStargazersUrl
, "statuses_url" .= repositoryStatusesUrl
, "subscribers_url" .= repositorySubscribersUrl
, "subscription_url" .= repositorySubscriptionUrl
, "svn_url" .= repositorySvnUrl
, "tags_url" .= repositoryTagsUrl
, "teams_url" .= repositoryTeamsUrl
, "topics" .= repositoryTopics
, "trees_url" .= repositoryTreesUrl
, "updated_at" .= repositoryUpdatedAt
, "url" .= repositoryUrl
, "visibility" .= repositoryVisibility
, "watchers" .= repositoryWatchers
, "watchers_count" .= repositoryWatchersCount
, "web_commit_signoff_required" .= repositoryWebCommitSignoffRequired
, "organization" .= repositoryOrganization
, "owner" .= repositoryOwner
, "private" .= repositoryPrivate
, "pull_request_creation_policy" .= repositoryPullRequestCreationPolicy
, "public" .= repositoryPublic
, "pulls_url" .= repositoryPullsUrl
, "pushed_at" .= repositoryPushedAt
, "releases_url" .= repositoryReleasesUrl
, "size" .= repositorySize
, "ssh_url" .= repositorySshUrl
, "stargazers" .= repositoryStargazers
, "stargazers_count" .= repositoryStargazersCount
, "stargazers_url" .= repositoryStargazersUrl
, "statuses_url" .= repositoryStatusesUrl
, "subscribers_url" .= repositorySubscribersUrl
, "subscription_url" .= repositorySubscriptionUrl
, "svn_url" .= repositorySvnUrl
, "tags_url" .= repositoryTagsUrl
, "teams_url" .= repositoryTeamsUrl
, "topics" .= repositoryTopics
, "trees_url" .= repositoryTreesUrl
, "updated_at" .= repositoryUpdatedAt
, "url" .= repositoryUrl
, "visibility" .= repositoryVisibility
, "watchers" .= repositoryWatchers
, "watchers_count" .= repositoryWatchersCount
, "web_commit_signoff_required" .= repositoryWebCommitSignoffRequired
]


Expand Down Expand Up @@ -392,3 +398,5 @@ instance Arbitrary Repository where
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
3 changes: 2 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
packages: [.]
resolver: lts-21.9
resolver: lts-21.25
extra-deps:
- Diff-1.0.2
- suspend-0.2.0.0
- timers-0.2.0.4
4 changes: 2 additions & 2 deletions tools/check-workflows.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ showDiff a b = Text.pack . PP.render . toDoc $ diff
where
toDoc = Diff.prettyContextDiff (PP.text "payload")
(PP.text "value")
(PP.text . Text.unpack)
(\(Diff.Numbered _ t) -> PP.text . Text.unpack $ t)
diff = Diff.getContextDiff linesOfContext (Text.lines a) (Text.lines b)
linesOfContext = 3
linesOfContext = Just 3
4 changes: 2 additions & 2 deletions web/TokTok/Webhooks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ showDiff a b = Text.pack . PP.render . toDoc $ diff
where
toDoc = Diff.prettyContextDiff (PP.text "payload")
(PP.text "value")
(PP.text . Text.unpack)
(\(Diff.Numbered _ t) -> PP.text . Text.unpack $ t)
diff = Diff.getContextDiff linesOfContext (Text.lines a) (Text.lines b)
linesOfContext = 3
linesOfContext = Just 3


showError :: Error -> Text
Expand Down
Loading