Skip to content

Merge pull request #1 from TestUpCommunity/integration_1 #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

namelaowang
Copy link

Merge pull request #750 from namelaowang/feature_namelaowang

@namelaowang namelaowang closed this May 9, 2020
@namelaowang namelaowang reopened this May 9, 2020
@namelaowang
Copy link
Author

gists - check-if-a-gist-is-starred #626
gists - unstar-a-gist #625
gists - star-a-gist #624
gists - delete-a-gist #629
gists/comments - create-a-comment #633
gists/comments - get-a-single-comment #632
gists/comments - list-comments-on-a-gist #631
gists - list-gist-forks #628
gists - fork-a-gist #627
gists - list-gist-commits #623
gists - create-a-gist #621
gists - get-a-specific-revision-of-a-gist #620
gists - list-all-public-gists #617
gists - list-a-users-gists #616
gists - get-a-single-gist #619
gists - list-starred-gists #618

完成igists下gists.py和comment.py

@namelaowang
Copy link
Author

namelaowang commented May 10, 2020

#434
#436
#444
#437
#438
#439
#440
#442
#443
#464
#465
#460
#463
#462
#461
#458
#445
#455
#457
#456
#453
#454
#450
#452
#451
#448
#449
#447
#446

api/orgs/ 下新增 outside_collaborators.py,hooks.py,blocking.py,orgs.py,members.py

@namelaowang
Copy link
Author

#431 完成需求#431

super(Interactions, self).__init__(api_root_url, **kwargs)
self.orgs = Orgs(self.api_root_url, **kwargs)
self.repos = Repos(self.api_root_url, **kwargs)
# def __init__(self, api_root_url, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把这个注释掉干嘛?



if __name__ == '__main__':
g = Github(username="namelaowang", password ="ghl6032069")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余的调试语句

:param repo: 要删除的repo关键字

"""
import re
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import语句放在了错误的位置。请放在文件最上面

payload = {'try': 'all'}
# 列出当前用户的所有repos
response = github.repos.list_user_repos(username=owner, json=payload)
if response.status_code == 200:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果不等于200,那么result.success应该为false

response = github.repos.list_user_repos(username=owner, json=payload)
if response.status_code == 200:

r = response.json()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果无法做json解析呢?你这样写就会报语法错误了。


for i in r:
# 从该账户的所有repos中,匹配出所有带有"repo"关键字的repos
restring = re.match('.*{}.*'.format(repo), i['name'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要用正则表达式。


"""
import re
delete_list = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要自己增加需求,并没有列表,就是删指定名字的repo


if restring == None:
continue
delete_list.append(restring.group())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有列表,不要自己加需求。


return result

return ['list the repos fail', 'https://developer.github.com/v3/repos/#list-user-repositories']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错误的返回值。


def create_repo_and_branch_with_helloword(github, owner, name, branch, description=None, homepage=None, private=False,
has_issues=True, has_projects=True, has_wiki=True):

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档呢?

# 上传文件
pass

return "创建分支失败"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错误的返回值。请返回commonItem

@zhangting85
Copy link
Contributor

错误太多,打回修改。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants