-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: migrate issues GET APIs to GithubSDK #145
base: main
Are you sure you want to change the base?
feat: migrate issues GET APIs to GithubSDK #145
Conversation
Hey @JeffreytheCoder great work with the migration I would suggest you attach a Video to show case that the Features are working as expected with new changes. |
Thanks @VipinDevelops! I saw you created a Apps.Github22/github/modals/UserProfileModal.ts Lines 49 to 57 in 109aae3
But in this way, everytime we need to call an API, we need to create a instance and fetch properties like I'm thinking of creating a |
Hey @JeffreytheCoder Yesterday, @samad-yar-khan Also shared about this and suggested a new way to improve this with a nice reference, Your approach is good, but let me first research the method Samad shared and then I can make a new PR that fixes this issue. |
@JeffreytheCoder @VipinDevelops I was thinking along the same lines as @JeffreytheCoder. We should think about two things while approaching the design for this class
|
@samad-yar-khan Thanks for the insights! Like my comment above, I think having token & URL stored in a singleton solves the issue of fetching themevery time. Whenever the user updates token & URL in the settings, we update the singleton too. What do you think? |
I agree with @samad-yar-khan. @JeffreytheCoder, can you please implement it that way in this PR? Then, Samad can review it, and we can move forward from there and also update the few places where this new class is being used. |
Implemented the singleton approach and applied to all migrated methods in this PR and in #144. |
The singleton gets api host from environment and generates access token when initialized. We'll need to update these when user update settings / login / logout in another PR. |
Issue(s)
Fixes a part of #143
Acceptance Criteria fulfillment
Completed 6 migration tasks related to issues GET APIs