payload: {"action":"created","issue":{"url":"https://api.github.com/repos/stoplightio/studio/issues/277","repository_url":"https://api.github.com/repos/stoplightio/studio","labels_url":"https://api.github.com/repos/stoplightio/studio/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/stoplightio/studio/issues/277/comments","events_url":"https://api.github.com/repos/stoplightio/studio/issues/277/events","html_url":"https://github.com/stoplightio/studio/issues/277","id":539982234,"node_id":"MDU6SXNzdWU1Mzk5ODIyMzQ=","number":277,"title":"Switching git branches after commit fail discards changes without warning","user":{"login":"marbemac","id":847542,"node_id":"MDQ6VXNlcjg0NzU0Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/847542?v=4","gravatar_id":"","url":"https://api.github.com/users/marbemac","html_url":"https://github.com/marbemac","followers_url":"https://api.github.com/users/marbemac/followers","following_url":"https://api.github.com/users/marbemac/following{/other_user}","gists_url":"https://api.github.com/users/marbemac/gists{/gist_id}","starred_url":"https://api.github.com/users/marbemac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marbemac/subscriptions","organizations_url":"https://api.github.com/users/marbemac/orgs","repos_url":"https://api.github.com/users/marbemac/repos","events_url":"https://api.github.com/users/marbemac/events{/privacy}","received_events_url":"https://api.github.com/users/marbemac/received_events","type":"User","site_admin":false},"labels":[{"id":1414018099,"node_id":"MDU6TGFiZWwxNDE0MDE4MDk5","url":"https://api.github.com/repos/stoplightio/studio/labels/bug","name":"bug","color":"d73a4a","default":true,"description":"Something isn't working"},{"id":1539083565,"node_id":"MDU6TGFiZWwxNTM5MDgzNTY1","url":"https://api.github.com/repos/stoplightio/studio/labels/customer%20reported","name":"customer reported","color":"5319e7","default":false,"description":"Created by the Stoplight Support team"},{"id":1486885475,"node_id":"MDU6TGFiZWwxNDg2ODg1NDc1","url":"https://api.github.com/repos/stoplightio/studio/labels/p:high","name":"p:high","color":"f2a7c8","default":false,"description":null}],"state":"open","locked":false,"assignee":{"login":"wmhilton","id":587740,"node_id":"MDQ6VXNlcjU4Nzc0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/587740?v=4","gravatar_id":"","url":"https://api.github.com/users/wmhilton","html_url":"https://github.com/wmhilton","followers_url":"https://api.github.com/users/wmhilton/followers","following_url":"https://api.github.com/users/wmhilton/following{/other_user}","gists_url":"https://api.github.com/users/wmhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wmhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmhilton/subscriptions","organizations_url":"https://api.github.com/users/wmhilton/orgs","repos_url":"https://api.github.com/users/wmhilton/repos","events_url":"https://api.github.com/users/wmhilton/events{/privacy}","received_events_url":"https://api.github.com/users/wmhilton/received_events","type":"User","site_admin":false},"assignees":[{"login":"wmhilton","id":587740,"node_id":"MDQ6VXNlcjU4Nzc0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/587740?v=4","gravatar_id":"","url":"https://api.github.com/users/wmhilton","html_url":"https://github.com/wmhilton","followers_url":"https://api.github.com/users/wmhilton/followers","following_url":"https://api.github.com/users/wmhilton/following{/other_user}","gists_url":"https://api.github.com/users/wmhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wmhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmhilton/subscriptions","organizations_url":"https://api.github.com/users/wmhilton/orgs","repos_url":"https://api.github.com/users/wmhilton/repos","events_url":"https://api.github.com/users/wmhilton/events{/privacy}","received_events_url":"https://api.github.com/users/wmhilton/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2019-12-18T23:29:39Z","updated_at":"2019-12-19T20:24:36Z","closed_at":null,"author_association":"MEMBER","body":"**Describe the bug**\r\n\r\nIf the commit process fails, then subsequently switching branches will discard changes without notifying the user.\r\n\r\n**To Reproduce**\r\n\r\n1. Open a git project in studio.\r\n2. Make a change, and commit the change. Make sure commit fails (for example, set branch protection in backing VCS so that cannot push to it).\r\n3. Switch branches, note changes are discarded without warning.\r\n\r\nSeems that isomorphic git does not throw that `CheckoutConflictError` error on checkout if previously had a commit fail? Not sure.\r\n\r\n**Expected behavior**\r\n\r\nShould show the discard changes warning:\r\n\r\n<img width=\"1117\" alt=\"Screen Shot 2019-12-18 at 5 25 49 PM\" src=\"https://user-images.githubusercontent.com/847542/71131975-da1a9e80-21bb-11ea-8e14-7bb56155e0cc.png\">\r\n\r\n\r\n**Screenshots**\r\n\r\n![Dec-18-2019 17-25-05](https://user-images.githubusercontent.com/847542/71131990-e69ef700-21bb-11ea-8cc4-2b399c6d9b1b.gif)"},"comment":{"url":"https://api.github.com/repos/stoplightio/studio/issues/comments/567649180","html_url":"https://github.com/stoplightio/studio/issues/277#issuecomment-567649180","issue_url":"https://api.github.com/repos/stoplightio/studio/issues/277","id":567649180,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NzY0OTE4MA==","user":{"login":"wmhilton","id":587740,"node_id":"MDQ6VXNlcjU4Nzc0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/587740?v=4","gravatar_id":"","url":"https://api.github.com/users/wmhilton","html_url":"https://github.com/wmhilton","followers_url":"https://api.github.com/users/wmhilton/followers","following_url":"https://api.github.com/users/wmhilton/following{/other_user}","gists_url":"https://api.github.com/users/wmhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wmhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmhilton/subscriptions","organizations_url":"https://api.github.com/users/wmhilton/orgs","repos_url":"https://api.github.com/users/wmhilton/repos","events_url":"https://api.github.com/users/wmhilton/events{/privacy}","received_events_url":"https://api.github.com/users/wmhilton/received_events","type":"User","site_admin":false},"created_at":"2019-12-19T20:24:36Z","updated_at":"2019-12-19T20:24:36Z","author_association":"MEMBER","body":"Working theory: changes are still _staged_ after failed commitpush. Not 100% sure why that would fool the conflict detection though, but that's my theory as to the cause."}}
other: {"actor":{"display_login":"wmhilton"}}