This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Diagnostics ;
4
4
using System . Linq ;
5
- using System . Reflection ;
6
5
using System . Text . RegularExpressions ;
7
6
using System . Threading ;
8
- using GitHub . Logging ;
9
7
10
8
namespace GitHub . Unity
11
9
{
@@ -115,9 +113,6 @@ public override void Configure(ProcessStartInfo psi)
115
113
116
114
class OctorunResult
117
115
{
118
- public string Status { get ; }
119
- public string [ ] Output { get ; }
120
-
121
116
public OctorunResult ( )
122
117
{
123
118
Status = "error" ;
@@ -130,12 +125,15 @@ public OctorunResult(string status, string[] output)
130
125
Output = output ;
131
126
}
132
127
128
+ public string Status { get ; }
129
+ public string [ ] Output { get ; }
133
130
public bool IsSuccess => Status . Equals ( "success" , StringComparison . InvariantCultureIgnoreCase ) ;
134
131
public bool IsError => Status . Equals ( "error" , StringComparison . InvariantCultureIgnoreCase ) ;
135
132
public bool IsTwoFactorRequired => Status . Equals ( "2fa" , StringComparison . InvariantCultureIgnoreCase ) ;
136
133
}
137
134
138
- static class OctorunResultExtensions {
135
+ static class OctorunResultExtensions
136
+ {
139
137
private static Regex ApiErrorMessageRegex = new Regex ( @"\""message\"":\""(.*?)\""" , RegexOptions . Compiled ) ;
140
138
141
139
internal static string GetApiErrorMessage ( this OctorunResult octorunResult )
@@ -149,4 +147,4 @@ internal static string GetApiErrorMessage(this OctorunResult octorunResult)
149
147
return match . Success ? match . Groups [ 1 ] . Value : octorunResult . Output [ 0 ] ;
150
148
}
151
149
}
152
- }
150
+ }
You can’t perform that action at this time.
0 commit comments