First, refactor the code into its own function, so it can be easily unit tested, and add tests for existing functionality:
the git@github.com:hugovk/cpython.git form looks good for an SSH remote
but is github.com/hugovk/cpython.git (without https://) okay for HTTPS?
Second, fix the error I get below:
✅ Create tag
✅ Push new tags and branches to private fork
💥 Start the builds for source and docs artifacts
Traceback (most recent call last):
File "/Users/hugo/github/release-tools/run_release.py", line 1235, in <module>
main()
File "/Users/hugo/github/release-tools/run_release.py", line 1231, in main
automata.run()
File "/Users/hugo/github/release-tools/run_release.py", line 254, in run
raise e from None
File "/Users/hugo/github/release-tools/run_release.py", line 251, in run
self.current_task(self.db)
File "/Users/hugo/github/release-tools/run_release.py", line 189, in __call__
return getattr(self, "function")(db)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hugo/github/release-tools/run_release.py", line 769, in start_build_of_source_and_docs
raise ReleaseException(
ReleaseException: Could not parse GitHub owner from 'origin' remote URL: https://github.com/hugovk/cpython.git
My clone has an origin like https://github.com/hugovk/cpython.git, which is what I get with GitHub HTTPS or GitHub CLI clones.
First, refactor the code into its own function, so it can be easily unit tested, and add tests for existing functionality:
git@github.com:hugovk/cpython.git
form looks good for an SSH remotegithub.com/hugovk/cpython.git
(withouthttps://
) okay for HTTPS?Second, fix the error I get below:
My clone has an origin like
https://github.com/hugovk/cpython.git
, which is what I get with GitHub HTTPS or GitHub CLI clones.So allow an
https://
prefix for HTTPS remotes.