-
Notifications
You must be signed in to change notification settings - Fork 3
Add source-based labels to donation metadata issues and remove URL reachability check #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
create_mock_data.py
Outdated
| "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"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
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
| 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
There was a problem hiding this 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) |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
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.
| # Only handle missing donation URL (no unreachable URL logic) | |
| # Create a GitHub issue for packages with missing donation URLs |
| class SimpleInfo: | ||
| def __init__(self, sources): | ||
| self.sources = sources |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
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.
| class SimpleInfo: | ||
| def __init__(self): | ||
| self.sources = ['tracked'] |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
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.
check_flatpak_runtimes.pyto include source information for all tracked packages in JSON outputcheck_donation_metadata.pyto:Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.