Forgejo integration for VS Code like editors.
  • TypeScript 85.5%
  • JavaScript 9.2%
  • CSS 4.2%
  • Shell 1.1%
Find a file
2026-04-19 20:48:09 +05:30
.forgejo/workflows ci: gate publish on test, live-test, and smoke-test jobs 2026-02-20 11:58:49 +05:30
.vscode Initial commit 2026-01-26 14:21:36 +05:30
__mocks__ feat: add inline PR commenting via Comment Controller API 2026-02-14 13:12:12 +05:30
patches fix: Fix patch-package patch for vscode-test-playwright exports 2026-02-12 23:10:45 +05:30
research Add marketing research work into the repo 2026-02-08 17:40:08 +05:30
scripts chore: bump version to v0.3.13 2026-03-22 13:13:06 +05:30
src test: assert forgejo client outputs 2026-04-19 20:29:16 +05:30
.eslintrc.json chore: upgrade ESLint to strict-type-checked + stylistic rules 2026-02-15 10:37:24 +05:30
.forgejo-claude.yml Add .forgejo-claude.yml to enable bot 2026-02-16 19:10:31 +05:30
.gitattributes tests: Add unit tests and setup Forgejo 2026-01-26 15:31:07 +05:30
.gitignore chore: remove .claude/ directory from git tracking 2026-03-04 20:02:54 +05:30
.vscode-test.mjs tests: Add unit tests and setup Forgejo 2026-01-26 15:31:07 +05:30
.vscodeignore fix: include forgejo-ts in vsix package 2026-02-17 14:01:19 +05:30
AGENTS.md docs: add build and install workflow to AGENTS.md 2026-01-31 14:47:25 +05:30
BUGS.md fix: resolve CI failures by removing unavailable codecov action and adjusting coverage thresholds 2026-01-31 11:33:50 +05:30
CLAUDE.md docs: add read:issues to required token scope documentation 2026-04-18 12:41:41 +05:30
docker-compose.e2e.yml feat: Add comprehensive Playwright E2E test coverage and local test infrastructure 2026-02-13 00:12:14 +05:30
forgejo_icon.png Add new logo and update vscodeignore to remove tests 2026-02-13 11:51:03 +05:30
jest.config.js test: Improve unit test coverage from 45% to 75% statements 2026-02-12 19:53:44 +05:30
LICENSE Add License in package 2026-02-07 14:02:07 +05:30
MAINTAINERS.md chore: remove private URLs and internal tracking data for open-source readiness 2026-03-04 19:30:19 +05:30
package-lock.json chore: bump forgejo-ts to 0.3.1 2026-04-19 20:17:04 +05:30
package.json chore: bump forgejo-ts to 0.3.1 2026-04-19 20:17:04 +05:30
PLAN-E2E-COVERAGE.md feat: Add comprehensive Playwright E2E test coverage and local test infrastructure 2026-02-13 00:12:14 +05:30
playwright.config.ts feat: Add Playwright E2E tests for webview components 2026-02-07 13:37:23 +05:30
playwright.live.config.ts feat: Add Playwright live e2e tests to CI pipeline 2026-02-12 21:29:49 +05:30
playwright.vscode.config.ts feat: Add Playwright VS Code e2e test harness 2026-02-08 21:35:04 +05:30
README.md docs: add next-version news entry 2026-04-19 10:22:34 +05:30
TESTING-E2E.md feat: Add comprehensive Playwright E2E test coverage and local test infrastructure 2026-02-13 00:12:14 +05:30
TESTING.md tests: Add unit tests and setup Forgejo 2026-01-26 15:31:07 +05:30
tsconfig.json docs: add installation instructions and fix TypeScript config 2026-01-31 09:25:14 +05:30
tsconfig.test.json feat: Add Playwright VS Code e2e test harness 2026-02-08 21:35:04 +05:30

Forgejo VS Code Extension

Browse Pull Requests, Issues, and Actions from Forgejo, Gitea, and Codeberg directly in VS Code.

VS Code Marketplace Open VSX

Install

Install from VS Code Marketplace -- or search for "Forgejo Integration" in the Extensions panel (Ctrl+Shift+X).

Install from Open VSX -- for VSCodium and other compatible editors.

Quick Start

  1. Open a folder containing a Forgejo, Codeberg, or Gitea git repository
  2. Click the Forgejo icon in the Activity Bar (sidebar)
  3. Done! Your PRs and Issues appear automatically

For private repositories, add a Personal Access Token.

News

Next version

  • Safer git remote detection: the extension now separates repository identity from instance resolution. HTTP(S) remotes still support zero-config detection, while SSH remotes no longer guess a Forgejo web/API URL from the git transport. If you're using SSH remotes with a self-hosted instance, configure the Forgejo instance explicitly for the most reliable matching.

Features

Pull Requests

  • Browse PRs grouped by state (Open, Draft, Merged, Closed)
  • View file changes directly in VS Code's diff editor
  • Add inline review comments on PR diffs
  • Create new pull requests from within VS Code
  • Merge PRs with multiple strategies (merge, squash, rebase)
  • Close PRs directly from the sidebar
  • Rich detail view showing description, comments, CI status, and timeline

