Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 8, 2025

  • Update check_flatpak_runtimes.py to include source information for all tracked packages in JSON output
  • Modify check_donation_metadata.py to:
    • Remove donation URL reachability checks
    • Load source information from JSON properly
    • Add source-specific labels (bluefin, aurora, bazzite, etc.) to GitHub issues
    • Update issue body to reflect that URL reachability is no longer checked
    • Simplify docstring for normalize_source_for_label per review
  • Test the changes with Python syntax validation
  • Update code to handle source name normalization for labels
  • Update mock data generator to include source information for testing
  • Create and run comprehensive tests validating source label functionality
  • Address review feedback on documentation and consistency
Original prompt

@ublue-os/flatpak-tracker/issues/97 fix this


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 8, 2025 16:14
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue 97 in Flatpak tracker repository Add source-based labels to donation metadata issues and remove URL reachability check Oct 8, 2025
Copilot AI requested a review from castrojo October 8, 2025 16:19
Copilot finished work on behalf of castrojo October 8, 2025 16:19
"app/org.gnome.TextEditor": {"sources": ["bluefin"]},
"app/org.gimp.GIMP": {"sources": ["aurora"]},
"app/org.libreoffice.LibreOffice": {"sources": ["bazzite-gnome"]},
"app/com.spotify.Client": {"sources": ["bluefin", "bazzite-kde"]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use bazzite-gnome consistently in the mock data. Commit: 5a7c3e8

Comment on lines 119 to 131
def normalize_source_for_label(self, source: str) -> str:
"""Normalize source name to a valid GitHub label format.
Examples:
'bluefin' -> 'bluefin'
'bluefin-bazaar' -> 'bluefin'
'bazzite-gnome' -> 'bazzite'
'bazzite-kde' -> 'bazzite'
'aurora' -> 'aurora'
"""
# Extract the main project name (first part before hyphen)
base_name = source.split('-')[0]
return base_name
Copy link
Collaborator

Choose a reason for hiding this comment

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

you don't need to care about if it's the kde version of bazzite or gnome edition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the docstring to be more concise. The normalization logic remains the same - it extracts the main project name (e.g., 'bazzite-gnome' → 'bazzite'). Commit: 5a7c3e8

@castrojo
Copy link
Member

castrojo commented Oct 8, 2025

@copilot Continue with your next iteration, taking @renner0e 's review into account

Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Copilot finished work on behalf of castrojo October 8, 2025 16:46
@castrojo castrojo marked this pull request as ready for review October 18, 2025 00:12
@castrojo castrojo requested a review from Copilot October 18, 2025 00:12
Copy link
Contributor

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 enhances the flatpak tracker by adding source-based labels to donation metadata issues and removing URL reachability checks. The changes streamline the donation metadata checking process while providing better organization through source-specific GitHub issue labels.

Key changes:

  • Enhanced JSON output to include source information for all tracked packages
  • Removed donation URL reachability validation logic
  • Added automatic source-based labeling (bluefin, aurora, bazzite, etc.) to GitHub issues

Reviewed Changes

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

File Description
check_flatpak_runtimes.py Added source information to JSON output for donation metadata checker consumption
check_donation_metadata.py Removed URL reachability checks, added source-based labeling, and updated issue creation logic
create_mock_data.py Enhanced mock data with source information for testing the new functionality

# Missing donation URL
title = f"Donation Link missing for {app_id}"
body = f"""## Missing Donation Link
# Only handle missing donation URL (no unreachable URL logic)
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

The comment on line 209 should be moved or reformatted. It appears to be a standalone comment that doesn't clearly relate to the conditional logic that was removed. Consider either removing this comment or making it more descriptive of what the following code block does.

Suggested change
# Only handle missing donation URL (no unreachable URL logic)
# Create a GitHub issue for packages with missing donation URLs

Copilot uses AI. Check for mistakes.
Comment on lines +377 to +379
class SimpleInfo:
def __init__(self, sources):
self.sources = sources
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

The SimpleInfo class is defined twice within the same function scope (lines 377-379 and 385-387). This creates duplicate class definitions with different constructors. Consider defining a single SimpleInfo class outside the function or using a factory function to avoid this duplication.

Copilot uses AI. Check for mistakes.
Comment on lines +385 to +387
class SimpleInfo:
def __init__(self):
self.sources = ['tracked']
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

The SimpleInfo class is defined twice within the same function scope (lines 377-379 and 385-387). This creates duplicate class definitions with different constructors. Consider defining a single SimpleInfo class outside the function or using a factory function to avoid this duplication.

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.

3 participants