deployment.reportStatus.
What a deployment carries
A deployment names a service when several applications deploy into one environment, or when one pipeline ships more than one build — an Android and an iOS build, say.
service is what tells those deploys apart, and it is what a trigger’s servicePattern matches on. A deployment that names no service never matches a trigger carrying a service pattern.
On deployment.reportStatus, the branch comes only from metadata.ref. A report with no ref, or with a commit sha as its ref, has no branch, and never matches a trigger’s branchPattern.
Environment
QA Wolf matches the environment name against the workspace’s environments by alias or by slugified name. When nothing matches, it creates a new environment under that name. A pipeline sendingprod-us while the QA Wolf environment is named production creates a second environment that no trigger targets. Make the pipeline send the QA Wolf environment’s name, or add the name it sends as an alias.
The preview flag decides what kind of environment gets created. A preview environment is torn down when its pull request closes. A permanent one is not. The flag defaults to permanent on every path, so a preview deploy that omits it leaves a permanent environment behind, once per pull request.
A deployment.reportStatus report that would create an environment needs deployTarget, and is refused without it. On GitHub and GitLab, a deploy with no URL creates an environment that keeps the base environment’s URL.
Previews
Each pull request needs its own environment name (preview/pr-42, review/pr-42) and its own deploy target URL. A shared environment name puts every pull request into the same QA Wolf environment. A shared URL under per-pull-request names passes silently: the trigger matches and the run executes against whatever was deployed last.
Pull request
Linking a deployment to its pull request requires a connected GitHub or GitLab integration covering the deploying repository.metadata.pullRequestNumber names the pull request to read; it does not replace the integration. Without a pull request number, metadata.repository and metadata.commitSha find the pull request from the commit. metadata.repository has to match the connected repository’s owner/name exactly. A report for a repository with no integration succeeds and carries no pull request. See PR testing.
Evaluation
A deployment’s firstsuccess status evaluates every trigger in the workspace. No later status does, and a trigger created or resumed afterwards is not evaluated against it. To evaluate a deployment.reportStatus deploy again, report it under a new providerDeploymentId.
QA Wolf records one verdict per trigger. deployment.listTriggerEvaluations returns them.
Verdicts are a snapshot. Editing or deleting a trigger later does not change them. A verdict with no trigger id belongs to a trigger deleted since.