//#region lib/modules/platform/scm-manager/mapper.ts
function mapPrFromScmToRenovate(pr) {
	return {
		sourceBranch: pr.source,
		targetBranch: pr.target,
		createdAt: pr.creationDate,
		closedAt: pr.closeDate ?? void 0,
		hasAssignees: !!pr.reviewer?.length,
		labels: pr.labels,
		number: parseInt(pr.id, 10),
		reviewers: pr.reviewer?.map((review) => review.displayName) ?? [],
		state: pr.status,
		title: pr.title,
		isDraft: pr.status === "DRAFT"
	};
}

//#endregion
export { mapPrFromScmToRenovate };
//# sourceMappingURL=mapper.js.map