Skip to content
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

chore(quickie): delete quickie for gh #1043

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

kishore03109
Copy link
Contributor

@kishore03109 kishore03109 commented Dec 3, 2023

Problem

Actual removal of the no longer needed GithubCommitService file to reduce complexity + fix test cases.

@kishore03109 kishore03109 requested a review from a team December 3, 2023 22:52
@kishore03109 kishore03109 marked this pull request as ready for review December 3, 2023 22:53
@kishore03109 kishore03109 force-pushed the 12-04-feat_quickie_only_gitfile_should_have_quickie branch from ce03cb0 to b9701ed Compare December 4, 2023 04:57
@kishore03109 kishore03109 force-pushed the 12-04-chore_quickie_delete_quickie_for_gh branch from 636e1af to baf01b5 Compare December 4, 2023 04:57
fileSha,
branchName = STAGING_BRANCH,
}: { fileSha: any; branchName?: string }
{ fileSha }: { fileSha: any; branchName?: string }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: wrong typing - remove branchName! could we also stricten fileSha to string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, removed

Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only looked at code changes and skimmed tests - not approving first because of sanity checks. code wise lgtm

src/services/db/GitHubService.ts Show resolved Hide resolved
src/services/db/GitHubService.ts Show resolved Hide resolved
Comment on lines +762 to +764
const refEndpoint = `${siteName}/git/refs/heads/${
branchName || STAGING_BRANCH
}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i might be lacking context here but it seems abit weird to me to see branchName allowed as an argument here when we're explicitly removing it elsewhere (cos we know the branch should be STAGING_BRANCH) - is this because there are some call sites that need the branch to be different? (a merge to master perhaps)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the case! Specifically we have a RepoManagementService that calls on this branch name, and thus this API should be preserved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for checking - seems like we (isomer admins) use it to reset branches so it should still be staging. that being said, it's ok to leave as-is cos this is hard to tell for sure + the added flexibility of resetting a diff branch might be useful for staging/staging-lite/master

@kishore03109 kishore03109 force-pushed the 12-04-chore_quickie_delete_quickie_for_gh branch from baf01b5 to 3f2e228 Compare December 6, 2023 01:18
@kishore03109 kishore03109 force-pushed the 12-04-feat_quickie_only_gitfile_should_have_quickie branch from e56e758 to a0ae4c9 Compare December 6, 2023 01:19
@kishore03109 kishore03109 force-pushed the 12-04-chore_quickie_delete_quickie_for_gh branch from 3f2e228 to 3ac9df0 Compare December 6, 2023 01:19
@kishore03109
Copy link
Contributor Author

@seaerchin

just a sanity check (feel free to mark as resolved) - all call sites either ignore (default to STAGING_BRANCH) or pass in STAGING_BRANCH explicitly right? otherwise there'll be a regression

Agreed, looked through all the call sites and found one pending getTree that still maintains the branchName as a arg but actually we dont need it already.

For the rest, the way i check is if the fun exists in RepoService, then make sure the call are compatible.
There exists some calls of func A in RepoService that calls func B in GithubService by using super (eg. readMediaFile. For those i check if the call sites are compatible.
^ reason for verbalising this is cuz yes quite a bit of code change, but i think this is sufficient to prevent regression, thoughts?

Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor Author

kishore03109 commented Dec 6, 2023

Merge activity

@kishore03109 kishore03109 changed the base branch from 12-04-feat_quickie_only_gitfile_should_have_quickie to develop December 6, 2023 10:52
@kishore03109 kishore03109 force-pushed the 12-04-chore_quickie_delete_quickie_for_gh branch from 3ac9df0 to a875e6f Compare December 6, 2023 10:52
@kishore03109 kishore03109 merged commit 7eb32fa into develop Dec 6, 2023
6 checks passed
@mergify mergify bot deleted the 12-04-chore_quickie_delete_quickie_for_gh branch December 6, 2023 10:53
This was referenced Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants