Open
Conversation
added 2 commits
March 29, 2021 18:20
roehlerw
requested changes
Apr 8, 2021
PluginJira/API/Factory/ApiClient.cs
Outdated
| RequestUri = uri, | ||
| }; | ||
| request.Headers.Add(_tokenHeaderName, token); | ||
| //request.Headers.Add(_tokenHeaderName, token); |
| 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('/')}"); |
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){ |
Collaborator
There was a problem hiding this comment.
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; } | ||
|
|
| public string ApiKey { get; set; } | ||
| public string Tenant { get; set; } | ||
|
|
||
|
|
| ApiKey = "test123", | ||
| Username = "test123", | ||
| Tenant = "test123" | ||
| ApiKey = "uCkrVYuQ5ZE3GhZoDuDMC48E", |
| Assert.Equal(254, records.Count); | ||
|
|
||
| var record = JsonConvert.DeserializeObject<Dictionary<string, object>>(records[0].DataJson); | ||
| // Assert.Equal("~", record["tilde"]); |
| Assert.Equal(1, records.Count); | ||
|
|
||
| var record = JsonConvert.DeserializeObject<Dictionary<string, object>>(records[0].DataJson); | ||
| // Assert.Equal("~", record["tilde"]); |
roehlerw
requested changes
Apr 8, 2021
| Kind = Count.Types.Kind.Exact, | ||
| Value = (int) recordsList.Count() | ||
| }; | ||
|
|
|
|
||
| string projectKey = "DEMO"; | ||
|
|
||
| var projectKey = "DEMO"; |
Collaborator
There was a problem hiding this comment.
We will want to generalize this so that the user can get issues for any project, or all projects and not just for DEMO
added 2 commits
April 8, 2021 14:07
roehlerw
requested changes
Apr 9, 2021
| { | ||
| Kind = Count.Types.Kind.Exact, | ||
| Value = (int) recordsList.Count() | ||
| Kind = Count.Types.Kind.Unavailable |
Collaborator
There was a problem hiding this comment.
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; } |
Collaborator
There was a problem hiding this comment.
we should make this a List to allow multiple projects to be selected in one connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created two new data wrapper classes:
Issues Endpoint:
Application Role: