Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Label synchronization can delete unrelated user-managed labels beginning with severity-.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds GitHub code-scanning severity labels to Jira issues and keeps them synchronized.
Changes:
- Derives severity from code-scanning rules.
- Adds or updates
severity-*Jira labels. - Documents label synchronization behavior.
File summaries
| File | Description |
|---|---|
sync.py |
Passes alert severity during synchronization. |
jiralib.py |
Creates and updates severity labels. |
ghlib.py |
Extracts alert severity. |
README.md |
Documents severity labels. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Configured labels can collide with managed severity labels, causing issues to retain multiple contradictory severities.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
jiralib.py:197
- Configured Jira labels are concatenated with the managed severity without excluding the reserved severity values. For example,
jira_labels: severity-highcreates a low-severity alert with bothseverity-highandseverity-low, so the issue no longer has the single current severity described in the README. Reject/reserve these values injira_labels, or filter managed severity labels fromself.labelsbefore appending the alert's current severity.
This issue also appears on line 316 of the same file.
jiralib.py:316
- This loop re-adds any managed severity value present in
jira_labelsimmediately after line 315 removes stale severity labels. Thus an existing low-severity issue remains labeledseverity-highandseverity-lowwhenseverity-highis configured, instead of replacing the stale value. Exclude or reject managed severity labels from configured labels before merging the current severity.
for label in self.labels + severity_labels(severity):
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Balanced
maritiren
marked this pull request as draft
September 14, 2026 16:09
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.
This feature adds the severity label to the Jira issue.
The severity label is needed for project managers/whoever prioritizes tasks to prioritize the findings into sprints.
We discussed whether to write the labels with or without the
severity-prefix. We figured we'd keep a clear language. See the example: