Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1db7729b3 | ||
|
|
ce52669395 | ||
|
|
5903de3096 | ||
|
|
6ad9236846 | ||
|
|
22c47cfe58 | ||
|
|
ccd245ac4a | ||
|
|
a95f7769a9 | ||
|
|
f6e2c64014 | ||
|
|
d2a2dc3947 | ||
|
|
bf543cc70a | ||
|
|
aeb6b8e80f | ||
|
|
994661fbb1 | ||
|
|
980248f116 | ||
|
|
467bfeecee | ||
|
|
6e7707e6df | ||
|
|
f8531e82c6 | ||
|
|
1c4688942c | ||
|
|
76a99ddc54 | ||
|
|
2ead13ce86 | ||
|
|
2e8e20081d | ||
|
|
df55979d04 | ||
|
|
c056c1801c | ||
|
|
dac371d2f4 | ||
|
|
33689d3bf6 | ||
|
|
8e69b57fc5 | ||
|
|
69c5373796 | ||
|
|
dcfeffc0c7 | ||
|
|
fb54a3d8ae | ||
|
|
4618d4d5bb | ||
|
|
6b35c8253b | ||
|
|
6cea8723ea | ||
|
|
f44c11ebd1 | ||
|
|
f598f6795f | ||
|
|
060edb2b27 | ||
|
|
77cbbd906f | ||
|
|
14f252a1f6 | ||
|
|
ad93111721 | ||
|
|
dad370b79a | ||
|
|
8000bc50c7 | ||
|
|
82f80dfd18 | ||
|
|
c4df7d4167 | ||
|
|
9307c29682 | ||
|
|
4c76148459 | ||
|
|
cf5cf8763f | ||
|
|
b29d168c60 | ||
|
|
fe703bdd34 | ||
|
|
3346972303 | ||
|
|
551d20915e | ||
|
|
843400517f | ||
|
|
d1cde71cbb | ||
|
|
0972aa989b |
7
.checkov.yml
Normal file
7
.checkov.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# See: https://www.checkov.io/1.Welcome/Quick%20Start.html
|
||||
|
||||
compact: true
|
||||
quiet: true
|
||||
skip-path:
|
||||
- coverage
|
||||
- node_modules
|
||||
6
.github/workflows/check-dist.yml
vendored
6
.github/workflows/check-dist.yml
vendored
@@ -28,11 +28,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
|
||||
name: Upload Artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -30,19 +30,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Initialize CodeQL
|
||||
id: initialize
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
source-root: src
|
||||
|
||||
- name: Autobuild
|
||||
id: autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
id: analyze
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v4
|
||||
|
||||
4
.github/workflows/continuous-integration.yml
vendored
4
.github/workflows/continuous-integration.yml
vendored
@@ -18,11 +18,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
|
||||
6
.github/workflows/first-interaction.yml
vendored
6
.github/workflows/first-interaction.yml
vendored
@@ -22,12 +22,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/first-interaction@main
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: |
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue_message: |
|
||||
Hello! Thank you for filing an issue.
|
||||
|
||||
If this is a bug report, please include relevant logs to help us debug the problem.
|
||||
pr-message: |
|
||||
pr_message: |
|
||||
Hello! Thank you for your contribution.
|
||||
|
||||
If you are fixing a bug, please reference the issue number in the description.
|
||||
|
||||
4
.github/workflows/licensed.yml
vendored
4
.github/workflows/licensed.yml
vendored
@@ -24,11 +24,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
|
||||
13
.github/workflows/linter.yml
vendored
13
.github/workflows/linter.yml
vendored
@@ -1,3 +1,8 @@
|
||||
# This workflow will lint the entire codebase using the
|
||||
# `super-linter/super-linter` action.
|
||||
#
|
||||
# For more information, see the super-linter repository:
|
||||
# https://github.com/super-linter/super-linter
|
||||
name: Lint Codebase
|
||||
|
||||
on:
|
||||
@@ -21,13 +26,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
@@ -40,11 +45,15 @@ jobs:
|
||||
id: super-linter
|
||||
uses: super-linter/super-linter/slim@v8
|
||||
env:
|
||||
CHECKOV_FILE_NAME: .checkov.yml
|
||||
DEFAULT_BRANCH: main
|
||||
FILTER_REGEX_EXCLUDE: dist/**/*
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
LINTER_RULES_PATH: .
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
VALIDATE_BIOME_FORMAT: false
|
||||
VALIDATE_BIOME_LINT: false
|
||||
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
|
||||
VALIDATE_JAVASCRIPT_ES: false
|
||||
VALIDATE_JSCPD: false
|
||||
VALIDATE_TYPESCRIPT_ES: false
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-tags: true
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/first-interaction@v3
|
||||
with:
|
||||
issue-message: |
|
||||
issue_message: |
|
||||
# Issue Message with Markdown
|
||||
|
||||
This is the message that will be displayed!
|
||||
pr-message: |
|
||||
pr_message: |
|
||||
# PR Message with Markdown
|
||||
|
||||
This is the message that will be displayed!
|
||||
|
||||
@@ -8,6 +8,7 @@ export const context = {
|
||||
number: 10
|
||||
},
|
||||
payload: {
|
||||
action: 'opened',
|
||||
number: 10,
|
||||
issue: {
|
||||
number: 10
|
||||
@@ -19,7 +20,6 @@ export const context = {
|
||||
login: 'mona'
|
||||
}
|
||||
},
|
||||
action: 'opened',
|
||||
repo: {
|
||||
owner: 'actions',
|
||||
repo: 'first-interaction'
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('main.ts', () => {
|
||||
beforeEach(() => {
|
||||
// "Reset" the github context.
|
||||
github.context.eventName = 'pull_request'
|
||||
github.context.action = 'opened'
|
||||
github.context.payload.action = 'opened'
|
||||
github.context.payload.issue = undefined as any
|
||||
github.context.payload.pull_request = {
|
||||
number: 10
|
||||
@@ -49,6 +49,7 @@ describe('main.ts', () => {
|
||||
describe('run()', () => {
|
||||
it('Skips invalid events', async () => {
|
||||
github.context.eventName = 'push'
|
||||
github.context.payload = {} as any
|
||||
|
||||
await main.run()
|
||||
|
||||
@@ -56,7 +57,7 @@ describe('main.ts', () => {
|
||||
})
|
||||
|
||||
it('Skips invalid actions', async () => {
|
||||
github.context.action = 'edited'
|
||||
github.context.payload.action = 'edited'
|
||||
|
||||
await main.run()
|
||||
|
||||
@@ -73,17 +74,6 @@ describe('main.ts', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('Fails if neither PR nor issue are provided', async () => {
|
||||
github.context.payload.issue = undefined as any
|
||||
github.context.payload.pull_request = undefined as any
|
||||
|
||||
await main.run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
'Internal Error...No Issue or PR Provided by GitHub'
|
||||
)
|
||||
})
|
||||
|
||||
it('Fails if both PR and issue are provided', async () => {
|
||||
github.context.payload.issue = {
|
||||
number: 20
|
||||
|
||||
82
dist/index.js
generated
vendored
82
dist/index.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
import require$$0 from 'os';
|
||||
import require$$0$1 from 'crypto';
|
||||
import require$$1 from 'fs';
|
||||
import require$$1$5 from 'path';
|
||||
import require$$1$4 from 'path';
|
||||
import require$$2$1 from 'http';
|
||||
import require$$3$1 from 'https';
|
||||
import require$$0$4 from 'net';
|
||||
@@ -13,18 +13,16 @@ import require$$0$5 from 'stream';
|
||||
import require$$7 from 'buffer';
|
||||
import require$$8 from 'querystring';
|
||||
import require$$14 from 'stream/web';
|
||||
import require$$0$7 from 'node:stream';
|
||||
import require$$1$2 from 'node:util';
|
||||
import require$$0$6 from 'node:events';
|
||||
import require$$0$8 from 'worker_threads';
|
||||
import { createRequire } from 'node:module';
|
||||
import require$$0$6 from 'worker_threads';
|
||||
import require$$2$2 from 'perf_hooks';
|
||||
import require$$5 from 'util/types';
|
||||
import require$$4$2 from 'async_hooks';
|
||||
import require$$1$3 from 'console';
|
||||
import require$$1$4 from 'url';
|
||||
import require$$1$2 from 'console';
|
||||
import require$$1$3 from 'url';
|
||||
import require$$3$2 from 'zlib';
|
||||
import require$$6 from 'string_decoder';
|
||||
import require$$0$9 from 'diagnostics_channel';
|
||||
import require$$0$7 from 'diagnostics_channel';
|
||||
import require$$2$3 from 'child_process';
|
||||
import require$$6$1 from 'timers';
|
||||
|
||||
@@ -1753,6 +1751,15 @@ function requireTimers () {
|
||||
|
||||
var main = {exports: {}};
|
||||
|
||||
const require$3 = createRequire(import.meta.url);
|
||||
function __require$2() { return require$3("node:stream"); }
|
||||
|
||||
const require$2 = createRequire(import.meta.url);
|
||||
function __require$1() { return require$2("node:util"); }
|
||||
|
||||
const require$1 = createRequire(import.meta.url);
|
||||
function __require() { return require$1("node:events"); }
|
||||
|
||||
var sbmh;
|
||||
var hasRequiredSbmh;
|
||||
|
||||
@@ -1786,8 +1793,8 @@ function requireSbmh () {
|
||||
* Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
|
||||
* by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
|
||||
*/
|
||||
const EventEmitter = require$$0$6.EventEmitter;
|
||||
const inherits = require$$1$2.inherits;
|
||||
const EventEmitter = __require().EventEmitter;
|
||||
const inherits = __require$1().inherits;
|
||||
|
||||
function SBMH (needle) {
|
||||
if (typeof needle === 'string') {
|
||||
@@ -1996,8 +2003,8 @@ function requirePartStream () {
|
||||
if (hasRequiredPartStream) return PartStream_1;
|
||||
hasRequiredPartStream = 1;
|
||||
|
||||
const inherits = require$$1$2.inherits;
|
||||
const ReadableStream = require$$0$7.Readable;
|
||||
const inherits = __require$1().inherits;
|
||||
const ReadableStream = __require$2().Readable;
|
||||
|
||||
function PartStream (opts) {
|
||||
ReadableStream.call(this, opts);
|
||||
@@ -2041,8 +2048,8 @@ function requireHeaderParser () {
|
||||
if (hasRequiredHeaderParser) return HeaderParser_1;
|
||||
hasRequiredHeaderParser = 1;
|
||||
|
||||
const EventEmitter = require$$0$6.EventEmitter;
|
||||
const inherits = require$$1$2.inherits;
|
||||
const EventEmitter = __require().EventEmitter;
|
||||
const inherits = __require$1().inherits;
|
||||
const getLimit = requireGetLimit();
|
||||
|
||||
const StreamSearch = requireSbmh();
|
||||
@@ -2149,8 +2156,8 @@ function requireDicer () {
|
||||
if (hasRequiredDicer) return Dicer_1;
|
||||
hasRequiredDicer = 1;
|
||||
|
||||
const WritableStream = require$$0$7.Writable;
|
||||
const inherits = require$$1$2.inherits;
|
||||
const WritableStream = __require$2().Writable;
|
||||
const inherits = __require$1().inherits;
|
||||
|
||||
const StreamSearch = requireSbmh();
|
||||
|
||||
@@ -2726,8 +2733,8 @@ function requireMultipart () {
|
||||
// * support limits.fieldNameSize
|
||||
// -- this will require modifications to utils.parseParams
|
||||
|
||||
const { Readable } = require$$0$7;
|
||||
const { inherits } = require$$1$2;
|
||||
const { Readable } = __require$2();
|
||||
const { inherits } = __require$1();
|
||||
|
||||
const Dicer = requireDicer();
|
||||
|
||||
@@ -3292,8 +3299,8 @@ function requireMain () {
|
||||
if (hasRequiredMain) return main.exports;
|
||||
hasRequiredMain = 1;
|
||||
|
||||
const WritableStream = require$$0$7.Writable;
|
||||
const { inherits } = require$$1$2;
|
||||
const WritableStream = __require$2().Writable;
|
||||
const { inherits } = __require$1();
|
||||
const Dicer = requireDicer();
|
||||
|
||||
const MultipartParser = requireMultipart();
|
||||
@@ -3385,7 +3392,7 @@ function requireConstants$3 () {
|
||||
if (hasRequiredConstants$3) return constants$3;
|
||||
hasRequiredConstants$3 = 1;
|
||||
|
||||
const { MessageChannel, receiveMessageOnPort } = require$$0$8;
|
||||
const { MessageChannel, receiveMessageOnPort } = require$$0$6;
|
||||
|
||||
const corsSafeListedMethods = ['GET', 'HEAD', 'POST'];
|
||||
const corsSafeListedMethodsSet = new Set(corsSafeListedMethods);
|
||||
@@ -14141,7 +14148,7 @@ function requirePendingInterceptorsFormatter () {
|
||||
hasRequiredPendingInterceptorsFormatter = 1;
|
||||
|
||||
const { Transform } = require$$0$5;
|
||||
const { Console } = require$$1$3;
|
||||
const { Console } = require$$1$2;
|
||||
|
||||
/**
|
||||
* Gets the output of `console.table(…)` as a string.
|
||||
@@ -14368,7 +14375,7 @@ function requireProxyAgent () {
|
||||
hasRequiredProxyAgent = 1;
|
||||
|
||||
const { kProxy, kClose, kDestroy, kInterceptors } = requireSymbols$4();
|
||||
const { URL } = require$$1$4;
|
||||
const { URL } = require$$1$3;
|
||||
const Agent = requireAgent();
|
||||
const Pool = requirePool();
|
||||
const DispatcherBase = requireDispatcherBase();
|
||||
@@ -22318,7 +22325,7 @@ function requireEvents () {
|
||||
|
||||
const { webidl } = requireWebidl();
|
||||
const { kEnumerableProperty } = requireUtil$6();
|
||||
const { MessagePort } = require$$0$8;
|
||||
const { MessagePort } = require$$0$6;
|
||||
|
||||
/**
|
||||
* @see https://html.spec.whatwg.org/multipage/comms.html#messageevent
|
||||
@@ -22835,7 +22842,7 @@ function requireConnection () {
|
||||
if (hasRequiredConnection) return connection;
|
||||
hasRequiredConnection = 1;
|
||||
|
||||
const diagnosticsChannel = require$$0$9;
|
||||
const diagnosticsChannel = require$$0$7;
|
||||
const { uid, states } = requireConstants();
|
||||
const {
|
||||
kReadyState,
|
||||
@@ -23216,7 +23223,7 @@ function requireReceiver () {
|
||||
hasRequiredReceiver = 1;
|
||||
|
||||
const { Writable } = require$$0$5;
|
||||
const diagnosticsChannel = require$$0$9;
|
||||
const diagnosticsChannel = require$$0$7;
|
||||
const { parserStates, opcodes, states, emptyBuffer } = requireConstants();
|
||||
const { kReadyState, kSentClose, kResponse, kReceivedClose } = requireSymbols();
|
||||
const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = requireUtil();
|
||||
@@ -25539,7 +25546,7 @@ function requirePathUtils () {
|
||||
};
|
||||
Object.defineProperty(pathUtils, "__esModule", { value: true });
|
||||
pathUtils.toPlatformPath = pathUtils.toWin32Path = pathUtils.toPosixPath = void 0;
|
||||
const path = __importStar(require$$1$5);
|
||||
const path = __importStar(require$$1$4);
|
||||
/**
|
||||
* toPosixPath converts the given path to the posix form. On Windows, \\ will be
|
||||
* replaced with /.
|
||||
@@ -25626,7 +25633,7 @@ function requireIoUtil () {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
||||
const fs = __importStar(require$$1);
|
||||
const path = __importStar(require$$1$5);
|
||||
const path = __importStar(require$$1$4);
|
||||
_a = fs.promises
|
||||
// export const {open} = 'fs'
|
||||
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||
@@ -25816,7 +25823,7 @@ function requireIo () {
|
||||
Object.defineProperty(io, "__esModule", { value: true });
|
||||
io.findInPath = io.which = io.mkdirP = io.rmRF = io.mv = io.cp = void 0;
|
||||
const assert_1 = require$$0$3;
|
||||
const path = __importStar(require$$1$5);
|
||||
const path = __importStar(require$$1$4);
|
||||
const ioUtil = __importStar(requireIoUtil());
|
||||
/**
|
||||
* Copies a file or folder.
|
||||
@@ -26124,7 +26131,7 @@ function requireToolrunner () {
|
||||
const os = __importStar(require$$0);
|
||||
const events = __importStar(require$$4$1);
|
||||
const child = __importStar(require$$2$3);
|
||||
const path = __importStar(require$$1$5);
|
||||
const path = __importStar(require$$1$4);
|
||||
const io = __importStar(requireIo());
|
||||
const ioUtil = __importStar(requireIoUtil());
|
||||
const timers_1 = require$$6$1;
|
||||
@@ -26968,7 +26975,7 @@ function requireCore () {
|
||||
const file_command_1 = requireFileCommand();
|
||||
const utils_1 = requireUtils$3();
|
||||
const os = __importStar(require$$0);
|
||||
const path = __importStar(require$$1$5);
|
||||
const path = __importStar(require$$1$4);
|
||||
const oidc_utils_1 = requireOidcUtils();
|
||||
/**
|
||||
* The code to exit an action
|
||||
@@ -34825,22 +34832,19 @@ const Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginate
|
||||
|
||||
async function run() {
|
||||
coreExports.info('Running actions/first-interaction!');
|
||||
// Check if this is an issue or PR event.
|
||||
const isIssue = githubExports.context.payload.issue !== undefined;
|
||||
const isPullRequest = githubExports.context.payload.pull_request !== undefined;
|
||||
// Skip if this is not an issue or PR event.
|
||||
if (githubExports.context.eventName !== 'issues' &&
|
||||
githubExports.context.eventName !== 'pull_request')
|
||||
if (!isIssue && !isPullRequest)
|
||||
return coreExports.info('Skipping...Not an Issue/PR Event');
|
||||
// Skip if this is not an issue/PR open event.
|
||||
if (githubExports.context.action !== 'opened')
|
||||
if (githubExports.context.payload.action !== 'opened')
|
||||
return coreExports.info('Skipping...Not an Opened Event');
|
||||
// Confirm the sender data is present.
|
||||
if (!githubExports.context.payload.sender)
|
||||
return coreExports.setFailed('Internal Error...No Sender Provided by GitHub');
|
||||
// Check if this is an issue or PR event.
|
||||
const isIssue = githubExports.context.payload.issue !== undefined;
|
||||
const isPullRequest = githubExports.context.payload.pull_request !== undefined;
|
||||
// Confirm that only one of the two is present.
|
||||
if (!isIssue && !isPullRequest)
|
||||
return coreExports.setFailed('Internal Error...No Issue or PR Provided by GitHub');
|
||||
if (isIssue && isPullRequest)
|
||||
return coreExports.setFailed('Internal Error...Both Issue and PR Provided by GitHub');
|
||||
// Get the action inputs.
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -52,8 +52,7 @@ export default [
|
||||
sourceType: 'module',
|
||||
|
||||
parserOptions: {
|
||||
project: ['tsconfig.eslint.json'],
|
||||
tsconfigRootDir: '.'
|
||||
project: ['tsconfig.eslint.json']
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
5935
package-lock.json
generated
5935
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "first-interaction-action",
|
||||
"description": "An action for greeting first time contributors.",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"author": "GitHub",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
@@ -44,33 +44,33 @@
|
||||
"@octokit/rest": "^22.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.3.1",
|
||||
"@github/local-action": "^5.1.0",
|
||||
"@jest/globals": "^30.0.5",
|
||||
"@octokit/types": "^14.1.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.6",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-typescript": "^12.1.4",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^24.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
||||
"@eslint/compat": "^1.4.0",
|
||||
"@github/local-action": "^6.0.2",
|
||||
"@jest/globals": "^30.2.0",
|
||||
"@octokit/types": "^15.0.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.9",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-typescript": "^12.3.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^24.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||
"@typescript-eslint/parser": "^8.24.1",
|
||||
"eslint": "^9.32.0",
|
||||
"eslint": "^9.38.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-prettier": "^5.5.3",
|
||||
"globals": "^16.3.0",
|
||||
"jest": "^29.7.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"globals": "^16.4.0",
|
||||
"jest": "^30.2.0",
|
||||
"make-coverage-badge": "^1.2.0",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"rollup": "^4.46.2",
|
||||
"ts-jest": "^29.4.1",
|
||||
"rollup": "^4.52.5",
|
||||
"ts-jest": "^29.4.5",
|
||||
"ts-jest-resolver": "^2.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.9.2"
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "*"
|
||||
|
||||
17
src/main.ts
17
src/main.ts
@@ -5,28 +5,23 @@ import { Octokit } from '@octokit/rest'
|
||||
export async function run() {
|
||||
core.info('Running actions/first-interaction!')
|
||||
|
||||
// Check if this is an issue or PR event.
|
||||
const isIssue = github.context.payload.issue !== undefined
|
||||
const isPullRequest = github.context.payload.pull_request !== undefined
|
||||
|
||||
// Skip if this is not an issue or PR event.
|
||||
if (
|
||||
github.context.eventName !== 'issues' &&
|
||||
github.context.eventName !== 'pull_request'
|
||||
)
|
||||
if (!isIssue && !isPullRequest)
|
||||
return core.info('Skipping...Not an Issue/PR Event')
|
||||
|
||||
// Skip if this is not an issue/PR open event.
|
||||
if (github.context.action !== 'opened')
|
||||
if (github.context.payload.action !== 'opened')
|
||||
return core.info('Skipping...Not an Opened Event')
|
||||
|
||||
// Confirm the sender data is present.
|
||||
if (!github.context.payload.sender)
|
||||
return core.setFailed('Internal Error...No Sender Provided by GitHub')
|
||||
|
||||
// Check if this is an issue or PR event.
|
||||
const isIssue = github.context.payload.issue !== undefined
|
||||
const isPullRequest = github.context.payload.pull_request !== undefined
|
||||
|
||||
// Confirm that only one of the two is present.
|
||||
if (!isIssue && !isPullRequest)
|
||||
return core.setFailed('Internal Error...No Issue or PR Provided by GitHub')
|
||||
if (isIssue && isPullRequest)
|
||||
return core.setFailed(
|
||||
'Internal Error...Both Issue and PR Provided by GitHub'
|
||||
|
||||
Reference in New Issue
Block a user