Skip to content

Commit

Permalink
Merge pull request #10 from Eclipse-Laboratories-Inc/testing
Browse files Browse the repository at this point in the history
add test program
  • Loading branch information
dandlezzz authored Oct 14, 2024
2 parents 0abcdcd + e86be52 commit b041b5d
Show file tree
Hide file tree
Showing 206 changed files with 142,826 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { createRequire } from 'module';
import fetch from 'node-fetch';
const require = createRequire(import.meta.url);
const fs = require('fs');
const { Octokit } = require('@octokit/rest');

const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });


const owner = process.env.REPO_OWNER;
const repo = process.env.REPO_NAME;
Expand All @@ -18,6 +20,14 @@ const requiredKeys = [
];

async function validateAndMerge() {
const { Octokit } = await import('@octokit/rest');

const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
request: {
fetch: fetch,
},
});
try {
const { data: pr } = await octokit.pulls.get({
owner,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
- name: Install dependencies
run: npm install
- name: Validate and auto-merge PR
Expand All @@ -21,4 +21,4 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
run: node .github/scripts/validate-and-merge.js
run: node --experimental-modules .github/scripts/validate-and-merge.mjs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

node_modules
33 changes: 33 additions & 0 deletions node_modules/.yarn-integrity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/@octokit/auth-token/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

284 changes: 284 additions & 0 deletions node_modules/@octokit/auth-token/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b041b5d

Please sign in to comment.