Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help!!!Type confused! #176

Open
lvjiaxuan opened this issue Dec 27, 2021 · 0 comments
Open

Help!!!Type confused! #176

lvjiaxuan opened this issue Dec 27, 2021 · 0 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs typescript Relevant to TypeScript users only

Comments

@lvjiaxuan
Copy link

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?

@wolfy1339 wolfy1339 added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs typescript Relevant to TypeScript users only labels Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs typescript Relevant to TypeScript users only
Projects
None yet
Development

No branches or pull requests

2 participants