-
Notifications
You must be signed in to change notification settings - Fork 0
Branch test 2 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
PluginJira/API/Factory/ApiClient.cs
Outdated
| RequestUri = uri, | ||
| }; | ||
| request.Headers.Add(_tokenHeaderName, token); | ||
| //request.Headers.Add(_tokenHeaderName, token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
| public virtual async Task<Count> GetCountOfRecords(IApiClientFactory factory, Settings settings) | ||
| { | ||
| var response = await factory.CreateApiClient(settings).GetAsync($"{BasePath.TrimEnd('/')}/{AllPath.TrimStart('/')}"); | ||
| // var response = await factory.CreateApiClient(settings).GetAsync($"{BasePath.TrimEnd('/')}/{AllPath.TrimStart('/')}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
PluginJira/API/Utility/EndpointHelperEndpoints/ApplicationRolesEndpoint.cs
Show resolved
Hide resolved
| var recordsList = JsonConvert.DeserializeObject<List<ApplicationEndpointWrapper>>(await response.Content.ReadAsStringAsync()); | ||
|
|
||
|
|
||
| foreach (var item in recordsList){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brackets should be like
foreach (...)
{
...
}
PluginJira/API/Utility/EndpointHelperEndpoints/ApplicationRolesEndpoint.cs
Show resolved
Hide resolved
| public long TotalRecords { get; set; } | ||
| public long TotalPages { get; set; } | ||
| public List<Dictionary<string, object>>? Items { get; set; } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra new line
| public string ApiKey { get; set; } | ||
| public string Tenant { get; set; } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra new line
| ApiKey = "test123", | ||
| Username = "test123", | ||
| Tenant = "test123" | ||
| ApiKey = "uCkrVYuQ5ZE3GhZoDuDMC48E", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't commit secrets
| Assert.Equal(254, records.Count); | ||
|
|
||
| var record = JsonConvert.DeserializeObject<Dictionary<string, object>>(records[0].DataJson); | ||
| // Assert.Equal("~", record["tilde"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
| Assert.Equal(1, records.Count); | ||
|
|
||
| var record = JsonConvert.DeserializeObject<Dictionary<string, object>>(records[0].DataJson); | ||
| // Assert.Equal("~", record["tilde"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed commented code
| Kind = Count.Types.Kind.Exact, | ||
| Value = (int) recordsList.Count() | ||
| }; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra new line
|
|
||
| string projectKey = "DEMO"; | ||
|
|
||
| var projectKey = "DEMO"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to generalize this so that the user can get issues for any project, or all projects and not just for DEMO
| { | ||
| Kind = Count.Types.Kind.Exact, | ||
| Value = (int) recordsList.Count() | ||
| Kind = Count.Types.Kind.Unavailable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you return unavailable you should not perform any other actions in the count method
| public string Username { get; set; } | ||
| public string ApiKey { get; set; } | ||
| public string Tenant { get; set; } | ||
| public string Project { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make this a List to allow multiple projects to be selected in one connection
Created two new data wrapper classes:
Issues Endpoint:
Application Role: