Skip to content

Commit

Permalink
feat: update main script
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Dec 1, 2020
1 parent 439e83d commit 3f280c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class Action:

timeout = 5

def __init__(self, username, password, repo,
branch='master', directory='', https='true'):
def __init__(self, username: str, password: str,
repo: str, branch: str = 'master',
directory: str = '', https: str = 'true'):
self.session = requests.session()
self.username = username
self.password = password
Expand Down Expand Up @@ -114,6 +115,8 @@ def login(self):
f'resp: {resp.text}')

def rebuild_pages(self):
if '/' not in self.repo:
self.repo = f'{self.username}/{self.repo}'
pages_url = f'https://gitee.com/{self.repo}/pages'
rebuild_url = f'{pages_url}/rebuild'

Expand Down

0 comments on commit 3f280c3

Please sign in to comment.