import { IssueCommentState } from "../on-issue-comment" ; import * as graphql from "./graphql-generated" ; const query = `
  query LoadDefaultBranchName($org: String!, $repo: String!) {
    repository(owner: $org, name: $repo) {
      defaultBranchRef {
        name
      }
    }
  }
` ; export async function LoadDefaultBranchName ( state ) { const callResult = await state . octokit . graphql ( query , { org : state . org , repo : state . repo , } as graphql . OnIssueCommentQueryVariables ) ; return callResult . repository ?. defaultBranchRef ?. name || "" ; }