Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change note creation script uses EDITOR environment variable #18739

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paldepind
Copy link
Contributor

Changes the script for creating change notes to read the EDITOR environment variable, and use the editor specified therein. This makes the script more convenient when used from a terminal.

The VSCode task is updated to the set EDITOR to code -r which preserves the current behavior.

Changes the script for creating change notes to read the EDITOR environment variable, and use the editor specified therein. This makes the script more convenient when used from a terminal. The VSCode task is updated to the set EDITOR to `code -r` which preserves the current behavior.
@Copilot Copilot bot review requested due to automatic review settings February 11, 2025 13:05

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR updates the change note creation script to utilize the EDITOR environment variable rather than hardcoding the VSCode command. It also updates the accompanying documentation to reflect that the editor specified by EDITOR will be used, preserving the previous behavior when VSCode is explicitly configured via environment settings.

  • Updated code comments to reference $EDITOR.
  • Replaced the hardcoded "code -r" command with a dynamic command read from the EDITOR environment variable.
  • Ensured backwards compatibility by relying on the VSCode task to set EDITOR to "code -r".

Changes

File Description
misc/scripts/create-change-note.py Modified command execution to read from the EDITOR variable.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

misc/scripts/create-change-note.py:55

  • The default editor command is now 'code' instead of 'code -r', which may alter the behavior of reusing an existing VSCode window. If preserving the previous behavior is important, consider defaulting to 'code -r' when the EDITOR variable is not set.
editor = os.environ.get('EDITOR', 'code')

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant