We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cc7551 commit a375861Copy full SHA for a375861
bin/post-preview-url-comment/index.ts
@@ -15,8 +15,12 @@ import { filenameToPath } from "./util";
15
16
async function run(): Promise<void> {
17
try {
18
- const token = core.getInput("GITHUB_TOKEN", { required: true });
19
- const octokit = github.getOctokit(token);
+ if (!process.env.GITHUB_TOKEN) {
+ core.setFailed(`Could not find GITHUB_TOKEN in env`);
20
+ process.exit();
21
+ }
22
+
23
+ const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
24
const ctx = github.context;
25
26
const { data: pulls } = await octokit.rest.pulls.list({
0 commit comments