MCPcopy Create free account
hub / github.com/pytorch/pytorch / get_ghstack_token

Function get_ghstack_token

scripts/release_notes/common.py:189–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187
188
189def get_ghstack_token():
190 pattern = "github_oauth = (.*)"
191 with open(Path("~/.ghstackrc").expanduser(), "r+") as f:
192 config = f.read()
193 matches = re.findall(pattern, config)
194 if len(matches) == 0:
195 raise RuntimeError("Can't find a github oauth token")
196 return matches[0]
197
198
199def get_token():

Callers 1

get_tokenFunction · 0.85

Calls 2

PathClass · 0.85
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…