Skip to content

Commit

Permalink
Rename to AzdTool
Browse files Browse the repository at this point in the history
  • Loading branch information
sailro committed Nov 21, 2024
1 parent b98609a commit c895f2f
Show file tree
Hide file tree
Showing 43 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .husky/task-runner.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "dotnet-format-staged-files",
"command": "dotnet",
"args": ["format", "src/AzdoTool.sln", "whitespace", "--verbosity", "quiet", "--include", "${staged}"],
"args": ["format", "src/AzdTool.sln", "whitespace", "--verbosity", "quiet", "--include", "${staged}"],
"include": ["**/*.cs"]
}
]
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# AzdoTool
[![NuGet](https://img.shields.io/nuget/v/AzdoTool.svg)](https://www.nuget.org/packages/AzdoTool/)
# AzdTool
[![NuGet](https://img.shields.io/nuget/v/AzdTool.svg)](https://www.nuget.org/packages/AzdTool/)
helps managing Azure DevOps entities.

## Installation

You can easily install as a global dotnet tool:
```
dotnet tool install --global AzdoTool
dotnet tool install --global AzdTool
```

You can then invoke the tool using the following command: `azdo-tool`
You can then invoke the tool using the following command: `azd-tool`

## Features
For now you can:
Expand All @@ -27,7 +27,7 @@ It is super simple to add new features.
## Usage
```
USAGE:
AzdoTool.dll <organization> [OPTIONS] [COMMAND]
AzdTool.dll <organization> [OPTIONS] [COMMAND]
ARGUMENTS:
<organization> Organization
Expand All @@ -45,10 +45,10 @@ COMMANDS:
Let's say you own `foo.visualstudio.com`:

```batch
AzdoTool foo
AzdTool foo
```

If you want to use a personal access token instead of using your browser for authenticating:
```batch
AzdoTool foo --pat PAT
AzdTool foo --pat PAT
```
4 changes: 2 additions & 2 deletions src/Actions/AbandonPullRequests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.RegularExpressions;
using AzdoTool.Visitors;
using AzdTool.Visitors;
using Microsoft.TeamFoundation.SourceControl.WebApi;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class AbandonPullRequests(VisitorNode node) : BatchOrUnitAction<GitPullRequest>(node, "pull-request", "abandon")
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/BaseGoToNode.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AzdoTool.Nodes;
using AzdTool.Nodes;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal abstract class BaseGoToNode(string title, INode node) : Node
{
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/BatchOrUnitAction.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text.RegularExpressions;
using AzdoTool.Nodes;
using AzdoTool.Visitors;
using AzdTool.Nodes;
using AzdTool.Visitors;
using Humanizer;
using Spectre.Console;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal abstract class BatchOrUnitAction<TEntity>(VisitorNode node, string entity, string action) : Node
{
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/CancelBuilds.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Text.RegularExpressions;
using AzdoTool.Extensions;
using AzdoTool.Visitors;
using AzdTool.Extensions;
using AzdTool.Visitors;
using Microsoft.TeamFoundation.Build.WebApi;
using Microsoft.TeamFoundation.Core.WebApi;
using AZBuild = Microsoft.TeamFoundation.Build.WebApi.Build;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class CancelBuilds(VisitorNode node) : BatchOrUnitAction<AZBuild>(node, "build", "cancel")
{
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/CancelJobs.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Text.RegularExpressions;
using AzdoTool.Extensions;
using AzdoTool.Visitors;
using AzdTool.Extensions;
using AzdTool.Visitors;
using Microsoft.TeamFoundation.Core.WebApi;
using Microsoft.TeamFoundation.DistributedTask.WebApi;
using AZBuild = Microsoft.TeamFoundation.Build.WebApi.Build;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class CancelJobs(VisitorNode node) : BatchOrUnitAction<TaskAgentJobRequest>(node, "job", "cancel")
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/Confirm.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AzdoTool.Nodes;
using AzdTool.Nodes;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class Confirm(string prompt, Func<Task> action, Node node) : BaseGoToNode(prompt, node)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/DeleteBranches.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.RegularExpressions;
using AzdoTool.Visitors;
using AzdTool.Visitors;
using Microsoft.TeamFoundation.SourceControl.WebApi;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class DeleteBranches(VisitorNode node) : BatchOrUnitAction<GitBranchStats>(node, "branch", "delete")
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/DeleteTags.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.RegularExpressions;
using AzdoTool.Visitors;
using AzdTool.Visitors;
using Microsoft.TeamFoundation.SourceControl.WebApi;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class DeleteTags(VisitorNode node) : BatchOrUnitAction<GitRef>(node, "tag", "delete")
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/Exit.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AzdoTool.Nodes;
using AzdTool.Nodes;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class Exit : Node
{
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/GoBack.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using AzdoTool.Nodes;
using AzdTool.Nodes;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class GoBack(INode parent) : BaseGoToNode("[grey]>> Go back[/]", parent);
4 changes: 2 additions & 2 deletions src/Actions/Refresh.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using AzdoTool.Nodes;
using AzdTool.Nodes;

namespace AzdoTool.Actions;
namespace AzdTool.Actions;

internal class Refresh(INode node) : BaseGoToNode("[grey]>> Refresh[/]", node);
6 changes: 3 additions & 3 deletions src/AzdoTool.csproj → src/AzdTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<ToolCommandName>azdo-tool</ToolCommandName>
<ToolCommandName>azd-tool</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
</PropertyGroup>

<PropertyGroup>
<Description>azdo-tools helps managing Azure DevOps entities</Description>
<Description>azd-tool helps managing Azure DevOps entities</Description>
<Copyright>Sebastien Lebreton</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
<Authors>Sebastien Lebreton</Authors>
<PackageTags>azdo;azure;devops;cli;tool</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/sailro/AzdoTool</PackageProjectUrl>
<PackageProjectUrl>https://github.com/sailro/AzdTool</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
2 changes: 1 addition & 1 deletion src/AzdoTool.sln → src/AzdTool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzdoTool", "AzdoTool.csproj", "{B36F6141-21DC-4274-AEAE-D77876A6A499}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzdTool", "AzdTool.csproj", "{B36F6141-21DC-4274-AEAE-D77876A6A499}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions src/BrowseCommand.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.ComponentModel;
using AzdoTool.Visitors;
using AzdTool.Visitors;
using Azure.Core;
using Azure.Identity;
using Microsoft.VisualStudio.Services.Common;
using Spectre.Console;
using Spectre.Console.Cli;

namespace AzdoTool;
namespace AzdTool;

internal sealed class BrowseCommand : AsyncCommand<BrowseCommand.Settings>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/BuildExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.TeamFoundation.Build.WebApi;
using Spectre.Console;

namespace AzdoTool.Extensions;
namespace AzdTool.Extensions;

internal static class BuildExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/TaskAgentJobRequestExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.TeamFoundation.DistributedTask.WebApi;
using Spectre.Console;

namespace AzdoTool.Extensions;
namespace AzdTool.Extensions;

internal static class TaskAgentJobRequestExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion src/Nodes/INode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AzdoTool.Nodes;
namespace AzdTool.Nodes;

internal interface INode
{
Expand Down
4 changes: 2 additions & 2 deletions src/Nodes/Node.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AzdoTool.Actions;
using AzdTool.Actions;
using Spectre.Console;

namespace AzdoTool.Nodes;
namespace AzdTool.Nodes;

internal abstract class Node : INode
{
Expand Down
2 changes: 1 addition & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AzdoTool;
using AzdTool;
using Spectre.Console.Cli;

var app = new CommandApp<BrowseCommand>();
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/AgentPool.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.DistributedTask.WebApi;
using Spectre.Console;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class AgentPool(AgentPools agentPools, TaskAgentPool taskAgentPool) : UnitVisitorNode<TaskAgentPool>
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/AgentPools.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.DistributedTask.WebApi;
namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class AgentPools(Organization organization) : BatchVisitorNode<TaskAgentPool>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Visitors/BatchVisitorNode.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Humanizer;
using Spectre.Console;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal abstract class BatchVisitorNode<TEntity> : VisitorNode
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Branch.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.SourceControl.WebApi;
using Spectre.Console;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Branch(Branches branches, GitBranchStats gitBranchStats) : UnitVisitorNode<GitBranchStats>
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Branches.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.SourceControl.WebApi;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Branches(Repository repository) : BatchVisitorNode<GitBranchStats>
{
Expand Down
8 changes: 4 additions & 4 deletions src/Visitors/Build.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Extensions;
using AzdoTool.Nodes;
using AzdTool.Extensions;
using AzdTool.Actions;
using AzdTool.Nodes;
using AZBuild = Microsoft.TeamFoundation.Build.WebApi.Build;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Build(Builds builds, AZBuild build) : UnitVisitorNode<AZBuild>
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Builds.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.Build.WebApi;
using AZBuild = Microsoft.TeamFoundation.Build.WebApi.Build;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Builds(Pipeline pipeline) : BatchVisitorNode<AZBuild>
{
Expand Down
8 changes: 4 additions & 4 deletions src/Visitors/Job.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Extensions;
using AzdoTool.Nodes;
using AzdTool.Extensions;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.DistributedTask.WebApi;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Job(Jobs jobs, TaskAgentJobRequest taskAgentJobRequest) : UnitVisitorNode<TaskAgentJobRequest>
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Jobs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.TeamFoundation.DistributedTask.WebApi;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Jobs(AgentPool agentPool) : BatchVisitorNode<TaskAgentJobRequest>
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Organization.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Microsoft.VisualStudio.Services.Common;
using Microsoft.VisualStudio.Services.WebApi;
using Spectre.Console;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Organization(string orgId, VssCredentials credentials) : VisitorNode
{
Expand Down
6 changes: 3 additions & 3 deletions src/Visitors/Pipeline.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AzdoTool.Actions;
using AzdoTool.Nodes;
using AzdTool.Actions;
using AzdTool.Nodes;
using Spectre.Console;
using AZPipeline = Microsoft.Azure.Pipelines.WebApi.Pipeline;

namespace AzdoTool.Visitors;
namespace AzdTool.Visitors;

internal class Pipeline(Pipelines pipelines, AZPipeline pipeline) : UnitVisitorNode<AZPipeline>
{
Expand Down
Loading

0 comments on commit c895f2f

Please sign in to comment.