simplify conditional logic

This commit is contained in:
nicholas-codecov 2024-08-09 07:42:29 -03:00
parent ccab10f482
commit 5694bb02fe
No known key found for this signature in database
GPG key ID: E1AF3B897173F71D

View file

@ -32,11 +32,7 @@ const getGitService = (): string => {
const isPullRequestFromFork = (): boolean => {
core.info(`evenName: ${context.eventName}`);
if (
['pull_request', 'pull_request_target'].every(
(event) => event !== context.eventName,
)
) {
if (!['pull_request', 'pull_request_target'].includes(context.eventName)) {
return false;
}