feat(copilot): Adding copilot instructions#4407
Conversation
There was a problem hiding this comment.
Pull request overview
Adds repository-level GitHub Copilot instruction docs to standardize PR review behavior and provide guidance for editing icon metadata JSON files under icons/.
Changes:
- Added
.github/copilot-instructions.mdwith guidance for how Copilot should phrase PR reviews. - Added
.github/instructions/metadata.instructions.md(scoped viaapplyTo: "icons/*.json") describing conventions for icon metadata fields likecontributors,tags, andcategories.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/instructions/metadata.instructions.md | Adds Copilot-scoped instructions for editing/validating icons/*.json metadata fields. |
| .github/copilot-instructions.md | Adds general Copilot guidance for tone/structure when reviewing PRs. |
Comments suppressed due to low confidence (1)
.github/instructions/metadata.instructions.md:15
- The instruction that tags "should not contain spaces" conflicts with existing icon metadata: many current
icons/*.jsontags are multi-word strings (e.g.,"heart rate monitor"inicons/activity.json). Consider updating this guidance to allow spaces and instead recommend consistent casing/wording based on existing tags (and rely onicon.schema.json, which does not restrict spaces).
The `tags` property is an array of strings that describe the icon and can be used for searching.
Validate the tags against the `icon.schema.json` to ensure they are correctly formatted and adhere to the defined structure.
Provide tag suggestions based on the name of the icon and the use cases provided in the PR description. Use the existing tags in the repository as a reference for consistency and to avoid duplicates. Don't suggest words like: 'icon' and preferably use single words. Tags should always be in lowercase and should not contain spaces. The name of icon should not be included in the tags, as it is already specified.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.github/instructions/metadata.instructions.md:19
- The examples here include categories like "interface" and "media", but these are not valid values in the
categoriesenum inicon.schema.json(e.g. the schema uses "multimedia" rather than "media"). Consider updating the examples to only include allowed schema values to avoid reviewers requesting invalid categories.
The `categories` property is an array of strings that specify the categories to which the icon belongs, such as "devices", "interface", "media", etc. See the `categories` property in the `icon.schema.json` for more details on the allowed values. The categories should be chosen based on the use cases provided in the PR description and the existing categories in the repository. The categories should be relevant to the icon and should help users find the icon when searching for specific types of icons. The name of icon should not be included in the categories, as it is already specified. Suggest categories based on the name of the icon and the use cases provided in the PR description. Use the existing categories in the repository as a reference for consistency and to avoid duplicates. Categories should always be in lowercase and should not contain spaces.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
.github/instructions/metadata.instructions.md:16
- This guidance says tags should not contain spaces / should be single words, but existing icon metadata uses multi-word tags with spaces (e.g.,
icons/activity.jsonincludes "heart rate monitor"). The instructions should match existing repository conventions (allow multi-word tags, while keeping other constraints like lowercase if desired).
The `tags` property is an array of strings that describe the icon and can be used for searching.
Validate the tags against the `icon.schema.json` to ensure they are correctly formatted and adhere to the defined structure.
Provide tag suggestions based on the name of the icon and the use cases provided in the PR description. Use the existing tags in the repository as a reference for consistency and to avoid duplicates. Don't suggest words like: 'icon' and preferably use single words. Tags should always be in lowercase and should not contain spaces. The name of icon should not be included in the tags, as it is already specified.
.github/instructions/metadata.instructions.md:18
- The Categories heading level is inconsistent with the rest of the document (it’s a top-level
#while other sections use##). Consider changing it to## Categoriesfor consistent structure.
# Categories
.github/instructions/metadata.instructions.md:20
- The examples include categories like "interface" and "media", but these are not valid values per
icon.schema.json’scategoriesenum. Please update the examples to valid categories (e.g., "layout", "multimedia", etc.) to avoid misleading contributors.
The `categories` property is an array of strings that specify the categories to which the icon belongs, such as "devices", "interface", "media", etc. See the `categories` property in the `icon.schema.json` for more details on the allowed values. The categories should be chosen based on the use cases provided in the PR description and the existing categories in the repository. The categories should be relevant to the icon and should help users find the icon when searching for specific types of icons. The name of icon should not be included in the categories, as it is already specified. Suggest categories based on the name of the icon and the use cases provided in the PR description. Use the existing categories in the repository as a reference for consistency and to avoid duplicates. Categories should always be in lowercase and should not contain spaces.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
.github/instructions/metadata.instructions.md:20
- This section uses an H1 heading (
# Categories) even though it’s a peer of “## Contributors/## Tags”, and the example category values include entries that aren’t valid pericon.schema.json(e.g. "interface" and "media" are not in the allowed enum; "multimedia" is). Align the heading level and examples with the schema’s allowed category list to avoid misleading guidance.
# Categories
The `categories` property is an array of strings that specify the categories to which the icon belongs, such as "devices", "interface", "media", etc. See the `categories` property in the `icon.schema.json` for more details on the allowed values. The categories should be chosen based on the use cases provided in the PR description and the existing categories in the repository. The categories should be relevant to the icon and should help users find the icon when searching for specific types of icons. The name of icon should not be included in the categories, as it is already specified. Suggest categories based on the name of the icon and the use cases provided in the PR description. Use the existing categories in the repository as a reference for consistency and to avoid duplicates. Categories should always be in lowercase and should not contain spaces.
|
|
||
| The `tags` property is an array of strings that describe the icon and can be used for searching. | ||
| Validate the tags against the `icon.schema.json` to ensure they are correctly formatted and adhere to the defined structure. | ||
| Provide tag suggestions based on the name of the icon and the use cases provided in the PR description. Use the existing tags in the repository as a reference for consistency and to avoid duplicates. Don't suggest words like: 'icon' and preferably use single words. Tags should always be in lowercase and should not contain spaces. The name of icon should not be included in the tags, as it is already specified. |
| When reviewing PRs, please respond in a friendly and constructive manner. | ||
|
|
||
| - First, thank the contributor for their contribution in an enthusiastic way. | ||
| - If you have any suggestions for improvement, provide them clearly and concisely. | ||
| - If you have any questions about the PR, ask them respectfully. | ||
| - Let the contributor know that we have many PRs to review and that we appreciate their patience while we review their contribution. |
This pull request adds documentation to improve the review process for pull requests and provides detailed instructions for handling icon metadata files. The main changes focus on setting clear guidelines for PR reviews and standardizing the management of icon JSON metadata, including contributors, tags, and categories.
Documentation for PR review process:
.github/copilot-instructions.mdoutlining expectations for reviewing PRs, including being friendly, constructive, and appreciative, as well as providing clear feedback and acknowledging contributors' patience.Instructions for icon metadata:
.github/instructions/metadata.instructions.mdwith comprehensive instructions for managing icon JSON metadata descriptors, including:contributorsproperty, ensuring significant contributors are credited.tags, including formatting, exclusion of icon names, and consistency with existing tags.categories, with instructions on relevance, formatting, and avoiding duplicates, referencing the schema and repository standards.