Similar to https://stackoverflow.com/a/24811490/2251785, but I can't find those urls from official doc. Here are the source code archive URLs from GitHub's documentation, using github/codeql as an example.
| Type of archive | Example | URL |
|---|---|---|
| Branch | main |
https://github.com/github/codeql/archive/refs/heads/main.zip |
| Tag | codeql-cli/v2.12.0 |
https://github.com/github/codeql/archive/refs/tags/codeql-cli/v2.12.0.zip |
| Commit | aef66c4 |
https://github.com/github/codeql/archive/aef66c462abe817e33aad91d97aa782a1e2ad2c7.zip |
You can install any zip file directly with this:
pip install https://github.com/github/codeql/archive/refs/heads/main.zip