Skip to content

Commit 8f486ff

Browse files
committed
chore: Remove AutoGenerator from ApiMetadata
We can detect whether or not to use OwlBot based on whether it's generated at all. We don't need ValidateOwlBotCommand any more either - it was basically useful in 2021, and hasn't been since.
1 parent 602d65c commit 8f486ff

File tree

4 files changed

+1
-120
lines changed

4 files changed

+1
-120
lines changed

tools/Google.Cloud.Tools.Common/ApiMetadata.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -130,28 +130,6 @@ public string ApiVersion
130130
/// The type of generator used to generate source code for this API.
131131
/// </summary>
132132
public GeneratorType Generator { get; set; }
133-
134-
/// <summary>
135-
/// The autogenerator type used to maintain this API, when specified explicitly.
136-
/// </summary>
137-
public AutoGeneratorType? AutoGenerator { get; set; }
138-
139-
/// <summary>
140-
/// Determines the autogenerator type for this API based on what's explicitly configured,
141-
/// and sensible defaults otherwise.
142-
/// </summary>
143-
public AutoGeneratorType DetermineAutoGeneratorType()
144-
{
145-
if (AutoGenerator != null)
146-
{
147-
return AutoGenerator.Value;
148-
}
149-
150-
// Default to OwlBot, now that almost everything supports it.
151-
// Anything else should be specified explicitly.
152-
// (This only applies to generated APIs, however.)
153-
return Generator == GeneratorType.None ? AutoGeneratorType.None : AutoGeneratorType.OwlBot;
154-
}
155133

156134
/// <summary>
157135
/// The path within googleapis for the API protos.

tools/Google.Cloud.Tools.Common/AutoGeneratorType.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

tools/Google.Cloud.Tools.ReleaseManager/GenerateProjectsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ private static void GenerateOwlBotConfiguration(string apiRoot, ApiMetadata api)
505505
var owlBotForceRegenerationFile = Path.Combine(apiRoot, ".OwlBot-ForceRegeneration.txt");
506506
// We will recreate this if necessary.
507507
File.Delete(owlBotForceRegenerationFile);
508-
if (api.DetermineAutoGeneratorType() != AutoGeneratorType.OwlBot)
508+
if (api.Generator == GeneratorType.None)
509509
{
510510
// Clean up any previous OwlBot configuration
511511
File.Delete(owlBotConfigFile);

tools/Google.Cloud.Tools.ReleaseManager/ValidateOwlBotCommand.cs

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)