Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/core/src/__tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,13 @@ describe("github", () => {

issuesAndPullRequests.mockReturnValueOnce({ data: true });
await gh.searchRepo({
q: "is:pr is:open",
q: "is:pr AND is:open",
order: "desc",
});

expect(issuesAndPullRequests).toHaveBeenCalledWith({
q: "repo:Adam Dierkens/test is:pr is:open",
advanced_search: true,
q: "repo:Adam Dierkens/test AND (is:pr AND is:open)",
order: "desc",
});
});
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@
options: RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["parameters"]
) {
const repo = `repo:${this.options.owner}/${this.options.repo}`;
options.q = `${repo} ${options.q}`;
options.q = `${repo} AND (${options.q})`;
options.advanced_search = true;

this.logger.verbose.info("Searching repo using:\n", options);

Expand Down Expand Up @@ -852,7 +853,7 @@
}

/** Create a release for the GitHub project */
async publish(

Check warning on line 856 in packages/core/src/git.ts

View workflow job for this annotation

GitHub Actions / lint

Async method 'publish' has too many parameters (5). Maximum allowed is 4
releaseNotes: string,
tag: string,
prerelease = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export default class Release {
}

const prsSinceLastRelease = await this.git.searchRepo({
q: `is:pr is:merged merged:>=${lastRelease.published_at}`,
q: `is:pr AND is:merged AND merged:>=${lastRelease.published_at}`,
});

if (!prsSinceLastRelease || !prsSinceLastRelease.items) {
Expand Down
Loading