Created by lplit 215 days ago Viewed 30 times 0 Points
(Description borrowed from official documentation at https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/master/docs/search/commits.md)
Find commits via various criteria on the default branch (usually master). This method returns up to 100 results per page.
When searching for commits, you can get text match metadata for the message field when you provide the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
No comments yet
import * as wmill from "https://deno.land/x/windmill@v1.34.0/mod.ts";
import { Octokit } from "https://cdn.skypack.dev/octokit?dts";
/*
@param: {wmill.Resource<"github">} gh_auth - Resource containing Github Auth API Key
example:
{
auth: github_api_key
}
*/
export async function main(
gh_auth: wmill.Resource<"github">,
query: string,
sort?: string,
order?: string,
per_page?: number,
page?: number,
) {
const octokit = new Octokit(gh_auth);
const response = await octokit.rest.search.commits({
q: query, sort: sort, order: order, per_page: per_page, page: page
});
return response;
}
No comments yet