Skip to content

Commit

Permalink
add support for pull_request_target event (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>
  • Loading branch information
tlhunter and Qard authored Jul 18, 2024
1 parent bcd1d29 commit e2af4ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ const {
toMarkdown
}= require('./')

const events = new Set([
'pull_request',
'pull_request_target'
])

async function createOrUpdateIssueComment (message) {
info(`Event type ${context.eventName}`)
if (context.eventName !== 'pull_request') return
if (!events.has(context.eventName)) return

const sig = '<sub>🤖 This report was automatically generated by [heaviest-objects-in-the-universe](https://github.com/qard/heaviest-objects-in-the-universe/)<sub>'
const body = [message, sig].join('\n\n')
Expand Down

0 comments on commit e2af4ff

Please sign in to comment.