Skip to content

Commit

Permalink
schema - add the GithubUser provider
Browse files Browse the repository at this point in the history
  • Loading branch information
morucci committed Sep 18, 2023
1 parent c471fc2 commit fe7e089
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions schemas/monocle/config/Crawler/Provider.dhall
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- | The provider service for a worker
< GitlabProvider : ../Provider/Gitlab/Type.dhall
| GithubProvider : ../Provider/Github/Type.dhall
| GithubUserProvider : ../Provider/GithubUser/Type.dhall
| GithubApplicationProvider : ../Provider/GithubApplication/Type.dhall
| GerritProvider : ../Provider/Gerrit/Type.dhall
| BugzillaProvider : ../Provider/Bugzilla/Type.dhall
Expand Down
4 changes: 4 additions & 0 deletions schemas/monocle/config/Provider/GithubUser/Type.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ github_url : Optional Text
, github_token : Optional Text
, github_users : List Text
}
1 change: 1 addition & 0 deletions schemas/monocle/config/Provider/GithubUser/default.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ github_url = None Text, github_users = List Text, github_token = None Text }
1 change: 1 addition & 0 deletions schemas/monocle/config/Provider/GithubUser/package.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Type = ./Type.dhall, default = ./default.dhall }
1 change: 1 addition & 0 deletions src/Macroscope/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ getCrawler inf@(InfoCrawler _ _ crawler idents) = getCompose $ fmap addInfos (Co
<> [ghIssuesCrawler ghClient]
<> [ghPRCrawler ghClient getIdentByAliasCB]
pure $ Just (k, crawlers)
Config.GithubUserProvider _ -> pure Nothing -- Not yet implemented
Config.GithubApplicationProvider _ -> pure Nothing -- "Not (yet) implemented"
Config.TaskDataProvider -> pure Nothing -- This is a generic crawler, not managed by the macroscope
getIdentByAliasCB :: Text -> Maybe Text
Expand Down
4 changes: 4 additions & 0 deletions src/Monocle/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Dhall.TH.makeHaskellTypes
, provider "Gerrit"
, provider "Gitlab"
, provider "Github"
, provider "GithubUser"
, provider "GithubApplication"
, provider "Bugzilla"
, authProvider "OIDC"
Expand Down Expand Up @@ -154,6 +155,9 @@ deriving instance Show Gerrit
deriving instance Eq Github
deriving instance Show Github

deriving instance Eq GithubUser
deriving instance Show GithubUser

deriving instance Eq GithubApplication
deriving instance Show GithubApplication

Expand Down

0 comments on commit fe7e089

Please sign in to comment.