Skip to content

Conversation

nastena1606
Copy link

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Percona Operator release notes generation to an existing collaborative release notes system. The changes extend the form to handle both MongoDB Software and Operator project types, dynamically adjusting the UI and data processing logic.

  • Added release type selection between MongoDB Software and Operator projects
  • Implemented operator-specific JIRA project mapping and ticket key handling
  • Created dedicated operator markdown template with appropriate sections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
templates/index.html Added release type selector, operator project options, dynamic form field visibility, and operator-specific ticket handling
app.py Added JIRA project mapping, operator ticket key logic, and separate operator markdown generation function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<input type="hidden" id="release-id">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div style="display:block;">
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CSS classes instead of inline styles. Consider adding a CSS class like 'form-field-visible' to maintain consistency with the project's styling approach.

Suggested change
<div style="display:block;">
<div class="block">

Copilot uses AI. Check for mistakes.

<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div style="display:block;">
<label for="version" class="block text-sm font-bold text-blue-700 mb-1">Version <span style="color:red;">*</span></label>
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CSS classes instead of inline styles for the required field indicator. Consider adding a 'required-field' class to maintain consistency with the project's styling approach.

Copilot uses AI. Check for mistakes.

Comment on lines +129 to +133
# If key does not start with project, prepend it (for operators)
if not key.upper().startswith(jira_project_key.upper() + "-") and key.isdigit():
full_key = f"{jira_project_key}-{key}"
else:
full_key = key.upper()
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for determining when to prepend the project key could be clearer. Consider extracting this into a helper function with explicit comments explaining the conditions for operator vs regular ticket key handling.

Suggested change
# If key does not start with project, prepend it (for operators)
if not key.upper().startswith(jira_project_key.upper() + "-") and key.isdigit():
full_key = f"{jira_project_key}-{key}"
else:
full_key = key.upper()
full_key = format_jira_ticket_key(key, jira_project_key)

Copilot uses AI. Check for mistakes.

Comment on lines +146 to +149
if release_type == 'operator':
markdown_output = generate_operator_markdown(mongo_intro, release_highlights, upstream_section, tickets_with_summaries, release.get('version'), release.get('codename'), domain, project)
else:
markdown_output = generate_final_markdown(mongo_intro, release_highlights, upstream_section, tickets_with_summaries, release.get('version'), release.get('codename'), domain)
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mongo_intro parameter is misleading when passed to generate_operator_markdown since operators don't use MongoDB-specific introductions. Consider renaming or restructuring to avoid confusion.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants