Skip to content

Extends Refined GitHub with AI contribution tracking capabilities for GitHub pull requests. Line-level AI attribution visualization by reading Git AI Standard metadata from git notes, enabling transparent attribution of AI-generated code contributions in collaborative development workflows.

License

Notifications You must be signed in to change notification settings

rbbydotdev/refined-github-with-ai-pr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4,421 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Refined GitHub With AI PR Attribution

Refined GitHub with AI PR Attribution

Browser extension that integrates Git AI Standard attribution data into GitHub pull request interfaces

Note

📖 Read the full article: GitHub Browser Plugin for AI Contribution Blame in Pull Requests Learn more about the motivation, implementation details, and future of AI attribution in collaborative development.

Overview

This project extends Refined GitHub with AI contribution tracking capabilities for GitHub pull requests. It provides line-level AI attribution visualization by reading Git AI Standard metadata from git notes, enabling transparent attribution of AI-generated code contributions in collaborative development workflows.

Screenshots

Light Mode

Light mode screenshot showing AI attribution in GitHub PR

Dark Mode

Dark mode screenshot showing AI attribution in GitHub PR

Technical Background

The Git AI Standard

The Git AI Standard provides a vendor-agnostic framework for tracking AI-assisted code contributions across the software development lifecycle. It preserves attribution metadata through git operations (merge, rebase, squash, cherry-pick) by storing data in git notes attached to commit refs. This metadata includes:

  • Per-line AI contribution attribution
  • Model identifiers and version information
  • Original prompts used for code generation
  • Linkage between prompts and resulting code

Architecture

This extension augments the GitHub pull request interface by:

  1. Reading Git AI Standard Data: Extracts AI attribution metadata from git notes refs during PR diff rendering
  2. Visual Indicators: Applies syntax highlighting and gutter annotations to AI-contributed lines in the Files Changed view
  3. Contribution Metrics: Calculates and displays human vs. AI contribution percentages at the file and PR level
  4. Contextual Information: Provides hover states and detail panels showing model information and generation context

Implementation Details

The plugin operates by:

  • Hooking into GitHub's DOM rendering pipeline to identify code diff elements
  • Fetching git-ai attribution data via GitHub API or local git notes
  • Applying CSS classes and DOM modifications to visualize AI contributions
  • Maintaining compatibility with GitHub's dynamic page updates and UI changes

Feature Highlights

  • Line-level Attribution: Visual indicators on each line showing AI vs. human authorship
  • Contribution Statistics: Summary metrics showing the percentage breakdown of AI contributions
  • Model Information: Display of which AI model (Claude Code, Cursor, Copilot, etc.) generated specific code segments
  • Toggleable Interface: Feature can be enabled/disabled through extension options
  • Full Refined GitHub Feature Set: Retains all features from the base Refined GitHub extension

Installation

Detailed installation instructions are available in the project repository. The extension requires:

  • Installation of git-ai CLI tool
  • Browser extension installation and authentication
  • Configuration of git-ai in your development workflow

Status and Limitations

This is a proof-of-concept implementation serving as a beta prototype for AI contribution attribution in GitHub interfaces.

Key Limitation: The extension relies on GitHub's HTML structure and CSS classes, which may change without notice and cause breakage. This approach is inherently fragile and requires ongoing maintenance to track GitHub UI updates.

Use Cases

This tooling is designed for development teams and projects that:

  • Accept AI-assisted contributions and need transparent attribution
  • Want to track AI impact on codebases over time
  • Need to enforce policies around AI contribution percentages
  • Require audit trails linking prompts to generated code
  • Desire retrospective analysis of which code segments were AI-generated

Contributing

Feedback, issues, and contributions are welcome. This project aims to advance the conversation around AI-assisted development practices and attribution standards. Community input on implementation approaches and feature requirements is encouraged.


ORIGINAL README:

Refined GitHub

Browser extension that simplifies the GitHub interface and adds useful features

We use GitHub a lot and notice many annoyances we'd like to fix. So here be dragons.

Our hope is that GitHub will notice and implement some of these much-needed improvements. So if you like any of these improvements, please open a discussion on GitHub feedback or contact GitHub support about doing it.

GitHub Enterprise is also supported: How to enable it.

The GITHUB and REFINED GITHUB trademarks are owned by GitHub, Inc. and used under license.

Install

Chrome and other Chromium browsers

Firefox including Firefox Android

Safari on Mac, iOS and iPadOS

If you love Refined GitHub, consider sponsoring or hiring the maintainer @fregante


Highlights 🔥

Makes whitespace characters visible

Tells you whether you're looking at the latest version of a repository, or if there are any unreleased commits

Shows how far behind a PR head branch is + tells you its base commit

Lets you hide every event except comments or unresolved comments in issues and PRs

Lets you subscribe to opening/closing events of issues in one click

Adds a link to the default branch on directory listings and files

Adds a button to discard all the changes to a file in a PR

Select notifications by type and status

Repositories

File management

Code

Writing comments

Reading comments

Conversations

Viewing pull requests

Editing pull requests

Commits

Tags and releases

Profiles

Notifications

Global

Netiquette

Fixes for GitHub shortcomings

Previously part of Refined GitHub

GitHub took inspiration from Refined GitHub and natively implemented dozens of its features, 🎉 so they've been removed from this extension. You can also see all the past features of Refined GitHub in a single list.

Customization

Most features can be disabled if they are JavaScript-based and you can override our CSS with your own in the extension options.

We're happy to receive suggestions and contributions, but be aware this is a highly opinionated project. There's a high bar for adding features. Users will always disagree with something. That being said, we're open to discussing things.

Links

About

Extends Refined GitHub with AI contribution tracking capabilities for GitHub pull requests. Line-level AI attribution visualization by reading Git AI Standard metadata from git notes, enabling transparent attribution of AI-generated code contributions in collaborative development workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.0%
  • CSS 8.8%
  • JavaScript 1.6%
  • Swift 1.3%
  • HTML 1.0%
  • Svelte 1.0%
  • Shell 0.3%