Skip to content

Commit

Permalink
fix: add options_proto to iam pkg mapping (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed Mar 12, 2021
1 parent 45ca53a commit cc63d3e
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ private String replaceLabelName(String labelPathAndName, String newLabelName) {
private Set<String> mapJavaGapicDeps(Set<String> protoImports) {
Set<String> javaImports = new TreeSet<>();
for (String protoImport : protoImports) {
if (protoImport.endsWith(":iam_policy_proto") || protoImport.endsWith(":policy_proto")) {
if (protoImport.endsWith(":iam_policy_proto")
|| protoImport.endsWith(":policy_proto")
|| protoImport.endsWith(":options_proto")) {
javaImports.add(replaceLabelName(protoImport, ":iam_java_proto"));
} else if (protoImport.endsWith(":service_proto")
|| protoImport.endsWith(":httpbody_proto")) {
Expand All @@ -210,7 +212,9 @@ private Set<String> mapJavaGapicDeps(Set<String> protoImports) {
private Set<String> mapJavaGapicTestDeps(Set<String> protoImports) {
Set<String> javaImports = new TreeSet<>();
for (String protoImport : protoImports) {
if (protoImport.endsWith(":iam_policy_proto") || protoImport.endsWith(":policy_proto")) {
if (protoImport.endsWith(":iam_policy_proto")
|| protoImport.endsWith(":policy_proto")
|| protoImport.endsWith(":options_proto")) {
javaImports.add(replaceLabelName(protoImport, ":iam_java_grpc"));
}
}
Expand All @@ -233,7 +237,8 @@ private Set<String> mapGoProtoDeps(Set<String> protoImports) {
} else if (protoImport.endsWith(":operations_proto")) {
goImports.add(replaceLabelName(protoImport, ":longrunning_go_proto"));
} else if (protoImport.endsWith(":iam_policy_proto")
|| protoImport.endsWith(":policy_proto")) {
|| protoImport.endsWith(":policy_proto")
|| protoImport.endsWith(":options_proto")) {
goImports.add(replaceLabelName(protoImport, ":iam_go_proto"));
} else if (protoImport.endsWith(":config_change_proto")) {
goImports.add(replaceLabelName(protoImport, ":configchange_go_proto"));
Expand Down Expand Up @@ -277,7 +282,8 @@ private Set<String> mapGoGapicDeps(Set<String> protoImports) {
}
}
} else if (protoImport.endsWith(":iam_policy_proto")
|| protoImport.endsWith(":policy_proto")) {
|| protoImport.endsWith(":policy_proto")
|| protoImport.endsWith(":options_proto")) {
goImports.add(replaceLabelName(protoImport, ":iam_go_proto"));
} else if (protoImport.endsWith(":service_proto")) {
goImports.add(replaceLabelName(protoImport, ":serviceconfig_go_proto"));
Expand Down

0 comments on commit cc63d3e

Please sign in to comment.