(self, base_url, org_sid, team_name, options)
| 137 | self.update_scheme_settings(base_url, org_sid, team_name, repo_id, scheme_id) |
| 138 | |
| 139 | def create_project_preproccess(self, base_url, org_sid, team_name, options): |
| 140 | if options['repo_id'] is None: |
| 141 | logger.error("repo_id 不能为空!") |
| 142 | return |
| 143 | repo_id = options['repo_id'] |
| 144 | |
| 145 | # 请求体必填字段判断 |
| 146 | payload = {} |
| 147 | if options['scan_scheme_id'] is None and options['global_scheme_id'] is None: |
| 148 | logger.error("scan_scheme_id和global_scheme_id字段不能全部为空!") |
| 149 | return |
| 150 | if options['scan_scheme_id'] and options['global_scheme_id']: |
| 151 | logger.error("scan_scheme_id和global_scheme_id字段不能同时填入!") |
| 152 | return |
| 153 | if options['scan_scheme_id']: |
| 154 | payload.update({'scan_scheme_id': options['scan_scheme_id']}) |
| 155 | if options['global_scheme_id']: |
| 156 | payload.update({'global_scheme_id': options['global_scheme_id']}) |
| 157 | |
| 158 | if options['branch'] is None: |
| 159 | logger.error("branch 不能为空!") |
| 160 | return |
| 161 | payload.update({'branch': options['branch']}) |
| 162 | |
| 163 | self.create_project(base_url, org_sid, team_name, repo_id, payload) |
| 164 | |
| 165 | def create_scans_preproccess(self, base_url, org_sid, team_name, options): |
| 166 | if options['repo_id'] is None: |
no test coverage detected