Skip to content

Bug 2043733 - Live Github Status for Pull Requests#2635

Open
dklawren wants to merge 3 commits into
mozilla-bteam:masterfrom
dklawren:2043733
Open

Bug 2043733 - Live Github Status for Pull Requests#2635
dklawren wants to merge 3 commits into
mozilla-bteam:masterfrom
dklawren:2043733

Conversation

@dklawren

@dklawren dklawren commented May 30, 2026

Copy link
Copy Markdown
Collaborator
image

Copilot AI review requested due to automatic review settings May 30, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown

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 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 for bug_modal to display a "GitHub Pull Requests" module.
  • New WebService.pm exposing githubpr/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.

Comment thread extensions/GitHubPullRequests/Extension.pm Outdated
Comment thread extensions/GitHubPullRequests/lib/WebService.pm
Comment thread extensions/GitHubPullRequests/lib/WebService.pm
Comment thread extensions/GitHubPullRequests/lib/WebService.pm
Comment thread extensions/GitHubPullRequests/web/js/github_pull_requests.js Outdated
Comment thread extensions/GitHubPullRequests/lib/WebService.pm
Comment thread extensions/GitHubPullRequests/lib/WebService.pm Outdated
@dklawren dklawren added the WIP label Jun 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread Bugzilla/Config/Github.pm Outdated
Comment thread extensions/GitHubPullRequests/Extension.pm
Comment thread extensions/GitHubPullRequests/lib/WebService.pm
Comment thread template/en/default/admin/params/github.html.tmpl Outdated
@dklawren dklawren removed the WIP label Jun 10, 2026
@dklawren dklawren requested a review from cgsheeh June 10, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants