-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Copilot instructions to validate change notes #20667
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
Open
mario-campos
wants to merge
5
commits into
main
Choose a base branch
from
mario-campos/change-note-ccr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+293
−51
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9f65419
Add validation guide for query-pack change notes
mario-campos 1c2ee6e
Add validation guide for library-pack change notes
mario-campos 46b66b6
Simplify applyTo globs in library- and query-pack change-notes instru…
mario-campos 8d8a8e0
Instruct Copilot to suggest corrections in change notes
mario-campos 5ba3b20
Unify and expand change-note guidance
mario-campos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
.github/instructions/library-pack-change-notes.instructions.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| applyTo: "*/ql/lib/change-notes/*.md,shared/*/change-notes/*.md" | ||
| --- | ||
|
|
||
| # Validation guide for library-pack change notes | ||
|
|
||
| When reviewing change notes in a pull request, ensure that they meet the following standards. Suggest changes if necessary. | ||
|
|
||
| ## File name | ||
| The file name must match this pattern: `YYYY-MM-DD-description.md` | ||
| - `YYYY-MM-DD` should refer to the year, month, and day, respectively, of the change; | ||
| - `description` should refer to a short alphanumerical text, separated by hyphens, that describes the change-note; | ||
| - The extension should be ".md". | ||
|
|
||
| ### Examples | ||
| #### Valid | ||
|
|
||
| - 2020-10-12-new-client-library.md | ||
| - 2025-01-01-refactored-database-logic.md | ||
| - 2022-12-25-removed-log4j.md | ||
|
|
||
| #### Invalid | ||
|
|
||
| - 3000-60-32-invalid-date.md | ||
| - no-date-in-file-name.md | ||
| - 2019-01-01 file name contains spaces.md | ||
|
|
||
| ## Frontmatter | ||
| The file must begin with YAML frontmatter. Valid YAML frontmatter properties include: | ||
|
|
||
| - `category` | ||
| - Required | ||
| - This is a string that identifies one of a fixed set of categories that the change falls into. | ||
| - `tags` | ||
| - Optional | ||
| - A list of string tags. | ||
|
|
||
|
|
||
| ### Categories | ||
| | Category | Description | | ||
| |------------------|-------------| | ||
| | `breaking` | Any breaking change to the library pack, the most common of which is the deletion of an existing API. | | ||
| | `deprecated` | An existing API has been marked as deprecated. | | ||
| | `feature` | A new library API has been added. | | ||
| | `majorAnalysis` | An API has changed in a way that may affect the results produced by a query that consumes the API. | | ||
| | `minorAnalysis` | An API has changed in a way that may affect the results produced by a query that consumes the API, but only in scenarios that affect relatively few users. | | ||
| | `fix` | An API has been fixed in a way that is not likely to affect the results produced by a query that consumes the API. | | ||
|
|
||
| ### Examples | ||
| #### Valid | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: feature | ||
| --- | ||
| ``` | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: majorAnalysis | ||
| tags: cpp | ||
| --- | ||
| ``` | ||
|
|
||
| #### Invalid | ||
|
|
||
| ##### Missing `category` property | ||
|
|
||
| ```yaml | ||
| --- | ||
| tags: cpp | ||
| --- | ||
| ``` | ||
|
|
||
| ##### Invalid category `bug`; use `fix` instead | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: bug | ||
| --- | ||
| ``` | ||
|
|
||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ## Description | ||
| The content after the YAML frontmatter must be an American-English description of the change in one or more unordered Markdown list entries. | ||
|
|
||
| ### Examples | ||
|
|
||
| #### Valid | ||
|
|
||
| ```markdown | ||
| * Added support for the Nim programming language. | ||
| ``` | ||
|
|
||
| #### Invalid | ||
|
|
||
| ##### Change description is not in a bullet-list entry | ||
| ```markdown | ||
| Added support for the Nim programming language. | ||
| ``` | ||
|
|
||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ##### No headers; only list entries | ||
| ```markdown | ||
| # Fixes | ||
| * Fixed C++ source parsing to handle comma operator. | ||
| ``` | ||
105 changes: 105 additions & 0 deletions
105
.github/instructions/query-pack-change-notes.instructions.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| applyTo: "*/ql/src/change-notes/*.md" | ||
| --- | ||
|
|
||
| # Validation guide for query-pack change notes | ||
|
|
||
| When reviewing change notes in a pull request, ensure that they meet the following standards. Suggest changes if necessary. | ||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## File name | ||
| The file name must match this pattern: `YYYY-MM-DD-description.md` | ||
| - `YYYY-MM-DD` should refer to the year, month, and day, respectively, of the change; | ||
| - `description` should refer to a short alphanumerical text, separated by hyphens, that describes the change-note; | ||
| - The extension should be ".md". | ||
|
|
||
| ### Examples | ||
| #### Valid | ||
|
|
||
| - 2020-10-12-new-client-library.md | ||
| - 2025-01-01-refactored-database-logic.md | ||
| - 2022-12-25-removed-log4j.md | ||
|
|
||
| #### Invalid | ||
|
|
||
| - 3000-60-32-invalid-date.md | ||
| - no-date-in-file-name.md | ||
| - 2019-01-01 file name contains spaces.md | ||
|
|
||
| ## Frontmatter | ||
| The file must begin with YAML frontmatter. Valid YAML frontmatter properties include: | ||
|
|
||
| - `category` | ||
| - Required | ||
| - This is a string that identifies one of a fixed set of categories that the change falls into. | ||
| - `tags` | ||
| - Optional | ||
| - A list of string tags. | ||
|
|
||
| ### Categories | ||
| | Category | Description | | ||
| |------------------|-------------| | ||
| | `breaking` | Any breaking change to the query pack, the most common of which is the deletion of an existing query. | | ||
| | `deprecated` | An existing query has been marked as `deprecated`. | | ||
| | `newQuery` | A new query has been added. | | ||
| | `queryMetadata` | The metadata of a query has been changed (e.g., to increase or reduce the `@precision`). | | ||
| | `majorAnalysis` | The set of results produced by a query has changed (fewer false positives, more true positives, etc.) enough to be noticed by users of the query pack. | | ||
| | `minorAnalysis` | The set of results produced by a query has changed, but only in scenarios that affect relatively few users. | | ||
| | `fix` | A fix that does not change the results reported by a query (e.g., a performance fix). | | ||
|
|
||
| ### Examples | ||
| #### Valid | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: newQuery | ||
| --- | ||
| ``` | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: majorAnalysis | ||
| tags: cpp | ||
| --- | ||
| ``` | ||
|
|
||
| #### Invalid | ||
|
|
||
| ##### Missing `category` property | ||
|
|
||
| ```yaml | ||
| --- | ||
| tags: cpp | ||
| --- | ||
| ``` | ||
|
|
||
| ##### Invalid category `bug`; use `fix` instead | ||
|
|
||
| ```yaml | ||
| --- | ||
| category: bug | ||
| --- | ||
| ``` | ||
|
|
||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ## Description | ||
| The content after the YAML frontmatter must be an American-English description of the change in one or more unordered Markdown list entries. | ||
|
|
||
| ### Examples | ||
|
|
||
| #### Valid | ||
|
|
||
| ```markdown | ||
| * Added support for the Nim programming language. | ||
| ``` | ||
|
|
||
| #### Invalid | ||
|
|
||
| ##### Change description is not in a bullet-list entry | ||
| ```markdown | ||
| Added support for the Nim programming language. | ||
| ``` | ||
|
|
||
| ##### No headers; only list entries | ||
| ```markdown | ||
| # Fixes | ||
| * Fixed C++ source parsing to handle comma operator. | ||
| ``` | ||
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.
Uh oh!
There was an error while loading. Please reload this page.