[jsweep] Clean handle_noop_message.cjs#15649
Merged
Conversation
- Remove unnecessary try/catch that just re-throws errors
- Use destructuring for API responses (data)
- Modernize filter with parameter destructuring ({ type })
- Improve code clarity while maintaining all functionality
pelikhan
approved these changes
Feb 14, 2026
Contributor
|
@copilot format, lint |
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors actions/setup/js/handle_noop_message.cjs (a github-script helper) to simplify REST API call handling and adopt more modern JavaScript patterns while keeping behavior the same for no-op run reporting.
Changes:
- Use response destructuring for GitHub REST API calls (search + create issue).
- Remove a redundant try/catch around issue creation that only logged and re-threw.
- Minor modern JS cleanup (parameter destructuring in a filter predicate).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleaned up
handle_noop_message.cjsto use modern JavaScript patterns and remove unnecessary error handling.Changes Made
Removed Unnecessary Try/Catch Block
Modern JavaScript Patterns
const { data } = await github.rest.search.issuesAndPullRequests(...)instead ofconst searchResult = ...then accessingsearchResult.datafilter(({ type }) => type !== "noop")instead offilter(item => item.type !== "noop")Testing
All tests pass successfully:
Validation Checks Passed
All required validation checks completed successfully:
npm run format:cjs- All files formatted correctlynpm run lint:cjs- All matched files use Prettier code stylenpm run typecheck- No type errorsnpm run test:js -- handle_noop_message- All 12 tests passedCode Context
Impact