FileScope is a web application that helps you find all GitHub Pull Requests (PRs), both open and closed, that have modified a specific file in a public repository. Simply provide the full GitHub file URL, and FileScope will return a list of PRs that have changed that file.
- Find PRs by File: Enter a GitHub file URL to see all PRs that have modified it.
- Web UI: Simple web interface for quick searching.
- API: Programmatic access to the core functionality.
- Supports Open & Closed PRs: See all relevant PRs, not just open ones.
- Go 1.20+
- A GitHub personal access token (for higher rate limits)
-
Clone the repository:
git clone https://github.com/ayush5588/FileScope.git cd FileScope -
Set up your GitHub token:
- Create a file named
.envin the root directory. - Add your GitHub token as an environment variable:
GITHUB_TOKEN_1=your_github_token_here
- (Optional) For higher rate limits, you can add multiple tokens as
GITHUB_TOKEN_1,GITHUB_TOKEN_2, etc.
- Create a file named
-
Run the application:
go run main.go
The server will start on http://localhost:8080.
You can also run FileScope using Docker:
docker build -t filescope .
docker run -p 8080:8080 --env-file .env filescope
OR
docker-compose up --build- Open http://localhost:8080 in your browser.
- Enter the full GitHub file URL (e.g.,
https://github.com/owner/repo/blob/branch/path/to/file.go). - Submit to see a table of PRs that have modified the file.
GET /healthz— Health check endpoint.POST /getPR— Accepts a form fieldfilePath(the GitHub file URL) and returns a JSON list of PRs that have modified the file.
curl -X POST -F 'filePath=https://github.com/owner/repo/blob/branch/path/to/file.go' http://localhost:8080/getPREach PR in the response includes:
- PR number (with link)
- Creation date
- Creator
- Title
- Branch
If the input URL is invalid or the file cannot be found, a helpful error message will be returned.
MIT