Skip to content

Commit

Permalink
Updated event trigger from pull_request to pull_request_target
Browse files Browse the repository at this point in the history
Also added if the details is missing then the validation will fail from a custom validation error
  • Loading branch information
abhayymishraa authored Jan 4, 2025
1 parent 7b0cfc3 commit c78621c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-body-validation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PR Body Validation

on:
pull_request:
pull_request_target:
types: [opened, edited, synchronize, reopened]

jobs:
Expand Down Expand Up @@ -104,6 +104,7 @@ jobs:
labels: ['needs-info']
});
}
core.setFailed(`The following required information is missing or incomplete: ${missingItemsList}`);
} else if (hasNeedsInfoLabel) {
// If all requirements are met and the needs-info label exists, remove it
await github.rest.issues.removeLabel({
Expand All @@ -112,4 +113,4 @@ jobs:
issue_number: context.issue.number,
name: 'needs-info'
});
}
}

0 comments on commit c78621c

Please sign in to comment.