Skip to content

Commit

Permalink
API URL bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalgn committed Jan 10, 2024
1 parent c88c29e commit 30a5d28
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/automerge.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const OLD_CONFIG = [
"TOKEN"
];

const GITHUB_SERVER_URL = process.env.GITHUB_SERVER_URL;
const GITHUB_API_URL = process.env.GITHUB_API_URL || "https://api.github.com";

async function main() {
const parser = new ArgumentParser({
Expand Down Expand Up @@ -55,7 +55,7 @@ async function main() {
const token = env("GITHUB_TOKEN");

const octokit = new Octokit({
baseUrl: GITHUB_SERVER_URL,
baseUrl: GITHUB_API_URL,
auth: `token ${token}`,
userAgent: "pascalgn/automerge-action"
});
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44089,7 +44089,7 @@ module.exports = parseParams
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"name":"automerge-action","version":"0.16.1","description":"GitHub action to automatically merge pull requests","main":"lib/api.js","author":"Pascal","license":"MIT","private":true,"bin":{"automerge-action":"./bin/automerge.js"},"scripts":{"test":"jest","it":"node it/it.js","lint":"prettier -l lib/** test/** && eslint .","compile":"ncc build bin/automerge.js --license LICENSE -o dist","prepublish":"yarn lint && yarn test && yarn compile"},"dependencies":{"@actions/core":"^1.10.1","@octokit/rest":"^20.0.2","argparse":"^2.0.1","fs-extra":"^11.2.0","object-resolve-path":"^1.1.1","tmp":"^0.2.1"},"devDependencies":{"@vercel/ncc":"^0.38.1","dotenv":"^16.3.1","eslint":"^8.56.0","eslint-plugin-jest":"^27.6.1","jest":"^29.7.0","prettier":"^3.1.1"},"prettier":{"trailingComma":"none","arrowParens":"avoid"}}');
module.exports = JSON.parse('{"name":"automerge-action","version":"0.16.2","description":"GitHub action to automatically merge pull requests","main":"lib/api.js","author":"Pascal","license":"MIT","private":true,"bin":{"automerge-action":"./bin/automerge.js"},"scripts":{"test":"jest","it":"node it/it.js","lint":"prettier -l lib/** test/** && eslint .","compile":"ncc build bin/automerge.js --license LICENSE -o dist","prepublish":"yarn lint && yarn test && yarn compile"},"dependencies":{"@actions/core":"^1.10.1","@octokit/rest":"^20.0.2","argparse":"^2.0.1","fs-extra":"^11.2.0","object-resolve-path":"^1.1.1","tmp":"^0.2.1"},"devDependencies":{"@vercel/ncc":"^0.38.1","dotenv":"^16.3.1","eslint":"^8.56.0","eslint-plugin-jest":"^27.6.1","jest":"^29.7.0","prettier":"^3.1.1"},"prettier":{"trailingComma":"none","arrowParens":"avoid"}}');

/***/ })

Expand Down Expand Up @@ -44156,7 +44156,7 @@ const OLD_CONFIG = [
"TOKEN"
];

const GITHUB_SERVER_URL = process.env.GITHUB_SERVER_URL;
const GITHUB_API_URL = process.env.GITHUB_API_URL || "https://api.github.com";

async function main() {
const parser = new ArgumentParser({
Expand Down Expand Up @@ -44190,7 +44190,7 @@ async function main() {
const token = env("GITHUB_TOKEN");

const octokit = new Octokit({
baseUrl: GITHUB_SERVER_URL,
baseUrl: GITHUB_API_URL,
auth: `token ${token}`,
userAgent: "pascalgn/automerge-action"
});
Expand Down
1 change: 1 addition & 0 deletions it/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ async function main() {
const token = process.env.GITHUB_TOKEN;

const octokit = new Octokit({
baseUrl: "https://api.github.com",
auth: `token ${token}`,
userAgent: "pascalgn/automerge-action-it"
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "automerge-action",
"version": "0.16.1",
"version": "0.16.2",
"description": "GitHub action to automatically merge pull requests",
"main": "lib/api.js",
"author": "Pascal",
Expand Down

0 comments on commit 30a5d28

Please sign in to comment.