Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11723190
github.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
630 B
Referenced Files
None
Subscribers
None
github.py
View Options
# -------------------------------------------------------------
# Resolve hash :: VCS :: GitHub
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Search hash on GitHub
# License: BSD-2-Clause
# -------------------------------------------------------------
import
requests
def
query_github_instance
(
instance
,
commit_hash
):
url
=
f
"{instance}/search/commits?q=hash:{commit_hash}"
r
=
requests
.
get
(
url
)
if
r
.
status_code
!=
200
:
return
None
commits
=
r
.
json
()[
"items"
]
if
commits
:
return
commits
[
0
][
"html_url"
]
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Thu, Sep 18, 08:45 (16 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2989144
Default Alt Text
github.py (630 B)
Attached To
Mode
rRESOLVEHASH Resolve hash
Attached
Detach File
Event Timeline
Log In to Comment