Replace core.debug with core.info in JavaScript files and instructions#1873
Merged
Replace core.debug with core.info in JavaScript files and instructions#1873
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update logging from core.debug to core.info
Replace core.debug with core.info in JavaScript files and instructions
Oct 17, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
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.
This PR replaces all uses of
core.debugwithcore.infoin JavaScript.cjsfiles used withactions/github-scriptand updates the associated instructions.Problem
The codebase was using
core.debug()for logging informational messages throughout JavaScript action scripts. The requirement is to standardize oncore.info()instead for better visibility and consistency in GitHub Actions logs.Changes
Instructions
Updated
.github/instructions/github-script.instructions.mdto remove the recommendation to usecore.debugfor verbose debug logging from the best practices section.Production Files
Replaced all 42 occurrences of
core.debug()withcore.info()across 8 production JavaScript files:add_labels.cjs- Logging for label processing and validationcreate_discussion.cjs- Logging for discussion creation workflowcheck_permissions.cjs- Logging for permission checks and validationcreate_pull_request.cjs- Logging for PR creation stepsredact_secrets.cjs- Logging for secret redaction operationscompute_text.cjs- Logging for text computationcheck_membership.cjs- Logging for membership checksvalidate_errors.cjs- Logging for error validationTest Files
Updated test assertions in 5 test files to check for
core.infoinstead ofcore.debug:add_labels.test.cjs- 11 test assertionscheck_permissions.test.cjs- 6 test assertionscreate_discussion.test.cjs- 1 test assertionredact_secrets.test.cjs- Test name and 2 assertionsvalidate_errors.test.cjs- Variable name and assertionTesting
core.debugcalls remain in production codeThis change improves logging consistency across the codebase and ensures informational messages are properly visible in GitHub Actions workflow runs.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.