HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/env-ci/services/buddy.js
// https://buddy.works/knowledge/deployments/how-use-environment-variables#default-environment-variables

const {prNumber} = require('../lib/utils');

module.exports = {
	detect({env}) {
		return Boolean(env.BUDDY_WORKSPACE_ID);
	},
	configuration({env}) {
		const pr = prNumber(env.BUDDY_EXECUTION_PULL_REQUEST_ID);
		const isPr = Boolean(pr);

		return {
			name: 'Buddy',
			service: 'buddy',
			commit: env.BUDDY_EXECUTION_REVISION,
			tag: env.BUDDY_EXECUTION_TAG,
			build: env.BUDDY_EXECUTION_ID,
			buildUrl: env.BUDDY_EXECUTION_URL,
			branch: isPr ? undefined : env.BUDDY_EXECUTION_BRANCH,
			pr,
			isPr,
			slug: env.BUDDY_REPO_SLUG,
		};
	},
};