Skip to content

Commit

Permalink
don't invoke creation of public CI pipelines for js or python
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Dec 18, 2024
1 parent a1be3a1 commit 3d06bd7
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace PipelineGenerator
{
public class Program
{
public static string[] DisallowedCIRepositories = ["azure/azure-sdk-for-python", "azure/azure-sdk-for-js"];
public static async Task Main(string[] args)
{
var cancellationTokenSource = new CancellationTokenSource();
Expand Down Expand Up @@ -169,6 +170,12 @@ public async Task<ExitCondition> RunAsync(
overwriteTriggers
);

if (convention.ToLower() == "ci" && DisallowedCIRepositories.Contains(repository.ToLower()))
{
logger.LogWarning($"The pullrequest convention has been disabled for the repository '{repository}'.");
return ExitCondition.Success;
}

var pipelineConvention = GetPipelineConvention(convention, context);
var components = ScanForComponents(path, pipelineConvention.SearchPattern);

Expand Down

0 comments on commit 3d06bd7

Please sign in to comment.