# Class GitHubProvider

GitHub provider using the gh CLI.

Requires: gh CLI installed and authenticated.

#### Implements

- IScmProvider

- Defined in packages/nexus-agents/src/scm/github-provider.ts:150

##### Index

### Constructors

constructor

### Properties

platform
repo

### Methods

getIssue
listIssues
addLabels
createPR
mergePR
getPRStatus
createIssue
addComment
listComments

## Constructors

### constructor

- new GitHubProvider(repo: string): GitHubProvider

  #### Parameters

  - repo: string

  #### Returns GitHubProvider

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:153

## Properties

### `Readonly` platform

platform: "github" = ...

Platform identifier.

Implementation of IScmProvider.platform

- Defined in packages/nexus-agents/src/scm/github-provider.ts:151

### `Readonly` repo

repo: string

Repository in owner/repo format.

Implementation of IScmProvider.repo

- Defined in packages/nexus-agents/src/scm/github-provider.ts:153

## Methods

### getIssue

- getIssue(number: number): Promise<Result<ScmIssue, ScmError>>

  #### Parameters

  - number: number

  #### Returns Promise<Result<ScmIssue, ScmError>>

  Implementation of IScmProvider.getIssue

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:155

### listIssues

- listIssues(
  filters?: IssueFilters,
  ): Promise<Result<readonly ScmIssue[], ScmError>>

  #### Parameters

  - `Optional` filters: IssueFilters

  #### Returns Promise<Result<readonly ScmIssue[], ScmError>>

  Implementation of IScmProvider.listIssues

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:175

### addLabels

- addLabels(
  issueNumber: number,
  labels: readonly string[],
  ): Promise<Result<void, ScmError>>

  #### Parameters

  - issueNumber: number
  - labels: readonly string[]

  #### Returns Promise<Result<void, ScmError>>

  Implementation of IScmProvider.addLabels

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:204

### createPR

- createPR(options: CreatePROptions): Promise<Result<ScmPullRequest, ScmError>>

  #### Parameters

  - options: CreatePROptions

  #### Returns Promise<Result<ScmPullRequest, ScmError>>

  Implementation of IScmProvider.createPR

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:213

### mergePR

- mergePR(
  prNumber: number,
  options?: MergePROptions,
  ): Promise<Result<void, ScmError>>

  #### Parameters

  - prNumber: number
  - `Optional` options: MergePROptions

  #### Returns Promise<Result<void, ScmError>>

  Implementation of IScmProvider.mergePR

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:255

### getPRStatus

- getPRStatus(prNumber: number): Promise<Result<ScmPRStatus, ScmError>>

  #### Parameters

  - prNumber: number

  #### Returns Promise<Result<ScmPRStatus, ScmError>>

  Implementation of IScmProvider.getPRStatus

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:269

### createIssue

- createIssue(
  title: string,
  body: string,
  labels?: readonly string[],
  ): Promise<Result<ScmIssue, ScmError>>

  #### Parameters

  - title: string
  - body: string
  - `Optional` labels: readonly string[]

  #### Returns Promise<Result<ScmIssue, ScmError>>

  Implementation of IScmProvider.createIssue

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:289

### addComment

- addComment(issueNumber: number, body: string): Promise<Result<void, ScmError>>

  #### Parameters

  - issueNumber: number
  - body: string

  #### Returns Promise<Result<void, ScmError>>

  Implementation of IScmProvider.addComment

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:312

### listComments

- listComments(
  issueNumber: number,
  ): Promise<Result<readonly ScmComment[], ScmError>>

  #### Parameters

  - issueNumber: number

  #### Returns Promise<Result<readonly ScmComment[], ScmError>>

  Implementation of IScmProvider.listComments

  - Defined in packages/nexus-agents/src/scm/github-provider.ts:321