Skip to content

Commit

Permalink
rebase bot - add ghstack config (pytorch#78561)
Browse files Browse the repository at this point in the history
  • Loading branch information
clee2000 authored and pytorchmergebot committed May 31, 2022
1 parent ceb93af commit a171ea6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/tryrebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def rebase_ghstack_onto(pr: GitHubPR, repo: GitRepo, dry_run: bool = False, stab

repo.fetch(orig_ref, orig_ref)
repo._run_git("rebase", onto_branch, orig_ref)

os.environ["OAUTH_TOKEN"] = os.environ["GITHUB_TOKEN"]
with open('.ghstackrc', 'w+') as f:
f.write('[ghstack]\n' +
"github_url=github.com\n" +
"github_username=pytorchmergebot\n" +
"remote_name=origin")

if dry_run:
print("Don't know how to dry-run ghstack")
else:
Expand Down

0 comments on commit a171ea6

Please sign in to comment.