mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
stubsabot: checkout the branch you were on after script completion (#8742)
This commit is contained in:
@@ -483,6 +483,10 @@ async def main() -> None:
|
||||
|
||||
denylist = {"gdb"} # gdb is not a pypi distribution
|
||||
|
||||
original_branch = subprocess.run(
|
||||
["git", "branch", "--show-current"], text=True, capture_output=True, check=True
|
||||
).stdout.strip()
|
||||
|
||||
if args.action_level >= ActionLevel.fork:
|
||||
subprocess.check_call(["git", "fetch", "--prune", "--all"])
|
||||
|
||||
@@ -523,7 +527,7 @@ async def main() -> None:
|
||||
# if you need to cleanup, try:
|
||||
# git branch -D $(git branch --list 'stubsabot/*')
|
||||
if args.action_level >= ActionLevel.local:
|
||||
subprocess.check_call(["git", "checkout", "master"])
|
||||
subprocess.check_call(["git", "checkout", original_branch])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user