From 0f0639327f219b3e9de369b9058019adbdfdf6ad Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Thu, 30 Mar 2023 14:13:44 +0200
Subject: [PATCH] fix(github-release-attachments): set token correctly (#21233)

---
 lib/constants/platforms.ts | 1 +
 lib/util/check-token.ts    | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/constants/platforms.ts b/lib/constants/platforms.ts
index 07a3094ef5..f3a1e71ac8 100644
--- a/lib/constants/platforms.ts
+++ b/lib/constants/platforms.ts
@@ -10,6 +10,7 @@ export type PlatformId =
 export const GITHUB_API_USING_HOST_TYPES = [
   'github',
   'github-releases',
+  'github-release-attachments',
   'github-tags',
   'pod',
   'hermit',
diff --git a/lib/util/check-token.ts b/lib/util/check-token.ts
index fedca0aa8b..8faceb3795 100644
--- a/lib/util/check-token.ts
+++ b/lib/util/check-token.ts
@@ -1,5 +1,6 @@
 import { GlobalConfig } from '../config/global';
 import { logger } from '../logger';
+import { GithubReleaseAttachmentsDatasource } from '../modules/datasource/github-release-attachments';
 import { GithubReleasesDatasource } from '../modules/datasource/github-releases';
 import { GithubTagsDatasource } from '../modules/datasource/github-tags';
 import type { PackageFileContent } from '../modules/manager/types';
@@ -31,7 +32,8 @@ export function checkGithubToken(
         if (
           !dep.skipReason &&
           (dep.datasource === GithubTagsDatasource.id ||
-            dep.datasource === GithubReleasesDatasource.id)
+            dep.datasource === GithubReleasesDatasource.id ||
+            dep.datasource === GithubReleaseAttachmentsDatasource.id)
         ) {
           dep.skipReason = 'github-token-required';
           if (dep.depName) {
-- 
GitLab