mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[pytorch][require export] Create smartplatform configuration for trymerge (#75542)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/75542 Reviewed By: malfet Differential Revision: D35513051 fbshipit-source-id: adf59359fcf2410fa8a61746533c896ec22d5ed3 (cherry picked from commit ab65394c6f88f17bdc317dbcfb931cc16e527eef)
This commit is contained in:
committed by
PyTorch MergeBot
parent
8a053e387e
commit
6cdc6dd8e5
11
.github/scripts/gitutils.py
vendored
11
.github/scripts/gitutils.py
vendored
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
from collections import defaultdict
|
||||
from datetime import datetime
|
||||
from typing import cast, Any, Dict, Iterator, List, Optional, Tuple, Union
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
RE_GITHUB_URL_MATCH = re.compile("^https://.*@?github.com/(.+)/(.+)$")
|
||||
@ -260,6 +261,12 @@ class GitRepo:
|
||||
self._run_git("commit", "--amend", "-m", msg)
|
||||
|
||||
|
||||
def clone_repo(username: str, password: str, org: str, project: str) -> GitRepo:
|
||||
path = tempfile.mkdtemp()
|
||||
_check_output(['git', 'clone', f'https://{username}:{password}@github.com/{org}/{project}', path]).strip()
|
||||
return GitRepo(path=path)
|
||||
|
||||
|
||||
class PeekableIterator(Iterator[str]):
|
||||
def __init__(self, val: str) -> None:
|
||||
self._val = val
|
||||
|
Reference in New Issue
Block a user