Command Palette

Search for a command to run...

1GitHub stars
Components

GitHub Contribution List

List authored pull requests with merged, open, and closed states.

Loading…

Features

  • Renders each pull request with its title, target repository, and state.
  • Colors and icons distinguish merged, open, and closed states.
  • Links every row to the pull request on GitHub.
  • Presentational and prop-driven, so it works with data from any source.

Installation

pnpm dlx shadcn@latest add @ompatil/github-contribution-list

Usage

import { GitHubContributionList } from "@/components/github-contribution-list"
import type { GitHubContribution } from "@/lib/get-github-data/github-data"
 
const CONTRIBUTIONS: GitHubContribution[] = [
  {
    id: 1,
    title: "Add structured output support to the agent runtime",
    repo: "langchain-ai/langchain",
    url: "https://github.com/langchain-ai/langchain/pull/41188",
    state: "merged",
    createdAt: "2026-02-18T10:00:00.000Z",
  },
  {
    id: 2,
    title: "Fix chunk overlap in the sentence splitter",
    repo: "run-llama/llama_index",
    url: "https://github.com/run-llama/llama_index/pull/23443",
    state: "open",
    createdAt: "2026-02-11T10:00:00.000Z",
  },
  {
    id: 3,
    title: "Document DVC pipeline caching for large datasets",
    repo: "treeverse/dvc",
    url: "https://github.com/treeverse/dvc/pull/11105",
    state: "closed",
    createdAt: "2026-01-29T10:00:00.000Z",
  },
]
 
export default function GitHubContributionListDemo() {
  return (
    <div className="w-full max-w-xl p-4">
      <GitHubContributionList
        contributions={CONTRIBUTIONS}
        className="rounded-xl border border-line"
      />
    </div>
  )
}

API reference

GitHubContributionList

Prop

Type

Data

Pair the list with the get-github-data library to fetch authored pull requests. The mapper drops pull requests against repositories the viewer owns, so only outside contributions are shown:

import { getCachedGithubData } from "@/lib/get-github-data/get-cached-github-data"
import { GitHubContributionList } from "@/components/github-contribution-list"
 
export async function Contributions() {
  const data = await getCachedGithubData("vercel")
 
  return <GitHubContributionList contributions={data?.contributions ?? []} />
}

Was this helpful?

Command Palette

Search for a command to run...