diff --git a/src/collectors/github.ts b/src/collectors/github.ts index 903deae..771fbda 100644 --- a/src/collectors/github.ts +++ b/src/collectors/github.ts @@ -5,6 +5,7 @@ import { Octokit } from '@octokit/rest'; import { graphql } from '@octokit/graphql'; import type { MetricResult } from './types.js'; +import * as core from '@actions/core'; const PlatformSettings = { name: 'GitHub', @@ -158,7 +159,7 @@ interface GraphQLReleasesResponse { } // Initialize Octokit for REST API calls - const token = process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN || ''; + const token = core.getInput('github-token'); const octokit = new Octokit({ auth: token, userAgent: 'usage-statistics-tracker'