Skip to content

Commit 658d9c7

Browse files
Remove Zuul prefix from dhall connection types
This change makes the package looks a bit better. Change-Id: I82085d85fbb3e99a4436253ef2519a781c51c91c
1 parent 0eead06 commit 658d9c7

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

hack/RenderSchemas.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ splitModels hierarchy def
8080
[ModelName "Spec", ModelName attr] ->
8181
Just $ ModelName $ adjustName attr
8282
-- Zuul and Nodepool attributes are moved into dedicated models
83-
[ModelName "Zuul", ModelName x] ->
84-
Just $ ModelName $ "Zuul" <> adjustName (Text.replace "conns" "Conn" x)
83+
[ModelName "Zuul", ModelName x]
84+
| "conns" `Text.isSuffixOf` x -> Just $ ModelName $ adjustName $ Text.replace "conns" "Conn" x
85+
| otherwise -> Just $ ModelName $ "Zuul" <> adjustName x
8586
[ModelName "Nodepool", ModelName x] ->
8687
Just $ ModelName $ "Nodepool" <> adjustName x
8788
-- Adapt MariaDB attributes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

schemas/Zuul.dhall

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
{ Type =
22
{ defaultAuthenticator : Optional Text
3-
, elasticsearchconns : Optional (List (./ZuulElasticsearchConn.dhall).Type)
3+
, elasticsearchconns : Optional (List (./ElasticsearchConn.dhall).Type)
44
, executor : Optional (./ZuulExecutor.dhall).Type
5-
, gerritconns : Optional (List (./ZuulGerritConn.dhall).Type)
6-
, gitconns : Optional (List (./ZuulGitConn.dhall).Type)
7-
, githubconns : Optional (List (./ZuulGithubConn.dhall).Type)
8-
, gitlabconns : Optional (List (./ZuulGitlabConn.dhall).Type)
5+
, gerritconns : Optional (List (./GerritConn.dhall).Type)
6+
, gitconns : Optional (List (./GitConn.dhall).Type)
7+
, githubconns : Optional (List (./GithubConn.dhall).Type)
8+
, gitlabconns : Optional (List (./GitlabConn.dhall).Type)
99
, merger : Optional (./ZuulMerger.dhall).Type
1010
, oidcAuthenticators : Optional (List (./ZuulOidcAuthenticators.dhall).Type)
11-
, pagureconns : Optional (List (./ZuulPagureConn.dhall).Type)
11+
, pagureconns : Optional (List (./PagureConn.dhall).Type)
1212
, scheduler : Optional (./ZuulScheduler.dhall).Type
13-
, smtpconns : Optional (List (./ZuulSmtpConn.dhall).Type)
13+
, smtpconns : Optional (List (./SmtpConn.dhall).Type)
1414
, web : Optional (./ZuulWeb.dhall).Type
1515
}
1616
, default =
1717
{ defaultAuthenticator = None Text
18-
, elasticsearchconns = None (List (./ZuulElasticsearchConn.dhall).Type)
18+
, elasticsearchconns = None (List (./ElasticsearchConn.dhall).Type)
1919
, executor = None (./ZuulExecutor.dhall).Type
20-
, gerritconns = None (List (./ZuulGerritConn.dhall).Type)
21-
, gitconns = None (List (./ZuulGitConn.dhall).Type)
22-
, githubconns = None (List (./ZuulGithubConn.dhall).Type)
23-
, gitlabconns = None (List (./ZuulGitlabConn.dhall).Type)
20+
, gerritconns = None (List (./GerritConn.dhall).Type)
21+
, gitconns = None (List (./GitConn.dhall).Type)
22+
, githubconns = None (List (./GithubConn.dhall).Type)
23+
, gitlabconns = None (List (./GitlabConn.dhall).Type)
2424
, merger = None (./ZuulMerger.dhall).Type
2525
, oidcAuthenticators = None (List (./ZuulOidcAuthenticators.dhall).Type)
26-
, pagureconns = None (List (./ZuulPagureConn.dhall).Type)
26+
, pagureconns = None (List (./PagureConn.dhall).Type)
2727
, scheduler = None (./ZuulScheduler.dhall).Type
28-
, smtpconns = None (List (./ZuulSmtpConn.dhall).Type)
28+
, smtpconns = None (List (./SmtpConn.dhall).Type)
2929
, web = None (./ZuulWeb.dhall).Type
3030
}
3131
}

schemas/package.dhall

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{ Codesearch = ./Codesearch.dhall
22
, ConfigLocation = ./ConfigLocation.dhall
3+
, ElasticsearchConn = ./ElasticsearchConn.dhall
34
, ExtraLabels = ./ExtraLabels.dhall
45
, FluentBitLogForwarding = ./FluentBitLogForwarding.dhall
6+
, GerritConn = ./GerritConn.dhall
7+
, GitConn = ./GitConn.dhall
8+
, GithubConn = ./GithubConn.dhall
9+
, GitlabConn = ./GitlabConn.dhall
510
, Gitserver = ./Gitserver.dhall
611
, Hostaliases = ./Hostaliases.dhall
712
, Limits = ./Limits.dhall
@@ -10,21 +15,16 @@
1015
, Nodepool = ./Nodepool.dhall
1116
, NodepoolBuilder = ./NodepoolBuilder.dhall
1217
, NodepoolLauncher = ./NodepoolLauncher.dhall
18+
, PagureConn = ./PagureConn.dhall
19+
, SmtpConn = ./SmtpConn.dhall
1320
, Spec = ./Spec.dhall
1421
, Storage = ./Storage.dhall
1522
, StorageDefault = ./StorageDefault.dhall
1623
, Zookeeper = ./Zookeeper.dhall
1724
, Zuul = ./Zuul.dhall
18-
, ZuulElasticsearchConn = ./ZuulElasticsearchConn.dhall
1925
, ZuulExecutor = ./ZuulExecutor.dhall
20-
, ZuulGerritConn = ./ZuulGerritConn.dhall
21-
, ZuulGitConn = ./ZuulGitConn.dhall
22-
, ZuulGithubConn = ./ZuulGithubConn.dhall
23-
, ZuulGitlabConn = ./ZuulGitlabConn.dhall
2426
, ZuulMerger = ./ZuulMerger.dhall
2527
, ZuulOidcAuthenticators = ./ZuulOidcAuthenticators.dhall
26-
, ZuulPagureConn = ./ZuulPagureConn.dhall
2728
, ZuulScheduler = ./ZuulScheduler.dhall
28-
, ZuulSmtpConn = ./ZuulSmtpConn.dhall
2929
, ZuulWeb = ./ZuulWeb.dhall
3030
}

0 commit comments

Comments
 (0)