本文整理匯總了Python中rbtools.api.client.RBClient.get_review_request方法的典型用法代碼示例。如果您正苦於以下問題:Python RBClient.get_review_request方法的具體用法?Python RBClient.get_review_request怎麽用?Python RBClient.get_review_request使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rbtools.api.client.RBClient
的用法示例。
在下文中一共展示了RBClient.get_review_request方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: RBClient
# 需要導入模塊: from rbtools.api.client import RBClient [as 別名]
# 或者: from rbtools.api.client.RBClient import get_review_request [as 別名]
#!/usr/bin/python
import sys
import re
import rbtools
from rbtools.api.client import RBClient
if __name__ == '__main__':
review_id = sys.argv[1]
root = RBClient('http://rb.hotel.com').get_root()
r1 = root.get_review_request(review_request_id=review_id)
summary = r1['summary']
bugs_closed_str = ",".join(list(r1['bugs_closed']))
bugs_closed_str = "[%s]"%(bugs_closed_str)
#summary=re.sub( bugs_closed_str, '', summary)
summary=summary.replace( bugs_closed_str, '')
diffs = r1.get_diffs()
changed_files = diffs[-1].get_files()
changed_files_str = ""
for file in changed_files:
file_name = file['source_file']
#'/branches/sh-i53-bugs/front_end/modules/bulk/bulk_en.properties'
#assumption is the file pattern is like this
nth = [ m.start() for m in re.finditer(r"/",file_name)]
file_name_pat = file_name[nth[2]+1:]
changed_files_str += file_name_pat + " "