Skip to content

Remove getPopular method and update docker compose command#27

Merged
zhenghaoz merged 3 commits intomasterfrom
copilot/remove-getpopular-method
Oct 26, 2025
Merged

Remove getPopular method and update docker compose command#27
zhenghaoz merged 3 commits intomasterfrom
copilot/remove-getpopular-method

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 26, 2025

Removes deprecated getPopular method from the Gorse client API and updates CI workflow to use Docker Compose V2 syntax.

Changes

  • Client API: Removed getPopular() method from Gorse class and its import
  • Function removal: Completely removed getPopular function from src/model/recommend.ts
  • Type cleanup: Removed PopularOptions and PopularOutput type definitions; created LatestOptions type for getLatest function
  • Tests: Updated connection error test to use getLatest() instead
  • CI: Changed docker-compose up -d to docker compose up -d in workflow

All references to Popular types and functions have been completely removed from the codebase.

Original prompt

This section details on the original issue you should resolve

<issue_title>Remove getPopular</issue_title>
<issue_description>Remove getPopular

gorse-js/src/client.ts

Lines 106 to 108 in 6c0e6f2

getPopular(options: PopularOptions) {
return getPopular(this.axiosClient, options);
}

Change docker-compose up -d to docker compose up -d

working-directory: ./tests
run: docker-compose up -d
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: zhenghaoz <9030120+zhenghaoz@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove getPopular method and update docker-compose command Remove getPopular method and update docker compose command Oct 26, 2025
Copilot AI requested a review from zhenghaoz October 26, 2025 05:38
@zhenghaoz zhenghaoz marked this pull request as ready for review October 26, 2025 05:39
@zhenghaoz
Copy link
Copy Markdown
Contributor

@copilot The following code should be removed as well:

export function getPopular(
axios: AxiosInstance,
{ category = "", cursorOptions }: PopularOptions
) {
return axios
.get<PopularOutput[], AxiosResponse<PopularOutput[]>>(
`/popular/${category}`,
{
params: cursorOptions,
}
)
.then(({ data }) => {
return data;
});
}

PopularOptions and PopularOutput should be removed

Co-authored-by: zhenghaoz <9030120+zhenghaoz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot The following code should be removed as well:

export function getPopular(
axios: AxiosInstance,
{ category = "", cursorOptions }: PopularOptions
) {
return axios
.get<PopularOutput[], AxiosResponse<PopularOutput[]>>(
`/popular/${category}`,
{
params: cursorOptions,
}
)
.then(({ data }) => {
return data;
});
}

...

Removed the getPopular function from src/model/recommend.ts and eliminated PopularOptions and PopularOutput types. Created LatestOptions to replace the shared usage with getLatest. (34539be)

@zhenghaoz zhenghaoz merged commit 4328505 into master Oct 26, 2025
2 checks passed
@zhenghaoz zhenghaoz deleted the copilot/remove-getpopular-method branch October 26, 2025 05:51
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.

Remove getPopular

2 participants