GitHub Pull Requests Board logo

Backstage GitHub Pull Requests Board Plugin

Created by DAZN

GitHub Pull Requests Board gives your team a single view of open pull requests inside Backstage. It collects PRs across repositories your group owns. You can switch the view to include PRs opened by your team members across the org. The goal is simple. Help reviewers see what is ready. Cut the time from open to merged. This is most helpful when your team owns many repos or supports many services.

The plugin adds a card for a team overview page plus a full page view. Each PR shows status and helpful context like checks and labels. You can set a limit per repo to keep things focused. You can include archived repositories when you need to triage long running items. The board reduces context switching. Your team can scan the backlog, find blockers, and move work forward from one place.

DAZN created this plugin and contributes it to the Backstage community. DAZN runs Backstage across many teams. As they put it, Backstage makes it possible to view, and manage thousands of services, through discoverability. Learn more by reading their post Integrating Backstage at DAZN.

Installation Instructions

These instructions apply to self-hosted Backstage only.

Install the frontend package

  1. From your Backstage root folder run

    Copy
    yarn --cwd packages/app add @backstage-community/plugin-github-pull-requests-board
  2. This plugin has no backend package to install

Configure GitHub auth in app config

  1. Add a GitHub auth provider in app config

    Copy
    auth:
      providers:
        github:
          development:
            clientId: ${GITHUB_CLIENT_ID}
            clientSecret: ${GITHUB_CLIENT_SECRET}
  2. Make sure your GitHub app grants read only permission for Pull Requests

  3. Add a GitHub integration entry if you use GitHub com or GitHub Enterprise

    Copy
    integrations:
      github:
        - host: github.com

Add the card to the Group page classic frontend

  1. Open packages/app/src/components/catalog/EntityPage.tsx

  2. Import the card

    Copy
    import { EntityTeamPullRequestsCard } from '@backstage-community/plugin-github-pull-requests-board';
  3. Render it on the Group page Overview route

    Copy
    import React from 'react';
    import { Grid } from '@material-ui/core';
    import { EntityLayout } from '@backstage/plugin-catalog';
    import { EntityGroupProfileCard, EntityMembersListCard, EntityOwnershipCard } from '@backstage/plugin-catalog';
    import { Entity } from '@backstage/catalog-model';
    import { useEntity } from '@backstage/plugin-catalog-react';
    import { EntityTeamPullRequestsCard } from '@backstage-community/plugin-github-pull-requests-board';
    
    const GroupOverviewContent = () => {
      const { entity } = useEntity();
      return (
        <Grid container spacing={3}>
          <Grid item xs={12} md={6}>
            <EntityGroupProfileCard variant="gridItem" />
          </Grid>
          <Grid item xs={12} md={6}>
            <EntityOwnershipCard variant="gridItem" />
          </Grid>
          <Grid item xs={12}>
            <EntityMembersListCard />
          </Grid>
          <Grid item xs={12}>
            <EntityTeamPullRequestsCard />
          </Grid>
        </Grid>
      );
    };
    
    export const groupPage = (
      <EntityLayout>
        <EntityLayout.Route path="/" title="Overview">
          <GroupOverviewContent />
        </EntityLayout.Route>
      </EntityLayout>
    );

Optional limit the number of pull requests per repo

Copy
<Grid item xs={12}>
  <EntityTeamPullRequestsCard pullRequestLimit={5} />
</Grid>

Add a Pull Requests tab classic frontend

  1. Open packages/app/src/components/catalog/EntityPage.tsx

  2. Import the content component

    Copy
    import { EntityTeamPullRequestsContent } from '@backstage-community/plugin-github-pull-requests-board';
  3. Add a new route under the Group page

    Copy
    import React from 'react';
    import { EntityLayout } from '@backstage/plugin-catalog';
    import { EntityTeamPullRequestsContent } from '@backstage-community/plugin-github-pull-requests-board';
    
    export const groupPage = (
      <EntityLayout>
        <EntityLayout.Route path="/" title="Overview">
          {/* your overview content */}
        </EntityLayout.Route>
        <EntityLayout.Route path="/pull-requests" title="Pull Requests">
          <EntityTeamPullRequestsContent />
        </EntityLayout.Route>
      </EntityLayout>
    );

Optional limit the number of pull requests per repo on the tab

Copy
<EntityTeamPullRequestsContent pullRequestLimit={5} />

Use the new frontend system

  1. Open packages/app/src/App.tsx

  2. Import the plugin feature from the alpha entry point

    Copy
    import githubPullRequestsPlugin from '@backstage-community/plugin-github-pull-requests-board/alpha';
  3. Add it to the features array

    Copy
    import { createApp } from '@backstage/app-defaults';
    
    export const app = createApp({
      features: [
        githubPullRequestsPlugin,
      ],
    });
  4. Place the UI where you want users to see it
    You can still use the same card or content components shown above in your Entity page files

Where this shows up in your app

  • The card shows on the Group Overview page when you add EntityTeamPullRequestsCard to the Group layout
  • The tab shows on the Group page when you add EntityTeamPullRequestsContent under the Pull Requests route

What the plugin reads

  • Open pull requests across repositories owned by the team for the current Group entity
  • It uses the signed in user session from the GitHub auth provider
    Make sure the provider has read only permission for Pull Requests

Changelog

This changelog is produced from commits made to the GitHub Pull Requests Board plugin since a year ago, and based on the code located here. It may not contain information about all commits. Releases and version bumps are intentionally omitted. This changelog is generated by AI.

Features

  • #4710 Decouple the board from the entity page. Add a component that accepts one or more entities so you can render the board outside the entity context. No breaking changes noted by the author. Merged 1 month ago
  • #2037 Add support for the new frontend system under the alpha path. Keep backward compatibility. Merged 10 months ago

Fixes

  • #2049 Fix draft PR icon color to follow the theme. Improve dark mode appearance. Merged 10 months ago

Maintenance

  • #3565 Remove unused dev dependency canvas. Merged 6 months ago
  • #3018 Update repo tools and clean up knip false positives with a workspace based config. Merged 7 months ago

Set up Backstage in minutes with Roadie