Skip to content

Commit

Permalink
feat: allow run on pull_request_target (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: KhulnaSoft bot <[email protected]>
  • Loading branch information
khulnasoft-bot authored Dec 1, 2024
1 parent 1f14dc8 commit d83779a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const lint = require('./lint.js')
const messageProps = { title: 'commit-lint' }

// exit early
if (!['pull_request', 'push'].includes(github.context.eventName)) {
if (!['pull_request', 'pull_request_target', 'push'].includes(github.context.eventName)) {
core.warning(`action ran on unsupported event: ${github.context.eventName}`, messageProps)
process.exit(0) // soft exit
}
Expand Down Expand Up @@ -45,7 +45,7 @@ const commits = []

async function main () {
// handle Pul Requests
if (github.context.eventName === 'pull_request') {
if (['pull_request', 'pull_request_target'].includes(github.context.eventName)) {
// fetch commits
const { data } = await octokit.rest.pulls.listCommits({
...github.context.repo,
Expand Down

0 comments on commit d83779a

Please sign in to comment.