Edits history of script submission #137 for ' Search labels (github)'

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/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">,
      repositoryId: string,
      query: string = "repo:windmill-labs/windmill+css",
      sort?: string,
      order?: string,
      perPage?: number,
      page?: number,
    ) {
      const octokit = new Octokit(gh_auth);
      const response = await octokit.rest.search.labels({
        repository_id: repositoryId,
        q: query,
        sort: sort,
        order: order,
        per_page: perPage,
        page: page,
      });
    
      return response;
    }
    

    Submitted by lplit 1352 days ago