@theholocron/github-client 1.58.0-alpha.66 → 1.58.0-alpha.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +11 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1265,6 +1265,7 @@ export declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
1265
1265
|
update: (org: string, id: number, input: IssueTypeInput) => Promise<OrgIssueTypeInfo>;
|
|
1266
1266
|
};
|
|
1267
1267
|
issues: {
|
|
1268
|
+
countSearch: (repo: string, query: string) => Promise<number>;
|
|
1268
1269
|
listIssues: (repo: string, params?: IssueSearchParams) => Promise<GitHubIssue[]>;
|
|
1269
1270
|
getIssue: (repo: string, number: number) => Promise<GitHubIssue>;
|
|
1270
1271
|
createIssue: (repo: string, body: Record<string, unknown>) => Promise<GitHubIssue>;
|
package/dist/index.mjs
CHANGED
|
@@ -410,6 +410,17 @@ function issueTypes(rest) {
|
|
|
410
410
|
// src/issues/issues.ts
|
|
411
411
|
function issues(rest) {
|
|
412
412
|
return {
|
|
413
|
+
/**
|
|
414
|
+
* How many issues a search matches inside one repository (`GET /search/issues`, one item asked for, only the count
|
|
415
|
+
* read). The query is the text of GitHub's filter box; `repo:<repo>` is added. A query the search refuses answers 422.
|
|
416
|
+
*/
|
|
417
|
+
countSearch: async (repo, query) => {
|
|
418
|
+
const qs = new URLSearchParams({
|
|
419
|
+
q: `${query} repo:${repo}`,
|
|
420
|
+
per_page: "1"
|
|
421
|
+
});
|
|
422
|
+
return (await rest.request(`/search/issues?${qs.toString()}`)).total_count;
|
|
423
|
+
},
|
|
413
424
|
listIssues: (repo, params = {}) => {
|
|
414
425
|
const qs = new URLSearchParams();
|
|
415
426
|
if (params.state) qs.set("state", params.state);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/github-client",
|
|
3
|
-
"version": "1.58.0-alpha.
|
|
3
|
+
"version": "1.58.0-alpha.67",
|
|
4
4
|
"description": "A TypeScript client for the GitHub REST API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@theholocron/http-client": "^1.58.0-alpha.
|
|
35
|
+
"@theholocron/http-client": "^1.58.0-alpha.67",
|
|
36
36
|
"@theholocron/observability": "^0.7.0-alpha.9"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|