Skip to content

Commit

Permalink
Merge pull request #39 from sjohnr/gh-38
Browse files Browse the repository at this point in the history
Exclude PRs from external repos
  • Loading branch information
rsyvarth authored Aug 19, 2022
2 parents de07ba9 + b334b36 commit 339d6b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ async function main(): Promise<void> {

// Build Pull Request string if required
const pull_requests = (workflow_run.pull_requests as PullRequest[])
.filter(
pull_request =>
pull_request.base.repo.url === workflow_run.repository.url // exclude PRs from external repositories
)
.map(
pull_request =>
`<${workflow_run.repository.html_url}/pull/${pull_request.number}|#${pull_request.number}> from \`${pull_request.head.ref}\` to \`${pull_request.base.ref}\``
Expand Down

0 comments on commit 339d6b4

Please sign in to comment.