gitcode-pull-request
GitCode pull request and issue integration for Visual Studio Code.
This extension adds a GitCode activity bar for reviewing pull requests,
triaging issues, and sending repository context into Copilot chat without
leaving VS Code.
Features
- Sign in to GitCode with a Personal Access Token.
- Detect GitCode repositories from workspace remotes, with optional
owner/repo override support.
- Browse repository pull requests and issues from a dedicated activity bar.
- Open pull request and issue overview webviews with comments, timelines, and
related content.
- Inspect pull request files in tree or flat mode, open virtual read-only file
content, and review patch content inside VS Code.
- Create and edit pull requests, including draft state, close or reopen state,
merge preferences, and related issue links.
- Prefill pull request bodies from
.gitcode/PULL_REQUEST_TEMPLATE.md or
.gitcode/PULL_REQUEST_TEMPLATE/*.md templates.
- Manage pull request participants, including reviewers, testers, and
approvers, with permission-aware UI gating.
- Create issues, create issue branches, and settle selected issues with Copilot
Agent mode.
- Add, edit, delete, reply to, resolve, and unresolve pull request comments.
- Add, edit, and delete issue comments.
- Send the selected pull request or issue into GitCode Copilot context for
review, explanation, planning, and agent-assisted implementation.
Requirements
- VS Code
^1.120.0.
- A GitCode account.
- A GitCode Personal Access Token.
- A workspace with a GitCode remote, or the
gitcode.repository setting configured as owner/repo.
Supported remote examples:
git@gitcode.com:owner/repo.git
https://gitcode.com/owner/repo.git
Getting Started
- Install and open the extension in VS Code.
- Open a workspace that contains a GitCode git remote.
- Run
GitCode: Sign In.
- Paste a GitCode Personal Access Token.
- Open the
GitCode Pull Requests activity bar view.
If the workspace remote is not hosted on gitcode.com, set:
{
"gitcode.repository": "owner/repo"
}
Views
The extension contributes one activity bar container with these views:
Pull Requests - repository-scoped pull request tree.
Create Pull Request - webview for creating pull requests.
Issues - repository-scoped issue tree.
Pull request tree categories:
Issue tree categories:
My Issues
Created Issues
Recent Issues
Overview pages support:
- Pull request comments, diff comment navigation, related issues, and operation
logs.
- Issue comments, related pull requests, and operation logs.
- Permission-aware action buttons so unsupported edits stay visible but clearly
disabled.
- Per-comment edit and delete actions gated by current-user ownership and
repository permissions.
Commands
Common commands:
GitCode: Sign In
GitCode: Refresh Pull Requests
GitCode: Open Pull Request
GitCode: Open Pull Request On Web
GitCode: Create Pull Request
GitCode: Edit Pull Request
GitCode: Refresh Issues
GitCode: Create Issue
GitCode: Open Issue
GitCode: Open Issue On Web
GitCode: Copy Issue URL
GitCode: Create Branch for Issue
GitCode: Settle Issue with Agent
GitCode: Use Pull Request as Copilot Context
GitCode: Use Issue as Copilot Context
Contextual commands are also available from tree items and pull request comment
threads, including file open actions, issue URL copy, diff comment submit, and
resolve, unresolve, edit, or delete actions.
Copilot Integration
The extension contributes a @gitcode chat participant and GitCode language
model tools for authenticated repository context. Agent mode can search issues
and pull requests, read selected issue or pull request context, inspect changed
pull request files and bounded patches, and read pull request comments.
Use GitCode: Use Pull Request as Copilot Context, GitCode: Use Issue as Copilot Context, or GitCode: Settle Issue with Agent from the GitCode views
to provide explicit context.
Pull Request Templates
Create pull requests can use templates from:
.gitcode/PULL_REQUEST_TEMPLATE.md
.gitcode/PULL_REQUEST_TEMPLATE/*.md
Supported placeholders are:
{{issue_number}}
{{issue_title}}
{{issue_url}}
{{source_branch}}
{{target_branch}}
{{repository}}
Extension Settings
{
"gitcode.baseUrl": "https://api.gitcode.com",
"gitcode.webUrl": "https://gitcode.com",
"gitcode.repository": "",
"gitcode.pullRequests.pageSize": 100,
"gitcode.pullRequests.fileListLayout": "tree",
"gitcode.issues.pageSize": 100,
"gitcode.trace.server": "off"
}
Settings:
gitcode.baseUrl - base URL for GitCode API requests.
gitcode.webUrl - base URL for GitCode web links.
gitcode.repository - optional owner/repo override for repository detection.
gitcode.pullRequests.pageSize - maximum pull requests loaded per category.
gitcode.pullRequests.fileListLayout - tree or flat.
gitcode.issues.pageSize - maximum issues loaded per category.
gitcode.trace.server - set to verbose to log outgoing GitCode API requests.
Permissions
The extension evaluates repository roles and ownership before enabling write
flows. In practice this means create, edit, merge, reviewer, tester, approver,
and branch actions stay aligned with the current repository permissions instead
of failing only after submission.
Development
Install dependencies:
npm ci
Compile:
npm run compile
Watch:
npm run watch
Package:
npm run package
Run tests:
npm test
npm test runs compile, bundle, lint, and the VS Code test runner through the pretest script.
Architecture
The extension is split into four main areas:
src/authentication - PAT auth, session storage, and auth state.
src/common - configuration, constants, errors, logging, git helpers, and domain models.
src/gitcode - REST client, services, repository resolver, and DTO mappers.
src/view - tree views, webviews, commands, stores, diff/comment controllers, create flows, and Copilot context.
See:
License
This project is licensed under the MIT License.
It is designed with reference to Microsoft's vscode-pull-request-github, which
is also MIT licensed. See THIRD_PARTY_NOTICES.md for
upstream attribution guidance.
Known Issues
- Authentication currently uses Personal Access Tokens only.
- Repository detection expects a GitCode remote unless
gitcode.repository is configured.