Expand supported event types

This commit is contained in:
Nick Alteen
2025-09-09 14:45:57 -04:00
parent 77cbbd906f
commit 060edb2b27
4 changed files with 10 additions and 40 deletions
+1 -11
View File
@@ -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()
@@ -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