Skip to content

Commit d09d519

Browse files
feedback
1 parent 2fea457 commit d09d519

5 files changed

Lines changed: 13 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Added commit graph generation to improve performance for commit traversal operations. [#791](https://github.com/sourcebot-dev/sourcebot/pull/791)
1919
- Made the code search `lang:` filter case insensitive. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
2020
- Changed the `/api/source` endpoint from a POST request to a GET request. Repo, path, and ref are specified as query params. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
21-
- Changed the `/api/commits` endpoint to be a POST request to a GET request. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
21+
- Changed the `/api/commits` endpoint from a POST request to a GET request. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
2222
- Renamed `webUrl` to `externalWebUrl` for various apis. Moving forward, `webUrl` will be used for URLs that point to Sourcebot, and `externalWebUrl` will be used for URLs that point to external code hosts. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
2323
- Renamed various fields on the `/api/source` endpoint response body. [#795](https://github.com/sourcebot-dev/sourcebot/pull/795)
2424

packages/mcp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ server.tool(
4545
.optional(),
4646
filterByFilepaths: z
4747
.array(z.string())
48-
.describe(`Scope the search to the provided filepaths. Interpretted as a regex.`)
48+
.describe(`Scope the search to the provided filepaths.`)
4949
.optional(),
5050
caseSensitive: z
5151
.boolean()

packages/web/src/app/api/(server)/commits/route.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ export const GET = async (request: NextRequest): Promise<Response> => {
5151
totalCount,
5252
extraParams: {
5353
repo: searchParams.repo,
54-
...(searchParams.query && { query: searchParams.query }),
55-
...(searchParams.since && { since: searchParams.since }),
56-
...(searchParams.until && { until: searchParams.until }),
57-
...(searchParams.author && { author: searchParams.author }),
58-
...(searchParams.ref && { ref: searchParams.ref }),
54+
...(searchParams.query ? { query: searchParams.query } : {}),
55+
...(searchParams.since ? { since: searchParams.since } : {}),
56+
...(searchParams.until ? { until: searchParams.until } : {}),
57+
...(searchParams.author ? { author: searchParams.author } : {}),
58+
...(searchParams.ref ? { ref: searchParams.ref } : {}),
5959
},
6060
});
6161
if (linkHeader) headers.set('Link', linkHeader);

packages/web/src/app/api/(server)/repos/route.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ export const GET = async (request: NextRequest) => {
7878
page,
7979
perPage,
8080
totalCount,
81-
extraParams: { sort, direction },
81+
extraParams: {
82+
sort,
83+
direction,
84+
...(query ? { query } : {}),
85+
},
8286
});
8387
if (linkHeader) headers.set('Link', linkHeader);
8488

packages/web/src/features/search/gitApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const listCommits = async ({
7676

7777
try {
7878
const sharedOptions: Record<string, string | number | null> = {
79-
[ref]: null,
8079
...(gitSince ? { '--since': gitSince } : {}),
8180
...(gitUntil ? { '--until': gitUntil } : {}),
8281
...(author ? {
@@ -91,6 +90,7 @@ export const listCommits = async ({
9190

9291
// First, get the commits
9392
const log = await git.log({
93+
[ref]: null,
9494
maxCount,
9595
...(skip > 0 ? { '--skip': skip } : {}),
9696
...sharedOptions,

0 commit comments

Comments
 (0)