@hyperlane-xyz/registry 13.0.0 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chainMetadata.js
CHANGED
|
@@ -185,10 +185,10 @@ export class GithubRegistry extends BaseRegistry {
|
|
|
185
185
|
}
|
|
186
186
|
async fetch(url) {
|
|
187
187
|
this.logger.debug(`Fetching from github: ${url}`);
|
|
188
|
-
const
|
|
189
|
-
const headers =
|
|
188
|
+
const isGithubApiRequest = url.startsWith(GITHUB_API_URL);
|
|
189
|
+
const headers = isGithubApiRequest && !!this.authToken
|
|
190
190
|
? { ...this.baseApiHeaders, Authorization: `Bearer ${this.authToken}` }
|
|
191
|
-
:
|
|
191
|
+
: undefined;
|
|
192
192
|
const response = await fetch(url, {
|
|
193
193
|
headers,
|
|
194
194
|
});
|