Microsoft Visual Studio Code Pull Request Codeberg Extension

Integrates Codeberg Pull Requests and Issues into Visual Studio Code.
Installation
You can install the extension from the Visual Studio Code Marketplace.
Features
- Authentication: Securely authenticate with your Codeberg instance.
- Pull Request:
- Pull Request View: Browse open pull requests for your repository in the Explorer sidebar.
- Pull Request Details View: View pull request description, comments, and file changes in an in-editor webview.
- Easy Checkout: Quickly check out the branch associated with a pull request from its details view.
- Issues:
- Issue View: Browse open issues for your repository in the Explorer sidebar.
- Issue Details View: View issue description and comments in an in-editor webview.
- Create Issue from TODO: Create a Codeberg issue directly from a
// TODO: comment in your code.
- Start Working on Issue: Create a new branch from an issue, with a suggested branch name based on the issue title.
- Add Comments: Add comments to pull requests and issues directly from their respective webviews.
- View Refresh: Manually refresh the pull requests or issues view using a dedicated button.
- Terminal Integration: Optionally view git operations in an integrated terminal for transparency and debugging. All git commands can be displayed in a dedicated terminal instance, making it easy to understand what the extension is doing behind the scenes.
Configuration
The extension can be customized through VS Code settings. Access these via File > Preferences > Settings (or Code > Settings on macOS), then search for "Codeberg".
Terminal Integration Settings
codeberg.showGitCommandsInTerminal (default: false)
- When enabled, all git operations are displayed in an integrated terminal, providing full transparency into what the extension is doing.
- Useful for debugging, learning git commands, or verifying operations before they execute.
codeberg.terminalName (default: "Codeberg")
- Customize the name of the terminal instance used for git operations.
- Helpful if you want to distinguish the extension's terminal from your other terminals.
codeberg.reuseTerminal (default: true)
- When enabled, the extension reuses the same terminal instance for all git operations.
- When disabled, a new terminal is created for each operation.
Example: Enabling Terminal Mode
To see all git commands the extension runs:
- Open VS Code Settings (Ctrl+, or Cmd+,)
- Search for "codeberg"
- Enable "Show Git Commands In Terminal"
Now when you check out a pull request branch or start working on an issue, you'll see commands like:
git fetch origin pull/123/head:pr-123
git checkout pr-123
This is particularly useful for understanding the extension's behavior or troubleshooting git-related issues.
How to Run (Development)
Clone the repository:
git clone https://codeberg.org/medenor/vscode-pull-request-codeberg.git
cd vscode-pull-request-codeberg
Install dependencies:
npm install
Compile the extension:
npm run compile
Open the project in VS Code.
Start the Extension Development Host:
- Go to the "Run and Debug" view (Ctrl+Shift+D or Cmd+Shift+D).
- Select "Run Extension" from the dropdown menu at the top.
- Click the green play button.
Open a folder: In the new Extension Development Host window, open a folder that is a Git repository with a remote pointing to a Codeberg repository.
Create an OAuth Application on Codeberg:
- Go to your Codeberg instance settings -> Applications.
- Create a new OAuth2 application with the following details:
- Application Name:
VS Code Codeberg Pull Request
- Redirect URI:
http://localhost:50000/callback
- Note down the Client ID and Client Secret.
Update src/auth.ts with your Client ID and Client Secret. (This step will be automated in the future).
Sign in to Codeberg:
- In the Extension Development Host window, open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
- Type "Sign in to Codeberg" and select the command.
- Follow the browser prompts to authorize the application.
View Pull Requests and Issues:
- In the Extension Development Host window, open the Command Palette.
- Type "Focus on Codeberg Pull Requests View" and select the command to make the PRs view visible.
- Type "Focus on Codeberg Issues View" and select the command to make the Issues view visible.
Support
Reach out to the maintainer at one of the following places:
Project assistance
If you want to say thank you or/and support active development of vscode-pull-request-codeberg:
- Add a Star to the project.
- Write interesting articles about the project on Dev.to, Medium or your personal blog.
Together, we can make vscode-pull-request-codeberg better!
Contributing
First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.
Please read our contribution guidelines, and thank you for being involved!
Authors & contributors
The original setup of this repository is by Medenor.
For a full list of all authors and contributors, see the contributors page.
Security
The vscode-pull-request-codeberg extension follows good practices of security, but 100% security cannot be assured.
The vscode-pull-request-codeberg extension is provided "as is" without any warranty. Use at your own risk.
License
This project is licensed under the GNU AGPLv3 license.
See LICENSE for more information.
Acknowledgements
This project is not affiliated to Codeberg e.V.