{"action":"created","issue":{"url":"https://api.github.com/repos/jesseduffield/lazygit/issues/304","repository_url":"https://api.github.com/repos/jesseduffield/lazygit","labels_url":"https://api.github.com/repos/jesseduffield/lazygit/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/jesseduffield/lazygit/issues/304/comments","events_url":"https://api.github.com/repos/jesseduffield/lazygit/issues/304/events","html_url":"https://github.com/jesseduffield/lazygit/issues/304","id":369485805,"node_id":"MDU6SXNzdWUzNjk0ODU4MDU=","number":304,"title":"Creating pull request from branches panel","user":{"login":"kristijanhusak","id":1782860,"node_id":"MDQ6VXNlcjE3ODI4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1782860?v=4","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-12T10:07:27Z","updated_at":"2018-10-23T18:33:58Z","closed_at":"2018-10-23T18:33:58Z","author_association":"CONTRIBUTOR","body":"I would like to be able to create pull request from branches panel, by opening link in browser that directly points to the new pull request.\r\n\r\nIn bitbucket, after you push to a branch, it prints this link in stdout, and opening it you go directly to the new PR page, with the branch preselected as source branch. Something like this: \r\n```sh\r\nremote:\r\nremote: Create pull request for feature/some-branch:\r\nremote:   https://bitbucket.org/kris/my-repo/pull-requests/new?source=feature/some-branch&t=1\r\n```\r\nI think github does similar thing, but not always.\r\n\r\nWhen we push the branch from lazygit, we don't get to see any output, so we cannot really use the solution above.\r\n\r\nHere's how it would work:\r\n* Select a branch in branches panel\r\n* Press `o`, or any other keybinding that suits this.\r\n* Your default browser opens with the link above\r\n\r\nImplementation:\r\n* Get the selected branch\r\n* Get the repo remote url\r\n* detect service (Github, bitbucket, etc.)\r\n* generate proper url for service by the service base url and repo remote url.\r\n* Open it with `xdg-open` on linux, `open` on mac, and `start` in windows i think.\r\n\r\n\r\nIf you consider this, i'll create implementation that will work with bitbucket and github. I'm not using any other services, but i'll make it easily extendable."},"comment":{"url":"https://api.github.com/repos/jesseduffield/lazygit/issues/comments/432367654","html_url":"https://github.com/jesseduffield/lazygit/issues/304#issuecomment-432367654","issue_url":"https://api.github.com/repos/jesseduffield/lazygit/issues/304","id":432367654,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjM2NzY1NA==","user":{"login":"kristijanhusak","id":1782860,"node_id":"MDQ6VXNlcjE3ODI4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1782860?v=4","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T18:33:58Z","updated_at":"2018-10-23T18:33:58Z","author_association":"CONTRIBUTOR","body":"I'm closing this since it's implemented. "}}
{"actor":{"display_login":"kristijanhusak"}}