Bug 2043733 - Live Github Status for Pull Requests#2635
Open
dklawren wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new GitHubPullRequests extension that renders a live status panel in the bug modal for any attachment whose content type is text/x-github-pull-request. A new REST endpoint fetches PR metadata (state, author, labels, latest review per reviewer) from the GitHub REST API on demand, and a client-side script populates a table with a "show closed/merged" toggle.
Changes:
- New extension scaffolding (
Extension.pm,Config.pm) and template hooks forbug_modalto display a "GitHub Pull Requests" module. - New
WebService.pmexposinggithubpr/bug_pull_requests/<bug_id>which iterates non-obsolete PR attachments and calls the GitHub API (PR + reviews) for each. - Front-end assets (table template, JS, CSS) that render the PR list, badges, reviewer symbols, and closed/merged toggle.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/GitHubPullRequests/Config.pm | Declares the extension name. |
| extensions/GitHubPullRequests/Extension.pm | Detects GitHub PR attachments and exposes vars/dispatch for templates and the webservice. |
| extensions/GitHubPullRequests/lib/WebService.pm | New REST method that calls the GitHub API per attached PR and summarizes reviews. |
| extensions/GitHubPullRequests/template/en/default/hook/bug_modal/header-end.html.tmpl | Includes CSS/JS when a bug has GitHub PR attachments. |
| extensions/GitHubPullRequests/template/en/default/hook/bug_modal/edit-module.html.tmpl | Renders the "GitHub Pull Requests" module with a subtitle. |
| extensions/GitHubPullRequests/template/en/default/github/header.html.tmpl | Pushes JS/CSS URLs into the page. |
| extensions/GitHubPullRequests/template/en/default/github/table.html.tmpl | Skeleton table with loading/error rows and the show-closed toggle. |
| extensions/GitHubPullRequests/web/js/github_pull_requests.js | Fetches the REST endpoint and builds the table rows client-side. |
| extensions/GitHubPullRequests/web/style/github_pull_requests.css | Styles for state badges, reviewer list, labels, and column sizing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Uh oh!
There was an error while loading. Please reload this page.