-
Notifications
You must be signed in to change notification settings - Fork 64
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
ProfileService: read profiles from client data repo #661
ProfileService: read profiles from client data repo #661
Conversation
Codecov Report
@@ Coverage Diff @@
## master #661 +/- ##
==========================================
+ Coverage 68.67% 69.17% +0.49%
==========================================
Files 75 76 +1
Lines 2273 2290 +17
Branches 208 209 +1
==========================================
+ Hits 1561 1584 +23
+ Misses 667 660 -7
- Partials 45 46 +1
Continue to review full report at Codecov.
|
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.
LGTM! just 1 small comment
private fetchProfilesJson(): Promise<any> { | ||
return fetch(AppConfig.clientDataUrl).then(res => res.json()); |
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.
private fetchProfilesJson(): Promise<any> { | |
return fetch(AppConfig.clientDataUrl).then(res => res.json()); | |
private fetchProfilesJson(): Promise<Profile[]> { | |
return fetch(AppConfig.clientDataUrl).then(res => res.json().profiles || []); |
I think can include some error handling here and specify the promise type
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.
Sounds good to me! 👍
…eanlowjk/CATcher into feature/external-repo-profiles
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.
LGTM! 👍 Nice work with this.
Woops sorry, spotted a small bug
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.
Just one minor bug but otherwise LGTM! 👍
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.
Great! LGTM 👍
I honestly feel that this is the best way to go about with respect to making sure our
|
Ok, let's go with the second approach. We can move |
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.
A few final comments
Co-authored-by: Anubhav <35621759+anubh-v@users.noreply.github.com>
…eanlowjk/CATcher into feature/external-repo-profiles
Codecov Report
@@ Coverage Diff @@
## master #661 +/- ##
==========================================
+ Coverage 69.08% 69.60% +0.51%
==========================================
Files 76 77 +1
Lines 2274 2293 +19
Branches 208 209 +1
==========================================
+ Hits 1571 1596 +25
+ Misses 660 652 -8
- Partials 43 45 +2
Continue to review full report at Codecov.
|
Summary
This PR fixes #641
Description
Every time we need to update the dropdown list of sessions for our CATcher application, we would need to edit the
environment.*.ts
files. As a result, it becomes pretty troublesome just to create a new commit just for it.As a result, we can make use of simple HTTP requests to get the relevant profiles from an external repository, such as
CATcher-org/client_data
to help us retrieve the relevant profiles needed.Thus, we will only have one single source of truth where updating of custom profiles can be done in
CATcher-org/client_data
.To Dos:
Suggested Commit Message