Migrate hide_comment safe output to JavaScript handler architecture #8234
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.
Migration Plan: hide_comment to JavaScript Handler Architecture ✅ COMPLETE
Understanding
Migration Tasks
allowed_reasonsto read fromconfig.allowed_reasonsgithub-tokenfield from hide-comment schemaChanges Made
1. JavaScript Handler (hide_comment.cjs)
main()to acceptconfigparameterallowed_reasonsfromconfig.allowed_reasonsinstead ofprocess.env.GH_AW_HIDE_COMMENT_ALLOWED_REASONS2. Go Compiler (safe_outputs_config_generation.go)
maxandallowed_reasonsfields3. Schema (main_workflow_schema.json)
github-tokenfield from hide-comment propertiesmax,target-repo, andallowed-reasonsremain in schema4. Tests (hide_comment.test.cjs)
main({}){ allowed_reasons: [...] }instead of env varsGH_AW_HIDE_COMMENT_ALLOWED_REASONScleanup from beforeEachArchitecture Alignment
This migration aligns hide_comment with the modern JavaScript handler architecture used by create_issue and other safe outputs:
Before (Environment Variables):
After (Config Object):
Benefits
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.