Skip to content

Help!!!Type confused! #176

Open
Open
@lvjiaxuan

Description

@lvjiaxuan

octokit.rest.repos.updateInformationAboutPagesSite:

octokit.rest.repos.updateInformationAboutPagesSite({
  owner: context.repo.owner,
  repo: context.repo.repo,
  source: { // error error error error error error error error error
    branch: 'branch-foo',
    path: '/',
  },
})

Take a look at the type.d.ts:

{
  // ...
  source?: Partial<'gh-pages' | 'master' | 'master /docs'> &
    Partial<{
      /** The repository branch used to publish your site's source files. */
      branch: string
      /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */
      path: '/' | '/docs'
    }>
}

How can I use the source type correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: SupportAny questions, information, or general needs around the SDK or GitHub APIstypescriptRelevant to TypeScript users only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions