parent
2c36c12b93
commit
f6ad5451a1
1 changed files with 26 additions and 15 deletions
|
@ -115,7 +115,8 @@ class PhabTalk:
|
|||
print('type: {}'.format(result_type))
|
||||
print('unit: {}'.format(unit))
|
||||
print('lint: {}'.format(lint_messages))
|
||||
else:
|
||||
return
|
||||
|
||||
_try_call(lambda: self._phab.harbormaster.sendmessage(
|
||||
buildTargetPHID=phid,
|
||||
type=result_type,
|
||||
|
@ -123,13 +124,23 @@ class PhabTalk:
|
|||
lint=lint_messages))
|
||||
|
||||
def add_artifact(self, phid: str, file: str, name: str, results_url: str):
|
||||
_try_call(lambda: self._phab.harbormaster.createartifact(
|
||||
buildTargetPHID=phid,
|
||||
artifactKey=str(uuid.uuid4()),
|
||||
artifactType='uri',
|
||||
artifactData={'uri': '{}/{}'.format(results_url, file),
|
||||
'ui.external': True,
|
||||
'name': name}))
|
||||
'name': name}
|
||||
if self.dryrun:
|
||||
print('harbormaster.createartifact =================')
|
||||
print('artifactKey: {}'.format(artifactKey))
|
||||
print('artifactType: {}'.format(artifactType))
|
||||
print('artifactData: {}'.format(artifactData))
|
||||
return
|
||||
|
||||
_try_call(lambda: self._phab.harbormaster.createartifact(
|
||||
buildTargetPHID=phid,
|
||||
artifactKey=artifactKey,
|
||||
artifactType=artifactType,
|
||||
artifactData=artifactData))
|
||||
|
||||
|
||||
def _parse_patch(patch) -> List[Dict[str, str]]:
|
||||
|
|
Loading…
Reference in a new issue