This is a Visual Studio Code extension that adds two commands:
Open PR Files
fetches the list of files in a given GitHub Pull Request (PR) and opens all of them in new editor tabs.Open String Location
opens the file of the permalink or file path in the clipboard
- Download or clone this repository.
- Open it in Visual Studio Code.
- Press
F5
or run theDebug: Start Debugging
command to launch a new VS Code window with the extension loaded.
- Press
F1
to open the command palette. - Type and select
OpenPR: all files in PR
. - Accept or change the URL of the PR when prompted.
The extension will then fetch the list of files in the PR from the GitHub API and open each file in a new editor tab.
- Press
F1
to open the command palette. - Type and select
OpenPR: permalink-like string
. - Accept or change the URL of the permalink when prompted.
The extension will then open the file and position the cursor.
You need to provide your GitHub token as an environment variable named GITHUB_TOKEN
. This token is required to make requests to the GitHub API.
This extension assumes that the PR URL is in the form of https://github.com/user/repo/pull/number
.
Contributions to the VSCode PR Files Opener Extension are welcomed! Feel free to report any issues or submit pull requests.
VSCode PR Files Opener Extension is open-sourced software licensed under the MIT license.