Member Junction
    Preparing search index...
    Index

    Constructors

    Accessors

    Methods

    • Adds a comment to an Issue or Pull Request.

      Parameters

      • params: { Body: string; IssueNumber: number; Owner: string; Repo: string }

      Returns Promise<{ CommentId: number; CreatedAt: string; HtmlUrl: string }>

    • Enforces the protected branch policy (main, master, next, production, or the repo's default branch).

      Parameters

      • branch: string
      • OptionaldefaultBranch: string
      • OptionalallowProtectedBranch: boolean

      Returns void

    • Compound workflow: creates/updates a feature branch with an atomic multi-file commit and opens (or reuses an existing open) Pull Request in a single operation.

      Parameters

      • params: {
            Assignees?: string[];
            Commit: GitHubCommitFilesParams;
            Draft?: boolean;
            Labels?: string[];
            PRBody?: string;
            PRTitle: string;
            Reviewers?: string[];
        }

      Returns Promise<
          {
              CommitResult: GitHubCommitFilesResult;
              CreatedNewPR: boolean;
              PullRequest: GitHubPullRequestSummary;
          },
      >

    • Creates a new Issue (when IssueNumber is omitted) or updates an existing Issue.

      Parameters

      • params: {
            Assignees?: string[];
            Body?: string;
            IssueNumber?: number;
            Labels?: string[];
            Owner: string;
            Repo: string;
            State?: "closed" | "open";
            Title?: string;
        }

      Returns Promise<{ HtmlUrl: string; Number: number; State: string; Title: string }>

    • Inspects a workflow run (including failed jobs/steps and log tails), re-runs failed jobs, or dispatches a workflow.

      Parameters

      • params: {
            Action?: "inspect" | "rerun-failed" | "dispatch";
            Branch?: string;
            DispatchInputs?: Record<string, string>;
            IncludeFailedJobLogs?: boolean;
            MaxLogCharsPerJob?: number;
            Owner: string;
            Repo: string;
            RunId?: number;
            WorkflowIdOrFileName?: string;
        }

      Returns Promise<GitHubWorkflowDiagnosticsResult>

    • Lists a repository's file tree with optional path prefix, glob filter, and depth limit.

      Parameters

      • owner: string
      • repo: string
      • Optionalref: string
      • OptionalpathPrefix: string
      • OptionalglobPattern: string
      • OptionalmaxDepth: number
      • limit: number = 500

      Returns Promise<
          {
              Entries: GitHubTreeEntry[];
              Ref: string;
              TotalMatched: number;
              Truncated: boolean;
          },
      >

    • Merges a Pull Request. Enforces AssertMergeAllowed() (auth.AllowMerge === true) to uphold the app-token-never-merges boundary.

      Parameters

      • params: {
            CommitMessage?: string;
            CommitTitle?: string;
            MergeMethod?: "merge" | "squash" | "rebase";
            Owner: string;
            PullNumber: number;
            Repo: string;
            Sha?: string;
        }

      Returns Promise<{ Merged: boolean; Message: string; Sha: string }>

    • Type Parameters

      • T = unknown

      Parameters

      • method: string
      • endpoint: string
      • Optionalbody: unknown
      • acceptHeader: string = 'application/vnd.github+json'

      Returns Promise<T>

    • Searches code across a repository or organization.

      Parameters

      • query: string
      • Optionalowner: string
      • Optionalrepo: string
      • perPage: number = 25

      Returns Promise<
          {
              Items: {
                  htmlUrl: string;
                  name: string;
                  path: string;
                  repository: string;
                  sha: string;
                  textMatches: string[];
              }[];
              TotalCount: number;
          },
      >

    • Searches GitHub Issues and Pull Requests using GitHub search qualifiers.

      Parameters

      • params: { Owner?: string; PerPage?: number; Query: string; Repo?: string }

      Returns Promise<
          {
              Items: {
                  author: string;
                  createdAt: string;
                  htmlUrl: string;
                  isPullRequest: boolean;
                  labels: string[];
                  number: number;
                  state: string;
                  title: string;
                  updatedAt: string;
              }[];
              TotalCount: number;
          },
      >

    • Submits a Pull Request review (APPROVE, REQUEST_CHANGES, or COMMENT) with optional line comments.

      Parameters

      • params: {
            Body?: string;
            Comments?: {
                body: string;
                line: number;
                path: string;
                side?: "LEFT" | "RIGHT";
            }[];
            Event: "APPROVE"
            | "REQUEST_CHANGES"
            | "COMMENT";
            Owner: string;
            PullNumber: number;
            Repo: string;
        }

      Returns Promise<{ HtmlUrl: string; ReviewId: number; State: string }>