Fix GitHub reader headers and add docs (#11675)

* Fix header and add docs

* Format
This commit is contained in:
Pere Miquel Brull 2023-05-19 09:36:30 +02:00 committed by GitHub
parent 0391ce50bf
commit b60f198674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 1 deletions

View File

@ -53,7 +53,9 @@ class GitHubReader(Reader):
to the API
"""
if self._auth_headers is None:
self._auth_headers = {"Authentication": f"token {self.credentials.token}"}
self._auth_headers = {
"Authorization": f"Bearer {self.credentials.token.get_secret_value()}"
}
return self._auth_headers

View File

@ -103,6 +103,11 @@ properties we need to add in this case:
- **repositoryName**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /codeInfo %}
#### Source Configuration - Source Config

View File

@ -103,6 +103,11 @@ properties we need to add in this case:
- **repositoryName**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /codeInfo %}
#### Source Configuration - Source Config

View File

@ -194,6 +194,11 @@ Then, if we choose to inform the GitHub credentials to ingest LookML Views:
- **Repository Name**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **API Token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /extraContent %}
{% step srNumber=6 %}

View File

@ -103,6 +103,11 @@ properties we need to add in this case:
- **repositoryName**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /codeInfo %}
#### Source Configuration - Source Config

View File

@ -103,6 +103,11 @@ properties we need to add in this case:
- **repositoryName**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /codeInfo %}
#### Source Configuration - Source Config

View File

@ -194,6 +194,11 @@ Then, if we choose to inform the GitHub credentials to ingest LookML Views:
- **Repository Name**: The name of a GitHub repository. For example, in https://github.com/open-metadata/OpenMetadata, the name is `OpenMetadata`.
- **API Token**: Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.
{% /extraContent %}
{% step srNumber=6 %}

View File

@ -58,3 +58,7 @@ The name of a GitHub repository. For example, in https://github.com/open-metadat
#### API Token $(id="token")
Token to use the API. This is required for private repositories and to ensure we don't hit API limits.
Follow these [steps](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token) in order to create a fine-grained personal access token.
When configuring, give repository access to `Only select repositories` and choose the one containing your LookML files. Then, we only need `Repository Permissions` as `Read-only` for `Contents`.