File tree Expand file tree Collapse file tree 8 files changed +36
-8
lines changed
src/ActionsImporter/Commands/AzureDevOps Expand file tree Collapse file tree 8 files changed +36
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ public Audit(string[] args)
1313 protected override string Name => "azure-devops" ;
1414 protected override string Description => "An audit will output a list of data used in an Azure DevOps instance." ;
1515
16+ private static readonly Option < FileInfo > ConfigFilePath = new ( "--config-file-path" )
17+ {
18+ Description = "The file path corresponding to the Azure DevOps configuration file." ,
19+ IsRequired = false ,
20+ } ;
21+
1622 protected override ImmutableArray < Option > Options => ImmutableArray . Create < Option > (
23+ ConfigFilePath ,
1724 Common . Organization ,
1825 Common . Project ,
1926 Common . InstanceUrl ,
Original file line number Diff line number Diff line change @@ -11,5 +11,9 @@ public DryRun(string[] args) : base(args)
1111
1212 protected override string Name => "pipeline" ;
1313 protected override string Description => "Target a designer or YAML pipeline" ;
14- protected override ImmutableArray < Option > Options => ImmutableArray < Option > . Empty ;
14+
15+ protected override ImmutableArray < Option > Options => ImmutableArray . Create < Option > (
16+ Common . SourceFilePath ,
17+ Common . PipelineIdNotRequired
18+ ) ;
1519}
Original file line number Diff line number Diff line change @@ -11,5 +11,8 @@ public Migrate(string[] args) : base(args)
1111
1212 protected override string Name => "pipeline" ;
1313 protected override string Description => "Target a designer or YAML pipeline" ;
14- protected override ImmutableArray < Option > Options => ImmutableArray < Option > . Empty ;
14+ protected override ImmutableArray < Option > Options => ImmutableArray . Create < Option > (
15+ Common . SourceFilePath ,
16+ Common . PipelineIdNotRequired
17+ ) ;
1518}
Original file line number Diff line number Diff line change @@ -28,9 +28,21 @@ public static class Common
2828 IsRequired = false ,
2929 } ;
3030
31- public static readonly Option < int > PipelineId = new ( new [ ] { "--pipeline-id" , "-i" } )
31+ public static readonly Option < int > PipelineIdRequired = new ( new [ ] { "--pipeline-id" , "-i" } )
3232 {
33- Description = "The Azure DevOps pipeline id ." ,
33+ Description = "The Azure DevOps pipeline ID ." ,
3434 IsRequired = true ,
3535 } ;
36+
37+ public static readonly Option < int > PipelineIdNotRequired = new ( new [ ] { "--pipeline-id" , "-i" } )
38+ {
39+ Description = "The Azure DevOps pipeline ID." ,
40+ IsRequired = false ,
41+ } ;
42+
43+ public static readonly Option < FileInfo > SourceFilePath = new ( "--source-file-path" )
44+ {
45+ Description = "The file path corresponding to the Azure DevOps pipeline file." ,
46+ IsRequired = false ,
47+ } ;
3648}
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ protected override Command GenerateCommand(App app)
1818 {
1919 var command = base . GenerateCommand ( app ) ;
2020
21- command . AddGlobalOption ( Common . PipelineId ) ;
2221 command . AddGlobalOption ( Common . InstanceUrl ) ;
2322 command . AddGlobalOption ( Common . Organization ) ;
2423 command . AddGlobalOption ( Common . Project ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ protected override Command GenerateCommand(App app)
1818 {
1919 var command = base . GenerateCommand ( app ) ;
2020
21- command . AddGlobalOption ( Common . PipelineId ) ;
2221 command . AddGlobalOption ( Common . InstanceUrl ) ;
2322 command . AddGlobalOption ( Common . Organization ) ;
2423 command . AddGlobalOption ( Common . Project ) ;
Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ public DryRun(string[] args) : base(args)
1111
1212 protected override string Name => "release" ;
1313 protected override string Description => "Target a release pipeline" ;
14- protected override ImmutableArray < Option > Options => ImmutableArray < Option > . Empty ;
14+ protected override ImmutableArray < Option > Options => ImmutableArray . Create < Option > (
15+ Common . PipelineIdRequired
16+ ) ;
1517}
Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ public Migrate(string[] args) : base(args)
1111
1212 protected override string Name => "release" ;
1313 protected override string Description => "Target a release pipeline" ;
14- protected override ImmutableArray < Option > Options => ImmutableArray < Option > . Empty ;
14+ protected override ImmutableArray < Option > Options => ImmutableArray . Create < Option > (
15+ Common . PipelineIdRequired
16+ ) ;
1517}
You can’t perform that action at this time.
0 commit comments