Compare commits

...
Author SHA1 Message Date
Nick Alteen 8e69b57fc5 Merge branch 'main' into ncalteen/event 2025-09-16 13:07:31 -04:00
Nick AlteenandGitHub 69c5373796 Merge pull request #351 from actions/dependabot/npm_and_yarn/github/local-action-6.0.0
Bump @github/local-action from 5.2.0 to 6.0.0
2025-09-16 13:06:16 -04:00
Nick Alteen dcfeffc0c7 Rebuild 2025-09-16 13:04:29 -04:00
dependabot[bot]andGitHub fb54a3d8ae Bump @github/local-action from 5.2.0 to 6.0.0
Bumps [@github/local-action](https://github.com/github/local-action) from 5.2.0 to 6.0.0.
- [Release notes](https://github.com/github/local-action/releases)
- [Changelog](https://github.com/github/local-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/local-action/compare/v5.2...v6)

---
updated-dependencies:
- dependency-name: "@github/local-action"
  dependency-version: 6.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-16 17:02:14 +00:00
Nick AlteenandGitHub 4618d4d5bb Merge pull request #353 from actions/dependabot/npm_and_yarn/npm-development-043d04e7f8
Bump the npm-development group with 6 updates
2025-09-16 13:00:50 -04:00
Nick Alteen 6b35c8253b Fix event action check 2025-09-16 13:00:00 -04:00
dependabot[bot]andGitHub 6cea8723ea Bump the npm-development group with 6 updates
Bumps the npm-development group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.3.1` | `24.5.0` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.43.0` | `8.44.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.43.0` | `8.44.0` |
| [globals](https://github.com/sindresorhus/globals) | `16.3.0` | `16.4.0` |
| [rollup](https://github.com/rollup/rollup) | `4.50.1` | `4.50.2` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.4.1` | `29.4.2` |


Updates `@types/node` from 24.3.1 to 24.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.43.0 to 8.44.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.44.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.43.0 to 8.44.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.44.0/packages/parser)

Updates `globals` from 16.3.0 to 16.4.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.3.0...v16.4.0)

Updates `rollup` from 4.50.1 to 4.50.2
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.50.1...v4.50.2)

Updates `ts-jest` from 29.4.1 to 29.4.2
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.4.1...v29.4.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.44.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.44.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: globals
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: rollup
  dependency-version: 4.50.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: ts-jest
  dependency-version: 29.4.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-15 20:36:50 +00:00
Nick AlteenandGitHub f44c11ebd1 Merge pull request #349 from actions/ncalteen/events 2025-09-11 17:56:25 -04:00
Nick Alteen f598f6795f Rebuild dist 2025-09-09 14:48:21 -04:00
Nick Alteen 060edb2b27 Expand supported event types 2025-09-09 14:45:57 -04:00
Nick AlteenandGitHub 77cbbd906f Merge pull request #346 from actions/dependabot/npm_and_yarn/npm-development-8389f5b25c
Bump the npm-development group with 8 updates
2025-09-09 14:31:29 -04:00
Nick AlteenandGitHub 14f252a1f6 Merge pull request #347 from actions/dependabot/npm_and_yarn/rollup/rollup-linux-x64-gnu-4.50.1
Bump @rollup/rollup-linux-x64-gnu from 4.48.1 to 4.50.1
2025-09-09 14:31:12 -04:00
Nick AlteenandGitHub ad93111721 Merge pull request #348 from actions/dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-09-09 14:30:21 -04:00
dependabot[bot]andGitHub dad370b79a Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 21:01:19 +00:00
dependabot[bot]andGitHub 8000bc50c7 Bump @rollup/rollup-linux-x64-gnu from 4.48.1 to 4.50.1
Bumps [@rollup/rollup-linux-x64-gnu](https://github.com/rollup/rollup) from 4.48.1 to 4.50.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.48.1...v4.50.1)

---
updated-dependencies:
- dependency-name: "@rollup/rollup-linux-x64-gnu"
  dependency-version: 4.50.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 20:56:28 +00:00
dependabot[bot]andGitHub 82f80dfd18 Bump the npm-development group with 8 updates
Bumps the npm-development group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [@github/local-action](https://github.com/github/local-action) | `5.1.0` | `5.2.0` |
| [@jest/globals](https://github.com/jestjs/jest/tree/HEAD/packages/jest-globals) | `30.0.5` | `30.1.2` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.3.0` | `24.3.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.41.0` | `8.43.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.41.0` | `8.43.0` |
| [eslint](https://github.com/eslint/eslint) | `9.34.0` | `9.35.0` |
| [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `30.0.5` | `30.1.3` |
| [rollup](https://github.com/rollup/rollup) | `4.48.1` | `4.50.1` |


Updates `@github/local-action` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/github/local-action/releases)
- [Changelog](https://github.com/github/local-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/local-action/compare/v5.1...v5.2)

Updates `@jest/globals` from 30.0.5 to 30.1.2
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.1.2/packages/jest-globals)

Updates `@types/node` from 24.3.0 to 24.3.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.41.0 to 8.43.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.41.0 to 8.43.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/parser)

Updates `eslint` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.35.0)

Updates `jest` from 30.0.5 to 30.1.3
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.1.3/packages/jest)

Updates `rollup` from 4.48.1 to 4.50.1
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.48.1...v4.50.1)

---
updated-dependencies:
- dependency-name: "@github/local-action"
  dependency-version: 5.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@jest/globals"
  dependency-version: 30.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@types/node"
  dependency-version: 24.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: jest
  dependency-version: 30.1.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: rollup
  dependency-version: 4.50.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 20:52:32 +00:00
Nick AlteenandGitHub c4df7d4167 Merge pull request #344 from actions/ncalteen/inputs 2025-08-28 14:31:44 -04:00
11 changed files with 882 additions and 693 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: .node-version
cache: npm
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: .node-version
cache: npm
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: .node-version
cache: npm
+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: .node-version
cache: npm
+1 -1
View File
@@ -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'
+3 -13
View File
@@ -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
Generated Vendored
+5 -8
View File
@@ -34825,22 +34825,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.
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+852 -645
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -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,
@@ -45,29 +45,29 @@
},
"devDependencies": {
"@eslint/compat": "^1.3.2",
"@github/local-action": "^5.1.0",
"@jest/globals": "^30.0.5",
"@github/local-action": "^6.0.0",
"@jest/globals": "^30.1.2",
"@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": "^30.0.0",
"@types/node": "^24.3.0",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@types/node": "^24.5.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.24.1",
"eslint": "^9.34.0",
"eslint": "^9.35.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.4",
"globals": "^16.3.0",
"jest": "^30.0.5",
"globals": "^16.4.0",
"jest": "^30.1.3",
"make-coverage-badge": "^1.2.0",
"prettier": "^3.6.2",
"prettier-eslint": "^16.4.2",
"rollup": "^4.48.1",
"ts-jest": "^29.4.1",
"rollup": "^4.50.2",
"ts-jest": "^29.4.2",
"ts-jest-resolver": "^2.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.9.2"
+6 -11
View File
@@ -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'