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

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
- Open a folder containing a Forgejo, Codeberg, or Gitea git repository
- Click the Forgejo icon in the Activity Bar (sidebar)
- Done! Your PRs and Issues appear automatically
For private repositories, add a Personal Access Token.
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
- 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
- Go to codeberg.org/user/settings/applications
- Under "Manage Access Tokens", click Generate New Token
- Enter a name (e.g., "VS Code Extension")
- Select permissions:
read:repository - View PRs and Issues (minimum required)
write:repository - Merge PRs, close Issues (optional)
- Click Generate Token
- Copy the token immediately - you won't see it again!
On Self-Hosted Forgejo
- Go to
https://your-forgejo-instance.com/user/settings/applications
- Follow the same steps as Codeberg above
Step 2: Add the Token to VS Code
Option A: Using Command Palette (Recommended)
- Press
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
- Type "Forgejo: Add Instance"
- Enter your instance URL (e.g.,
https://codeberg.org)
- Enter a friendly name (e.g., "Codeberg")
- Paste your token when prompted
- Click Test Connection to verify
Option B: Using Settings UI
- Open Settings:
Ctrl+, (Windows/Linux) or Cmd+, (Mac)
- Search for "forgejo"
- Click Edit in settings.json under "Forgejo: Instances"
- Add your instance configuration
Multiple Instances
You can connect to multiple Forgejo servers:
- Run "Forgejo: Manage Instances" from Command Palette
- Add additional instances with their own tokens
- The extension will match repositories to the correct instance automatically
Usage
Viewing Pull Requests
- Click the Forgejo icon in the Activity Bar
- Expand the Pull Requests section
- Click a PR to see its files
- 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
- Expand the Issues section in the Forgejo view
- Click an issue to see full details, comments, and timeline
- Right-click to open in browser
- Use the + button in the Issues title bar to create a new issue
Monitoring Actions / CI
- Expand the Actions section in the Forgejo view
- See workflow runs with their status (success, failure, running)
- Expand a run to see individual jobs and steps
- Click a step to view its logs in the editor
- 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
- Run "Forgejo: Show Diagnostics" to check connection status
- Verify your token is valid and has correct permissions
- Check the Output channel: "Forgejo: Show Output Channel"
Authentication errors
- Regenerate your token on the Forgejo website
- Run "Forgejo: Manage Instances" to update the token
- Make sure the token has
read:repository scope
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