Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
317 stars 67 forks source link

Runtime Error : Event Loop Is Closed #79

Closed AyushSehrawat closed 1 year ago

AyushSehrawat commented 2 years ago

Describe the bug Whenever i run revup upload or revup upload --no-self-authored-only i get an RuntimeError. Though the code gets uploaded to github as a pr, the error seems to be just a warning

Expected behavior No such warning to occur

To Reproduce 1.) Windows 11 ( Beta Insiders ) 2.) Used the following code

git add .
git commit -m "Hello world" -m "Topic: hello"
revup upload --no-self-authored-only

Note : The Repo i am adding PR to is not mine, i am one of the contributors.

Logs Terminal output from the command. If possible, rerun the command with revup -v to get more verbose logs.

(env) D:\Projects\musique>revup upload --no-self-authored-only
Branch main not found, falling back to "master". We recommend you set this in .revupconfig
W: Couldn't find an existing label named master

Topic: authy → origin/master
    self.close()
  File "c:\users\hp\.pyenv\pyenv-win\versions\3.8.10\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "c:\users\hp\.pyenv\pyenv-win\versions\3.8.10\lib\asyncio\base_events.py", line 719, in call_soon
    self._check_closed()
  File "c:\users\hp\.pyenv\pyenv-win\versions\3.8.10\lib\asyncio\base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
AyushSehrawat commented 2 years ago

Also, just a small question.. Is there any way to set default topic so that i don't have to add -m "Topic: hi" everytime i commit ?

jerry-skydio commented 2 years ago

Thanks I'll look when I get the chance but so far haven't reproduced the issue on windows 10. maybe something specific to windows 11?

As for the second question, you can prepopulate any commit message template using .gitmessage https://gist.github.com/lisawolderiksen/a7b99d94c92c6671181611be1641c733. You can set this up with a default topic or any other fields that you find useful.

Separately we're looking at adding convenience features for that in https://github.com/Skydio/revup/issues/63

AyushSehrawat commented 2 years ago

Thanks I'll look when I get the chance but so far haven't reproduced the issue on windows 10. maybe something specific to windows 11?

As for the second question, you can prepopulate any commit message template using .gitmessage https://gist.github.com/lisawolderiksen/a7b99d94c92c6671181611be1641c733. You can set this up with a default topic or any other fields that you find useful.

Separately we're looking at adding convenience features for that in #63

Thanks for the response! I will try to see if the issue is with win 11 or something on my side...

Also getting that feature would be awesome :).