-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add script and VSCode task for creating change notes #18086
base: main
Are you sure you want to change the base?
Conversation
Adds a VSCode Task (accessible from the "Run Task" menu) for creating change notes, prompting the user for the language, name, and category of the change. The language options presented are based on the existing occurrences of `change-notes` folders in the repo. There are more such files (in particular every shared library has a `change-notes` directory), but it seemed to me that the language change notes are the ones that are most common, and so in an effort to not clutter the list too much, I only included the languages. The selection of categories is based on existing usage -- more specifically the result of grepping for occurrences of '^category: ' in the repo. It's possible there are more change categories that could be added. Hopefully this should make it more convenient to create change notes from within VSCode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no suggestions.
Files not reviewed (1)
- .vscode/tasks.json: Language not supported
Comments skipped due to low confidence (1)
misc/scripts/create-change-note.py:31
- The error message could be more informative. Consider changing it to: 'Output directory {language}/ql/lib/change-notes does not exist. Please ensure the directory path is correct.'
print(f"Output directory {language}/ql/lib/change-notes does not exist")
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Looks reasonable to me.
"minorAnalysis", | ||
"newQuery", | ||
"fix", | ||
"majorAnalysis", | ||
"breaking", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the categories differ between library changes and query changes: https://github.com/github/codeql/blob/main/docs/change-notes.md
# - The name of the change note (in kebab-case) | ||
# - The category of the change. | ||
|
||
# The change note will be created in the `{language}/ql/lib/change-notes` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about query changes? Which should go in {language}/ql/src/change-notes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️
Adds a VSCode Task (accessible from the "Run Task" menu) for creating change notes, prompting the user for the language, name, and category of the change.
The language options presented are based on the existing occurrences of
change-notes
folders in the repo. There are more such files (in particular every shared library has achange-notes
directory), but it seemed to me that the language change notes are the ones that are most common, and so in an effort to not clutter the list too much, I only included the languages.The selection of categories is based on existing usage -- more specifically the result of grepping for occurrences of
'^category: '
in the repo. It's possible there are more change categories that could be added.Hopefully this should make it more convenient to create change notes from within VSCode.
Pull Request checklist
All query authors
.qhelp
. See the documentation in this repository.Internal query authors only
.ql
,.qll
, or.qhelp
files. See the documentation (internal access required).