@@ -24,7 +24,7 @@ def repo_list(self, project_key):
2424 :param project_key: The Project Key ID you need to list
2525 return:
2626 """
27- url = '/ rest/api/1.0/projects/{projectKey}/repos?limit=1000' .format (
27+ url = 'rest/api/1.0/projects/{projectKey}/repos?limit=1000' .format (
2828 projectKey = project_key )
2929 return self .get (url )
3030
@@ -35,7 +35,7 @@ def project(self, key):
3535 :return:
3636 """
3737 url = 'rest/api/1.0/projects/{0}' .format (key )
38- return ( self .get (url ) or {})
38+ return self .get (url ) or {}
3939
4040 def create_project (self , key , name , description = "" ):
4141 """
@@ -758,25 +758,25 @@ def get_pullrequest(self, project, repository, pull_request_id):
758758 pullRequestId = pull_request_id )
759759 return self .get (url )
760760
761- def change_reviewed_status (self , projectKey , repositorySlug , pullRequestId , status , userSlug ):
761+ def change_reviewed_status (self , project_key , repository_slug , pull_request_id , status , user_slug ):
762762 """
763763 Change the current user's status for a pull request.
764764 Implicitly adds the user as a participant if they are not already.
765765 If the current user is the author, this method will fail.
766- :param projectKey :
767- :param repositorySlug :
768- :param pullRequestId :
766+ :param project_key :
767+ :param repository_slug :
768+ :param pull_request_id :
769769 :param status:
770- :param userSlug :
770+ :param user_slug :
771771 :return:
772772 """
773- url = "/ rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}" .format (
774- projectKey = projectKey , repositorySlug = repositorySlug , pullRequestId = pullRequestId , userSlug = userSlug ,
773+ url = "rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}" .format (
774+ projectKey = project_key , repositorySlug = repository_slug , pullRequestId = pull_request_id , userSlug = user_slug ,
775775 )
776776 approved = True if status == "APPROVED" else False
777777 data = {
778778 "user" : {
779- "name" : userSlug
779+ "name" : user_slug
780780 },
781781 "approved" : approved ,
782782 "status" : status
@@ -1272,7 +1272,7 @@ def get_code_insights_report(self, projectKey, repositorySlug, commitId, report_
12721272 :commitId: str
12731273 :report_key: str
12741274 """
1275- url = "/ rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
1275+ url = "rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
12761276 projectKey = projectKey , repositorySlug = repositorySlug , commitId = commitId , key = report_key
12771277 )
12781278 return self .get (url )
@@ -1285,12 +1285,13 @@ def delete_code_insights_report(self, projectKey, repositorySlug, commitId, repo
12851285 :commitId: str
12861286 :report_key: str
12871287 """
1288- url = "/ rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
1288+ url = "rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
12891289 projectKey = projectKey , repositorySlug = repositorySlug , commitId = commitId , key = report_key
12901290 )
12911291 return self .delete (url )
12921292
1293- def create_code_insights_report (self , projectKey , repositorySlug , commitId , report_key , report_title , ** report_params ):
1293+ def create_code_insights_report (self , projectKey , repositorySlug , commitId , report_key , report_title ,
1294+ ** report_params ):
12941295 """
12951296 Create a new insight report, or replace the existing one if a report already exists for the given repository, commit, and report key.
12961297 A request to replace an existing report will be rejected if the authenticated user was not the creator of the specified report.
@@ -1302,7 +1303,7 @@ def create_code_insights_report(self, projectKey, repositorySlug, commitId, repo
13021303 :report_title: str
13031304 :report_params:
13041305 """
1305- url = "/ rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
1306+ url = "rest/insights/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}" .format (
13061307 projectKey = projectKey , repositorySlug = repositorySlug , commitId = commitId , key = report_key
13071308 )
13081309 data = {"title" : report_title }
0 commit comments