Skip to content

Commit b041b5d

Browse files
authored
Merge pull request #10 from Eclipse-Laboratories-Inc/testing
add test program
2 parents 0abcdcd + e86be52 commit b041b5d

File tree

206 files changed

+142826
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+142826
-4
lines changed

.github/scripts/validate-and-merge.js renamed to .github/scripts/validate-and-merge.mjs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { createRequire } from 'module';
2+
import fetch from 'node-fetch';
3+
const require = createRequire(import.meta.url);
14
const fs = require('fs');
2-
const { Octokit } = require('@octokit/rest');
35

4-
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
6+
57

68
const owner = process.env.REPO_OWNER;
79
const repo = process.env.REPO_NAME;
@@ -18,6 +20,14 @@ const requiredKeys = [
1820
];
1921

2022
async function validateAndMerge() {
23+
const { Octokit } = await import('@octokit/rest');
24+
25+
const octokit = new Octokit({
26+
auth: process.env.GITHUB_TOKEN,
27+
request: {
28+
fetch: fetch,
29+
},
30+
});
2131
try {
2232
const { data: pr } = await octokit.pulls.get({
2333
owner,

.github/workflows/auto-merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-node@v3
1414
with:
15-
node-version: '16'
15+
node-version: '18'
1616
- name: Install dependencies
1717
run: npm install
1818
- name: Validate and auto-merge PR
@@ -21,4 +21,4 @@ jobs:
2121
PR_NUMBER: ${{ github.event.pull_request.number }}
2222
REPO_OWNER: ${{ github.repository_owner }}
2323
REPO_NAME: ${{ github.event.repository.name }}
24-
run: node .github/scripts/validate-and-merge.js
24+
run: node --experimental-modules .github/scripts/validate-and-merge.mjs

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
node_modules

node_modules/.yarn-integrity

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@octokit/auth-token/LICENSE

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@octokit/auth-token/README.md

Lines changed: 284 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)