Add explicit DIFC labeling for list_issue_fields in GitHub guard#6637
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix guard coverage gap for list_issue_fields operation
Add explicit DIFC labeling for May 28, 2026
list_issue_fields in GitHub guard
Contributor
There was a problem hiding this comment.
Pull request overview
This PR closes a DIFC labeling gap by giving list_issue_fields an explicit GitHub guard rule aligned with list_issue_types.
Changes:
- Adds a
list_issue_fieldsarm inapply_tool_labels. - Applies GitHub-global project integrity labels to issue field metadata.
- Adds a regression test comparing
list_issue_fieldsandlist_issue_typesintegrity behavior.
Show a summary per file
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Adds the explicit labeling rule for list_issue_fields. |
guards/github-guard/rust-guard/src/labels/mod.rs |
Adds a focused unit test for the new rule. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Comment on lines
+452
to
+456
| "list_issue_fields" => { | ||
| // Org-level custom issue field definitions (field names/types/allowed values) | ||
| // S = inherits from org | ||
| // I = project:org - maintained by org admins | ||
| integrity = project_github_label(ctx); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced May 29, 2026
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.
The guard had a coverage gap for
list_issue_fields: it lacked an explicitapply_tool_labelsarm and fell through to default label inheritance. This left org/project issue field metadata without the intendedproject:githubintegrity constraints.DIFC rule coverage
list_issue_fieldsmatch arm intool_rules.rs.list_issue_typesby applyingproject_github_label(ctx).Regression protection
labels/mod.rsto assertlist_issue_fieldsresolves to the same integrity labels aslist_issue_types.