Issues

  • Browse issues with full details and comments
  • Create new issues from within VS Code
  • Rich detail view with comment history and timeline events

Actions / CI

  • Monitor CI/CD workflow runs in a 3-level tree view (Run > Job > Step)
  • View job logs directly in the editor
  • Re-run failed workflows
  • Clickable CI status links in PR detail views

Multi-Instance & Auto-Detection

  • Connect to multiple Forgejo servers simultaneously
  • Auto-detect instance from your git remote
  • Select preferred remote when multiple remotes exist
  • Built-in diagnostics to troubleshoot connection issues

Browser Integration

  • Open any PR, Issue, or Action in your browser with one click

Supported Platforms

  • Codeberg
  • Self-hosted Forgejo instances
  • Gitea instances (compatible API)

Setting Up Authentication

Authentication is optional for public repositories but required for private repos.

Step 1: Create a Personal Access Token (PAT)

On Codeberg

  1. Go to codeberg.org/user/settings/applications
  2. Under "Manage Access Tokens", click Generate New Token
  3. Enter a name (e.g., "VS Code Extension")
  4. Select permissions:
    • read:repository - Browse repository files and pull requests (required)
    • read:issues - Browse issues (required)
    • write:repository - Merge PRs, close Issues (optional)
  5. Click Generate Token
  6. Copy the token immediately - you won't see it again!

On Self-Hosted Forgejo

  1. Go to https://your-forgejo-instance.com/user/settings/applications
  2. Follow the same steps as Codeberg above

Step 2: Add the Token to VS Code

Option A: Using Command Palette (Recommended)

  1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Type "Forgejo: Add Instance"
  3. Enter your instance URL (e.g., https://codeberg.org)
  4. Enter a friendly name (e.g., "Codeberg")
  5. Paste your token when prompted
  6. Click Test Connection to verify

Option B: Using Settings UI

  1. Open Settings: Ctrl+, (Windows/Linux) or Cmd+, (Mac)
  2. Search for "forgejo"
  3. Click Edit in settings.json under "Forgejo: Instances"
  4. Add your instance configuration

Multiple Instances

You can connect to multiple Forgejo servers:

  1. Run "Forgejo: Manage Instances" from Command Palette
  2. Add additional instances with their own tokens
  3. The extension will match repositories to the correct instance automatically

Usage

Viewing Pull Requests

  1. Click the Forgejo icon in the Activity Bar
  2. Expand the Pull Requests section
  3. Click a PR to see its files
  4. Click a file to view the diff

PR Actions

Right-click on a PR for options:

  • View PR Details - See full description and comments
  • Open PR in Browser - Open on Forgejo website
  • Merge PR - Merge with options (merge commit, squash, rebase)
  • Close PR - Close without merging

Viewing Issues

  1. Expand the Issues section in the Forgejo view
  2. Click an issue to see full details, comments, and timeline
  3. Right-click to open in browser
  4. Use the + button in the Issues title bar to create a new issue

Monitoring Actions / CI

  1. Expand the Actions section in the Forgejo view
  2. See workflow runs with their status (success, failure, running)
  3. Expand a run to see individual jobs and steps
  4. Click a step to view its logs in the editor
  5. Right-click a run or job to re-run the workflow

Commands

Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "Forgejo":

Command Description
Forgejo: Add Instance Add a new Forgejo server
Forgejo: Manage Instances View and edit configured servers
Forgejo: Create Pull Request Create a new PR from the current branch
Forgejo: Create Issue Create a new issue
Forgejo: Refresh Pull Requests Reload PR list
Forgejo: Refresh Issues Reload Issue list
Forgejo: Refresh Actions Reload Actions list
Forgejo: Select Git Remote Choose which git remote to use
Forgejo: Show Diagnostics Debug connection issues
Forgejo: Show Output Channel View extension logs

Configuration

Setting Default Description
forgejo.autoDetectFromRemote true Auto-detect instance from git remote
forgejo.preferredRemote "" Preferred git remote name (default: auto-detect, falls back to origin)
forgejo.debug false Enable debug logging
forgejo.showFileStatusNotifications true Show notifications for added/deleted files

Troubleshooting

"No Forgejo configuration found"

  • Make sure you're in a workspace with a git repository
  • Check that you have a git remote configured (git remote -v)
  • Try running "Forgejo: Add Instance" to manually configure

PRs or Issues not loading

  1. Run "Forgejo: Show Diagnostics" to check connection status
  2. Verify your token is valid and has correct permissions
  3. Check the Output channel: "Forgejo: Show Output Channel"

Authentication errors

  1. Regenerate your token on the Forgejo website
  2. Run "Forgejo: Manage Instances" to update the token
  3. Make sure the token has read:repository and read:issues scopes

Git remote not detected

The extension looks for the origin remote by default (configurable via forgejo.preferredRemote). Supported URL formats:

  • HTTPS: https://codeberg.org/owner/repo.git
  • SSH: git@codeberg.org:owner/repo.git
  • SSH protocol: ssh://git@codeberg.org/owner/repo.git

Feedback & Issues

Found a bug or have a feature request? Please open an issue on the Codeberg repository.

Acknowledgments