Skip to content

feat: allow GITHUB_BASE_URL as an env variable#40

Closed
armaandhull wants to merge 1 commit intopascalgn:mainfrom
armaandhull:main
Closed

feat: allow GITHUB_BASE_URL as an env variable#40
armaandhull wants to merge 1 commit intopascalgn:mainfrom
armaandhull:main

Conversation

@armaandhull
Copy link
Copy Markdown

@armaandhull armaandhull commented Jun 15, 2023

resolves #38

Copy link
Copy Markdown
Author

@armaandhull armaandhull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything else is whitespace change due to mixed line endings in the file

Comment on lines +32 to +33
// Set the GITHUB_BASE_URL constant value, using a default value of https://api.github.com if not provided
const GITHUB_BASE_URL = process.env.GITHUB_BASE_URL || "https://api.github.com";
Copy link
Copy Markdown
Author

@armaandhull armaandhull Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

declare the constant GITHUB_BASE_URL and use public Github api url as default value

const pull_number = eventData.pull_request.number;

const octokit = new Octokit({
baseUrl: GITHUB_BASE_URL,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass GITHUB_BASE_URL to Octokit constructor

@armaandhull
Copy link
Copy Markdown
Author

@pascalgn bumping this up

@pascalgn
Copy link
Copy Markdown
Owner

@armaandhull Thanks for reminding me! I've decided to merge #43 instead because it had fewer changes and used GITHUB_API_URL, which is also used in https://github.com/pascalgn/automerge-action. Thanks for creating this PR and I hope your issue is still fixed now!

@pascalgn pascalgn closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow passing base url for GitHub Enterprise Server

2 participants