Docs: add guidance for previous-id metadata#19097
Merged
jcogs33 merged 3 commits intogithub:mainfrom Mar 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the documentation to add guidance on using a new previous-id metadata tag for queries that have been migrated from a different query.
- Introduces a new guideline for queries with alerts that were previously reported on a different query.
- Provides an example demonstrating the intended usage of the
previous-idtag.
Comments suppressed due to low confidence (1)
docs/query-metadata-style-guide.md:142
- Consider clarifying whether the
previous-idshould always be implemented as a tag or if it could alternatively be a property, as suggested in the PR description. Explicitly stating the intended usage here will help maintain consistency.
+Queries with alerts that used to be reported on a different query should have a `previous-id:<previous-query-id>` tag to refer back to the query where the alerts were originally reported. For example, if alerts from `java/query-one` are now reported on `java/query-two`, then the metadata for `java/query-two` should contain: `@tags previous-id:java/query-one`.
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
previous-id metadata tagprevious-id metadata
adityasharad
previously approved these changes
Mar 24, 2025
Contributor
Author
|
@adityasharad Should I update this Metadata properties table as well? Proposed update in bea8ce3. |
adityasharad
approved these changes
Mar 24, 2025
jcogs33
pushed a commit
to jcogs33/codeql
that referenced
this pull request
Mar 24, 2025
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.
Proposal for a
previous-idtagproperty to track when alerts are moved to a different query. This is relevant for the current work on migrating the expert services quality queries.Let me know if this should be a property (e.g.Switched to a property.@previous-id java/query-one) instead of a tag.