diff --git a/docs/genaisrc/genaiscript.d.ts b/docs/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/docs/genaisrc/genaiscript.d.ts +++ b/docs/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/genaisrc/genaiscript.d.ts b/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/genaisrc/genaiscript.d.ts +++ b/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/auto/genaiscript.d.ts b/packages/auto/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/auto/genaiscript.d.ts +++ b/packages/auto/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/core/src/genaisrc/genaiscript.d.ts b/packages/core/src/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/core/src/genaisrc/genaiscript.d.ts +++ b/packages/core/src/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/core/src/github.ts b/packages/core/src/github.ts index 63a11d68c9..a55e17f960 100644 --- a/packages/core/src/github.ts +++ b/packages/core/src/github.ts @@ -448,64 +448,64 @@ export class GitHubClient implements GitHub { }) } - async listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise { + async listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise { const { client, owner, repo } = await this.client() const { data: issues } = await client.rest.issues.listForRepo({ owner, repo, - ...(options || {}), + ...(options ?? {}), }) const i = issues[0] return issues } - async listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise { + async listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise { const { client, owner, repo } = await this.client() const { data: prs } = await client.rest.pulls.list({ owner, repo, - ...(options || {}), + ...(options ?? {}), }) return prs } async listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise { const { client, owner, repo } = await this.client() const { data: comments } = await client.rest.pulls.listReviewComments({ owner, repo, pull_number, - ...(options || {}), + ...(options ?? {}), }) return comments } async listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise { const { client, owner, repo } = await this.client() const { data: comments } = await client.rest.issues.listComments({ owner, repo, issue_number, - ...(options || {}), + ...(options ?? {}), }) return comments } @@ -514,9 +514,8 @@ export class GitHubClient implements GitHub { workflow_id: string | number, options?: { branch?: string - per_page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise { const { client, owner, repo } = await this.client() const { @@ -526,7 +525,7 @@ export class GitHubClient implements GitHub { repo, workflow_id, per_page: 100, - ...(options || {}), + ...(options ?? {}), }) const runs = workflow_runs.filter( ({ conclusion }) => conclusion !== "skipped" @@ -637,7 +636,7 @@ export class GitHubClient implements GitHub { async searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise { const { client, owner, repo } = await this.client() const q = query + `+repo:${owner}/${repo}` @@ -645,15 +644,31 @@ export class GitHubClient implements GitHub { data: { items }, } = await client.rest.search.code({ q, - ...(options || {}), + ...(options ?? {}), }) - return items.map(({ name, path, sha, html_url, score, repository }) => ({ - name, - path, - sha, - html_url, - score, - repository: repository.full_name, - })) + return items.map( + ({ name, path, sha, html_url, score, repository }) => ({ + name, + path, + sha, + html_url, + score, + repository: repository.full_name, + }) + ) + } + + async listWorkflows( + options?: GitHubPaginationOptions + ): Promise { + const { client, owner, repo } = await this.client() + const { data: workflows } = await client.rest.actions.listRepoWorkflows( + { + owner, + repo, + ...(options ?? {}), + } + ) + return workflows.workflows.map(({ id, name }) => ({ id, name })) } } diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index 69da5aa18e..0e321cc1a9 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -1336,6 +1336,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1352,30 +1362,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1384,20 +1395,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1406,7 +1417,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1427,8 +1438,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/genaisrc/blog/genaiscript.d.ts b/packages/sample/genaisrc/blog/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/genaisrc/blog/genaiscript.d.ts +++ b/packages/sample/genaisrc/blog/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/genaisrc/genaiscript.d.ts b/packages/sample/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/genaisrc/genaiscript.d.ts +++ b/packages/sample/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/genaisrc/node/genaiscript.d.ts b/packages/sample/genaisrc/node/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/genaisrc/node/genaiscript.d.ts +++ b/packages/sample/genaisrc/node/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/genaisrc/python/genaiscript.d.ts b/packages/sample/genaisrc/python/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/genaisrc/python/genaiscript.d.ts +++ b/packages/sample/genaisrc/python/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/genaisrc/style/genaiscript.d.ts b/packages/sample/genaisrc/style/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/genaisrc/style/genaiscript.d.ts +++ b/packages/sample/genaisrc/style/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/aici/genaiscript.d.ts b/packages/sample/src/aici/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/aici/genaiscript.d.ts +++ b/packages/sample/src/aici/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/errors/genaiscript.d.ts b/packages/sample/src/errors/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/errors/genaiscript.d.ts +++ b/packages/sample/src/errors/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/genaiscript.d.ts b/packages/sample/src/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/genaiscript.d.ts +++ b/packages/sample/src/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/makecode/genaiscript.d.ts b/packages/sample/src/makecode/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/makecode/genaiscript.d.ts +++ b/packages/sample/src/makecode/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/tla/genaiscript.d.ts b/packages/sample/src/tla/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/tla/genaiscript.d.ts +++ b/packages/sample/src/tla/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/sample/src/vision/genaiscript.d.ts b/packages/sample/src/vision/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/sample/src/vision/genaiscript.d.ts +++ b/packages/sample/src/vision/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/packages/vscode/genaisrc/genaiscript.d.ts b/packages/vscode/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/packages/vscode/genaisrc/genaiscript.d.ts +++ b/packages/vscode/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD { diff --git a/slides/genaisrc/genaiscript.d.ts b/slides/genaisrc/genaiscript.d.ts index 617bd46ccd..276d30d862 100644 --- a/slides/genaisrc/genaiscript.d.ts +++ b/slides/genaisrc/genaiscript.d.ts @@ -1369,6 +1369,16 @@ interface GitHubCodeSearchResult { repository: string } +interface GitHubWorkflow { + id: number + name: string +} + +interface GitHubPaginationOptions { + page?: number + per_page?: number +} + interface GitHub { /** * Gets connection information for octokit @@ -1385,30 +1395,31 @@ interface GitHub { options?: { branch?: string event?: string - per_page?: number - page?: number status?: GitHubWorkflowRunStatus - } + } & GitHubPaginationOptions ): Promise /** * Downloads a GitHub Action workflow run log * @param runId */ - listWorkflowJobs(runId: number): Promise + listWorkflowJobs( + runId: number, + options?: GitHubPaginationOptions + ): Promise /** * Lists issues for a given repository * @param options */ - listIssues(options?: { - state?: "open" | "closed" | "all" - labels?: string - sort?: "created" | "updated" | "comments" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listIssues( + options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given issue @@ -1417,20 +1428,20 @@ interface GitHub { */ listIssueComments( issue_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** * Lists pull requests for a given repository * @param options */ - listPullRequests(options?: { - state?: "open" | "closed" | "all" - sort?: "created" | "updated" | "popularity" | "long-running" - direction?: "asc" | "desc" - per_page?: number - page?: number - }): Promise + listPullRequests( + options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + } & GitHubPaginationOptions + ): Promise /** * Lists comments for a given pull request @@ -1439,7 +1450,7 @@ interface GitHub { */ listPullRequestReviewComments( pull_number: number, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise /** @@ -1460,8 +1471,13 @@ interface GitHub { */ searchCode( query: string, - options?: { per_page?: number; page?: number } + options?: GitHubPaginationOptions ): Promise + + /** + * Lists workflows in a GitHub repository + */ + listWorkflows(options?: GitHubPaginationOptions): Promise } interface MD {