Skip to content

Commit

Permalink
Expose forecast command for bitbucket
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dunham committed Sep 11, 2023
1 parent 8e1d922 commit 248368e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/ActionsImporter/Commands/Bitbucket/Forecast.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections.Immutable;
using System.CommandLine;

namespace ActionsImporter.Commands.Bitbucket;

public class Forecast : ContainerCommand
{
public Forecast(string[] args) : base(args)
{
}

protected override string Name => "bitbucket";
protected override string Description => "Forecasts GitHub Actions usage from historical Bitbucket pipeline utilization.";

private static readonly Option<FileInfo[]> SourceFilePath = new("--source-file-path")
{
Description = "The file path(s) to existing jobs data.",
IsRequired = false,
AllowMultipleArgumentsPerToken = true,
};

protected override ImmutableArray<Option> Options => ImmutableArray.Create<Option>(
Common.Project,
Common.Workspace,
Common.AccessToken,
SourceFilePath
);
}
1 change: 1 addition & 0 deletions src/ActionsImporter/Commands/Forecast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected override Command GenerateCommand(App app)
command.AddCommand(new Travis.Forecast(_args).Command(app));
command.AddCommand(new GitHub.Forecast(_args).Command(app));
command.AddCommand(new Bamboo.Forecast(_args).Command(app));
command.AddCommand(new Bitbucket.Forecast(_args).Command(app));

return command;
}
Expand Down

0 comments on commit 248368e

Please sign in to comment.