Skip to content

Commit 87f7451

Browse files
CopilotEndBug
andcommitted
fix: use getInput for github_token instead of process.env
Properly access github_token input using the getInput helper function from io.ts instead of directly accessing process.env. Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>
1 parent 844c47a commit 87f7451

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/util.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import * as core from '@actions/core';
33
import * as YAML from 'js-yaml';
44
import {getOctokit} from '@actions/github';
55
import * as fs from 'fs';
6+
import {getInput} from './io';
67

78
function getOctokitClient() {
8-
const token = process.env.INPUT_GITHUB_TOKEN;
9+
const token = getInput('github_token');
910
if (!token) {
10-
throw new Error('GITHUB_TOKEN is required');
11+
throw new Error('github_token is required');
1112
}
1213
return getOctokit(token);
1314
}

0 commit comments

Comments
 (0)