1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Linter and helper tool to standardize CTAs (#57826)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Sarah Schneider
2025-10-10 15:04:38 -04:00
committed by GitHub
parent 29ac8677f1
commit 10eac91b8c
8 changed files with 909 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// This schema enforces the structure for CTA (Call-to-Action) URL parameters
// Used to validate CTA tracking parameters in documentation links
export default {
type: 'object',
additionalProperties: false,
required: ['ref_product', 'ref_type', 'ref_style'],
properties: {
// GitHub Product: The GitHub product the CTA leads users to
// Format: ref_product=copilot
ref_product: {
type: 'string',
name: 'Product',
description: 'The GitHub product the CTA leads users to',
enum: ['copilot', 'ghec', 'desktop'],
},
// Type of CTA: The type of action the CTA encourages users to take
// Format: ref_type=trial
ref_type: {
type: 'string',
name: 'Type',
description: 'The type of action the CTA encourages users to take',
enum: ['trial', 'purchase', 'engagement'],
},
// CTA style: The way we are formatting the CTA in the docs
// Format: ref_style=button
ref_style: {
type: 'string',
name: 'Style',
description: 'The way we are formatting the CTA in the docs',
enum: ['button', 'text'],
},
// Type of plan (Optional): For links to sign up for or trial a plan, the specific plan we link to
// Format: ref_plan=business
ref_plan: {
type: 'string',
name: 'Plan',
description:
'For links to sign up for or trial a plan, the specific plan we link to (optional)',
enum: ['enterprise', 'business', 'pro', 'free'],
},
},
}