Uh oh!
There was an error while loading. Please reload this page.
Dynamic required messages - #409
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the GitHub Action logic so only the relevant input message is required (issue vs PR), and expands the test suite to validate the new required-input behavior.
Changes:
- Refactor
run()to read a singlemessageinput based on whether the event is an issue or a pull request. - Update compiled
dist/index.jsto match the source change. - Add tests covering “non-required” and “required missing” scenarios for
issue_message/pr_message.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/main.ts | Reads only the applicable input (issue_message or pr_message) and uses it as the comment body. |
| dist/index.js | Compiled output updated to reflect the new input selection logic. |
| badges/coverage.svg | Coverage badge SVG regenerated/updated. |
| tests/main.test.ts | Reworks getInput mocking and adds targeted tests for required input behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In 900dc32, both the
pr_messageandissue_messagewere marked as required parameters inrun(), but neither was noted asrequired: truein theaction.ymlfile.When a repository only wants to welcome new contributors on pull requests (or vice versa), then a non-empty message needs to be specified for the other event type.
This removes that requirement by dynamically marking the respective message input based on the triggering event. This is a bit of a different approach to #404, which removes all
required: truedesignations in favor of enforcing the requirement through conditional blocks.Fixes#365.