Skip to content

Commit

Permalink
fix: pr search query format
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcommitshow committed Dec 20, 2023
1 parent 601a800 commit ab57057
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion github.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export async function searchPullRequests(query, options) {
if(options && options.GITHUB_PERSONAL_TOKEN){
GITHUB_REQUEST_OPTIONS.headers["Authorization"] = "token "+options.GITHUB_PERSONAL_TOKEN;
}
let queryString = encodeURIComponent(query || ''+'+type:pr');
let queryString = encodeURIComponent((query || ''))+'+is:pull-request';
let url = `https://api.github.com/search/issues?q=${queryString}&per_page=100&page=${pageNo}&sort=${options.sort || 'created'}`;
const { res, data } = await makeRequestWithRateLimit('GET', url, Object.assign({},GITHUB_REQUEST_OPTIONS));
console.log("PR search request finished");
Expand Down
14 changes: 14 additions & 0 deletions test/lifecycle.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'dotenv/config'
import { expect, assert } from "chai";


describe('lifecycle', function() {

describe('configs exist', async function() {
it('aperture configs', async function() {
assert.isNotNull(process.env.APERTURE_SERVICE_ADDRESS);
assert.isNotNull(process.env.APERTURE_API_KEY);
})
})

})

0 comments on commit ab57057

Please sign in to comment.