Skip to content

Commit

Permalink
[misc] Fixed format server file coverage (taichi-dev#669)
Browse files Browse the repository at this point in the history
* [skip ci] fixed format server file coverage

* [skip ci] update

* [skip ci] enforce code format

Co-authored-by: Taichi Gardener <[email protected]>
  • Loading branch information
2 people authored and archibate committed Mar 31, 2020
1 parent e06d8c8 commit 9c2f44a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/format_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ def do_GET(self):
num_commits = int(ret["commits"])
self.writeln(f"#commits id {num_commits}")

commits = self.exec(
f'git log -n {num_commits + 1} --format="%H"').split('\n')
fork_commit = commits[num_commits - 1]
user_id = ret['user']['login']
branch_name = head['ref']
ssh_url = head['repo']['ssh_url']
Expand All @@ -87,6 +84,9 @@ def do_GET(self):
self.exec(f'git branch -d {user_id}-{branch_name}')
self.exec(
f'git checkout -b {user_id}-{branch_name} {user_id}/{branch_name}')
commits = self.exec(
f'git log -n {num_commits + 1} --format="%H"').split('\n')
fork_commit = commits[num_commits]
self.exec(f'ti format {fork_commit}')
self.exec('git add --all')
self.exec(f'git commit -m "[skip ci] enforce code format"')
Expand Down

0 comments on commit 9c2f44a

Please sign in to comment.