knisterpeter / vscode-github Goto Github PK
View Code? Open in Web Editor NEW:octocat: GitHub Support for vscode
Home Page: https://marketplace.visualstudio.com/items?itemName=KnisterPeter.vscode-github
License: MIT License
:octocat: GitHub Support for vscode
Home Page: https://marketplace.visualstudio.com/items?itemName=KnisterPeter.vscode-github
License: MIT License
In case we are working on a fork, the PR are mainly open on the upstream repository not on the origin repository. It will be nice to be able to browse them too with the extension.
Currently it is not possible to use the git integration from this extension.
Its requested as feature request here: microsoft/vscode#15525
I am trying to checkout a pull request using the "GitHub: Checkout open pull request..." command.
When I run the command and select a PR, I get the following error message:
The git log is...
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master@{u}
git rev-list --left-right master...ev3dev/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git checkout -q patch-1
error: pathspec 'patch-1' did not match any file(s) known to git.
I suspect the problem is that I don't have a remote that corresponds to the PR author's repo. I would expect this extension to take care of adding the remote, for me.
When you create a PR from the github UI it also lets you add an initial comment, which typically is a more detailed PR description. At least in our workflow, submitting PRs without a description is not ok.
It would be great if we could somehow specify that description straight from VSCode so I wouldn't have to leave the editor at all to create a PR. I have no experience with VSCode extensions, so I'm not completely sure how that should work, though.
Do you think that would be a useful addition? And do you have ideas on how to actually implement this? If you think this is useful and have ideas on how to make it work, I would be happy to help out by submitting a PR, for instance.
When I try to set the access token I get the above error. The Developer Tools console has the following to say on this error:
shell.ts:474 Cannot read property 'slice' of null: TypeError: Cannot read property 'slice' of null
at /Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:50:39
at Generator.next (<anonymous>)
at fulfilled (/Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:4:58)
e.onUnexpectedError @ shell.ts:474
(anonymous) @ shell.ts:434
e.onUnexpectedError @ errors.ts:68
o @ errors.ts:88
(anonymous) @ winjs.base.js:43
(anonymous) @ winjs.base.js:38
winjs.base.js:45 WARNING: Promise with no error callback:92
winjs.base.js:46 Objecterror: Error: Cannot read property 'slice' of null
at /Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:50:39
at Generator.next (<anonymous>)
at fulfilled (/Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:4:58)message: "Cannot read property 'slice' of null"name: "TypeError"stack: "TypeError: Cannot read property 'slice' of null↵ at /Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:50:39↵ at Generator.next (<anonymous>)↵ at fulfilled (/Users/sebastian.wiesner/.vscode/extensions/KnisterPeter.vscode-github-0.15.1/out/src/git.js:4:58)"__proto__: Objectexception: nullhandler: undefinedid: 92parent: undefinedpromise: n.Class.derive._oncancel__proto__: Object
messageService.ts:125 Cannot read property 'slice' of null
e.doShow @ messageService.ts:125
e.show @ messageService.ts:104
e.resume @ messageService.ts:63
(anonymous) @ workbench.ts:856
e.invoke @ callbackList.ts:63
e.fire @ event.ts:123
(anonymous) @ quickOpenController.ts:513
I'm not sure how to debug this issue further, and would appreciate any hints :) If you need further information please tell me.
If a project settings contains information about PR merge methods the extension should respect this and does not allow a user to choose something invalid.
This is the relevant API part. The keys are named allow_rebase_merge
, allow_squash_merge
and allow_merge_commit
.
I noticed that the git@
part is mandatory for a remote to be recognised as Github remote.
Could you perhaps make it optional? I set the username in my SSH configuration. There's no other user name you could use with Github's SSH server, so it's convenient to have it set as default.
Follow up from #107
It would be nice to make it GitHub Enterprise compatible.
I guess ideally you need the ability to set a token for each hostname.
I am probably doing something stupid as I have not really done much in VSCode or in GitHub. But when I press Ctrl+Shift+P and select the command ">Github: set personal access token" I get the error message "command 'vscode-github.setGitHubToken' not found"
any assistance with this would be appreciated.
Thanks for a cool extension!
I tried to create a PR the fork setup and the PR got created in the fork and not in the base project. It would be nice to have it fixed :)
Currently if you hit "Create PR" on an unpublished branch...
...you get the following error message...
...which is not very clear and can be really confusing for none power users.
Here are 4 ways this could be improved, I think the first option is the best but it is also clearly the one that requires the most work:
I believe the Github API specifies the default branch for a repo. I think it could be nice to use that information instead of a configuration value.
If your PR has been reviewed on GitHub, it'd be great to see those comments in vscode. Even better would be a way to respond to them from inside vscode!
It would be great if there was an option to select to what branch you want to create the pull request to. Right now it default to the default branch master
but I want to make a pull request to the branch develop
Getting this error when running Create pull request from current branch in current repository (quick)
I made a change, pushed, published, everything I could do is done and I verified that I can see the change in the remote branch.
And If I try to run Create pull request...
I get this error
Any suggestions? Or any additional info I can provide to help with this issue?
Thanks
When you create a PR. It would be great if the PR name (ie: #271) in the notification bar was an active link to the GitHub PR.
While it's very convenient to be able to create the PR from Code, I usually like to review and rename it as well as apply some labels and milestones.
Would be great to be able to open the currently selected lines in github, just like https://github.com/tpope/vim-fugitive
's :Gbrowse
feature - would be even better if there was an additional option to just copy the URL to your clipboard!
As stated in #59 the hostname given by users could begin with protocol like http
or https
.
This should be considered during URL creation.
Can we have an ability that adds reviewer or assignees in Create pull request
command? If your answer is no, yo can add this as a feature request.
Use workspace.workspaceFolders
instead of workspace.rootPath
.
User autocomplete would be a lot better for assignee and reviewer management.
Hey,
I'm seeing the above error when trying to create a pull request. I've confirmed that the branch is on GitHub correctly and the plugin does seem to know that it's a GitHub based remote - if I use this plugin to browse Github it correctly takes me to the right place.
I've set up my token correctly + given it the repo access rights it needs, so I'm a bit stuck now. Any help would be much appreciated :)
https://github.com/KnisterPeter/vscode-github/blob/c99b103/src/extension.ts#L89
Shortest reproduction: "File"->"New Window"
When using code-insiders
I get this error:
output from GitHub channel is only:
Create pull request on branch ansible-init
First commit on branch 1098e0ac
The problem was that I had set (it errored previously about this missing setting) git core.editor
to "code -nw" which maybe didn't exist in the environment that the vscode-github was using (it's an alias in my shell to code-insiders).
Anyway once I set core.editor
to code-insiders
only I now get this:
Which is better.. but I don't really understand. Should this template have been filled out already by vscode-github?
Hi mate! I would really appreciate if this plugin let developers review the Pull Requests from vscode. This feature would be perfect for those Pull Requests that have many changes, so using colors it can make our life easier.
Thanks a lot.
I coulda sworn this was already available. It sorta comes out of the box with atom. Would it be possible to have a command to open the current file on the github website (hopefully taking into considering the file's branch / commit
Basically I'm dying to have the functionality of https://github.com/philschatz/atom-pull-requests
I don't know if you want to take on that scope here, but i'd pay money for whoever ships this plugin. :)
Cheers
This need to be defered until the required operations are available as Mutations in the github api.
Hi, my team is using the remote name github
as a convention instead of origin
.
As it seems the origin
name for the remote is currently hardcoded in the plugin.
I'm proposing that the used remote name can be set via a config option, so that other names than origin
are allowed.
The extension seems to not recognising GitHub remote with credentials inside like https://user:[email protected]/user/repo
Error at DevTools:
//Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:130 Not a github project?: Error: Not a github project?
at execa.then.result (/Users/tino/.vscode-insiders/extensions/KnisterPeter.vscode-github-0.7.0/out/src/git.js:17:23)
at process._tickCallback (internal/process/next_tick.js:103:7)e.onUnexpectedError @
Managing labels per current pull request would be a nice feature.
This originates from #69
When I set the Personal Access Token
, the error occur as follow:
Failed to update pull request status:
{
"url": "https://api.github.com/repos/imhuay/any_test",
"status": 401,
"statusText": "Unauthorized",
"headers": {
"_headers": {
"date": [
"Wed, 05 Jul 2017 13:30:28 GMT"
],
"content-type": [
"application/json; charset=utf-8"
],
"content-length": [
"83"
],
"connection": [
"close"
],
"server": [
"GitHub.com"
],
"status": [
"401 Unauthorized"
],
"x-github-media-type": [
"github.v3; param=polaris-preview"
],
"x-ratelimit-limit": [
"60"
],
"x-ratelimit-remaining": [
"49"
],
"x-ratelimit-reset": [
"1499264153"
],
"access-control-expose-headers": [
"ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"
],
"access-control-allow-origin": [
"*"
],
"content-security-policy": [
"default-src 'none'"
],
"strict-transport-security": [
"max-age=31536000; includeSubdomains; preload"
],
"x-content-type-options": [
"nosniff"
],
"x-frame-options": [
"deny"
],
"x-xss-protection": [
"1; mode=block"
],
"x-runtime-rack": [
"0.016332"
],
"x-github-request-id": [
"E4B6:1CC08:2443434:2FBC80E:595CE9F4"
]
}
},
"ok": false,
"body": {
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": null,
"pipesCount": 0,
"flowing": null,
"ended": false,
"endEmitted": false,
"reading": false,
"sync": false,
"needReadable": true,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"defaultEncoding": "utf8",
"ranOut": false,
"awaitDrain": 0,
"readingMore": false,
"decoder": null,
"encoding": null
},
"readable": true,
"domain": null,
"_events": {},
"_eventsCount": 7,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"needDrain": false,
"ending": false,
"ended": false,
"finished": false,
"decodeStrings": true,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": true,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"bufferedRequest": null,
"lastBufferedRequest": null,
"pendingcb": 0,
"prefinished": false,
"errorEmitted": false,
"bufferedRequestCount": 0,
"corkedRequestsFree": {
"next": null,
"entry": null
}
},
"writable": true,
"allowHalfOpen": true,
"_transformState": {
"needTransform": false,
"transforming": false,
"writecb": null,
"writechunk": null,
"writeencoding": null
}
},
"bodyUsed": false,
"size": 0,
"timeout": 0,
"_raw": [],
"_abort": false
}
Hello,
Installed VSCode 1.13.0 yesterday and installed your GitHub extension (0.16.2) today. I generated a personal access token, but when I execute the command to set it in VSCode, I get an error at the top saying:
command 'vscode-github.setGitHubToken' not found
What am I missing?
Running on MacOS Sierra 10.12.5
If I want to add a request reviewer to my pull request, I am repeating "Request a reviewer for the current pull request" for each. We should enter multiple.
Additional request:
Do you have any plans to integrate Github Issues support into this extension?
When creating a pull request with the "Create pull request in the current branch in current repository (quick)" command, or with the "Create pull request" command, I get this error:
Command failed: git log --reverse --right-only --format=%h origin/master..origin/rename-functions
The operation is aborted. No error message in the developer tools of vscode.
Note: I have set my token properly and the "Browse open pull requests" command works fine.
I'm trying to create a PR. I get the following issue after selecting the remote and target branch:
Command failed: git log --format=%b -n 1
fatal: ambiguous argument ''
This happens on version 0.17.1
I have error "cannot read property 'connect' of undefined" when registering my github token.
I am using latest VSCODE:
Version 1.12.2
Commit 19222cdc84ce72202478balcec5cb557b71163de
Date 2017-05-10T13:20:36.315Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
It would be nice to manage milestones for the current PR.
This originates from #69
This is the part of managing reviewers
Splitted out of #71
Hi, I'm getting "Command failed: git log -n 1 --format=%s " after fresh install of your package. I am using MAC. when doing the same command in terminal, it launches vim. Any idea ?
Looks like there's already support for creating and merging the PR for the current branch, but seems like there's no way to open the PR in a browser?
This would be a very useful feature - even better if it could simply switch to the browser tab (if the PR is already open there) and if one could click on or right click on the PR number in the bottom left in the VSCode window and be taken to the PR in the browser.
Excuse, I am first to use Git remotely
And The first step GitHub: Set Personal Access Token
just fails
Command failed: git config --local --get remote.origin.url
How can solve it, thanks
Always getting on create pull request getting
command 'vscode-github.createSimplePullRequest' not found
and then i
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.