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

fix github.provider #60

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/provider/github.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
}

public async getRepoContent(route: string) {
const headers: HeadersInit = this.token ? { Authorization: `Bearer ${this.token}` } : {}

Check warning on line 60 in src/provider/github.provider.ts

View workflow job for this annotation

GitHub Actions / Running tests...

Object Literal Property name `Authorization` must match one of the following formats: camelCase

Check warning on line 60 in src/provider/github.provider.ts

View workflow job for this annotation

GitHub Actions / Running tests...

Object Literal Property name `Authorization` must match one of the following formats: camelCase
const response = await fetch(route, { headers })
return await await response.json()
return await response.json()
}

public async getFile(file: GithubResponse): Promise<Documentation> {
const data = await this.getRepoContent(file.url)
return {
type: this.fileSystem.getExtension(file.name)!,

Check warning on line 68 in src/provider/github.provider.ts

View workflow job for this annotation

GitHub Actions / Running tests...

Forbidden non-null assertion

Check warning on line 68 in src/provider/github.provider.ts

View workflow job for this annotation

GitHub Actions / Running tests...

Forbidden non-null assertion
name: file.name,
content: atob(data.content),
path: file.html_url,
Expand Down
Loading