Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 6fe43ab

Browse files
authored
Merge pull request #7 from wechuli/enable-for-ghes
Support GHES
2 parents 337f599 + c803bb1 commit 6fe43ab

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

dist/index.js

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

dist/index.js.map

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/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ require('dotenv').config();
77
// For local usage without GitHub Actions, we can accept the token and repository nwo from the command line.
88
const token = process.env.GITHUB_TOKEN ? process.env.GITHUB_TOKEN : process.argv[2];
99
const repository = process.env.GITHUB_REPOSITORY ? process.env.GITHUB_REPOSITORY : process.argv[3];
10+
const baseUrl = process.env.GITHUB_API_URL ? process.env.GITHUB_API_URL : "https://api.github.com";
1011

11-
const octokit = new Octokit({ auth: token});
12+
const octokit = new Octokit({ auth: token, baseUrl: baseUrl});
1213

1314
// most @actions toolkit packages have async methods
1415
async function run() {

0 commit comments

Comments
 (0)