-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add link to status page to view PRs in GH #11071
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
Add link to status page to view PRs in GH #11071
Conversation
77d94b1 to
c729be0
Compare
c729be0 to
50cd53c
Compare
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
Adds a GitHub link to the status page that allows users to view pull requests directly on GitHub, making it easier to deploy both current and past commits.
- Adds a new method
get_github_search_link()to construct GitHub search URLs for PRs - Updates the status page template to include a "View PRs on GitHub" link
- Adds internationalization support for the new link text
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openlibrary/plugins/openlibrary/status.py | Implements GitHub search URL construction method |
| openlibrary/templates/status.html | Adds GitHub link UI element to status page |
| openlibrary/i18n/messages.pot | Adds translation entry for new link text |
|
|
||
| def get_github_search_link(self) -> str: | ||
| """Constructs a GitHub search URL for all PRs in pr_statuses.""" | ||
| from urllib.parse import urlencode |
Copilot
AI
Jul 24, 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 import statement should be moved to the top of the file with other imports rather than inside the method to follow Python best practices and improve readability.
| from urllib.parse import urlencode |
Copilot uses AI. Check for mistakes.
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.
@RayBB hmm shouldn't this have been automatically done by pre-commit?
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.
No pre-commit orders imports at the top of file but it won't complain about imports in functions.
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.
Is that something we could enable? It would be good if we had to explicitly tag these kinds of imports.
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.
Yes I'll look into it with
https://docs.astral.sh/ruff/rules/import-outside-top-level/
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.
@cdrini turns out we don't have it because we're on an old version of ruff :')
|
great quality of life devops improvement, ty Drini! |
Small extension to make deploying PRs a little bit easier. This way we can deploy the past commits as well as the current ones.
Technical
Testing
Screenshot
Stakeholders