pipecraft 0.0.0-releaseit → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -108
- package/dist/cli/index.d.ts +69 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +94 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/generators/init.tpl.d.ts +70 -0
- package/dist/generators/init.tpl.d.ts.map +1 -1
- package/dist/generators/init.tpl.js +100 -8
- package/dist/generators/init.tpl.js.map +1 -1
- package/dist/generators/workflows.tpl.d.ts +86 -0
- package/dist/generators/workflows.tpl.d.ts.map +1 -1
- package/dist/generators/workflows.tpl.js +101 -9
- package/dist/generators/workflows.tpl.js.map +1 -1
- package/dist/templates/actions/calculate-version.yml.tpl.d.ts +47 -0
- package/dist/templates/actions/calculate-version.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/calculate-version.yml.tpl.js +72 -3
- package/dist/templates/actions/calculate-version.yml.tpl.js.map +1 -1
- package/dist/templates/actions/create-pr.yml.tpl.d.ts +14 -0
- package/dist/templates/actions/create-pr.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/create-pr.yml.tpl.js +22 -2
- package/dist/templates/actions/create-pr.yml.tpl.js.map +1 -1
- package/dist/templates/actions/create-release.yml.tpl.d.ts +18 -0
- package/dist/templates/actions/create-release.yml.tpl.d.ts.map +1 -0
- package/dist/templates/actions/create-release.yml.tpl.js +141 -0
- package/dist/templates/actions/create-release.yml.tpl.js.map +1 -0
- package/dist/templates/actions/create-tag.yml.tpl.d.ts +14 -0
- package/dist/templates/actions/create-tag.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/create-tag.yml.tpl.js +22 -2
- package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -1
- package/dist/templates/actions/detect-changes.yml.tpl.d.ts +70 -0
- package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/detect-changes.yml.tpl.js +98 -2
- package/dist/templates/actions/detect-changes.yml.tpl.js.map +1 -1
- package/dist/templates/actions/manage-branch.yml.tpl.d.ts +14 -0
- package/dist/templates/actions/manage-branch.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/manage-branch.yml.tpl.js +22 -2
- package/dist/templates/actions/manage-branch.yml.tpl.js.map +1 -1
- package/dist/templates/actions/promote-branch.yml.tpl.d.ts +14 -0
- package/dist/templates/actions/promote-branch.yml.tpl.d.ts.map +1 -1
- package/dist/templates/actions/promote-branch.yml.tpl.js +50 -7
- package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -1
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts +114 -1
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts.map +1 -1
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.js +479 -74
- package/dist/templates/workflows/pipeline-path-based.yml.tpl.js.map +1 -1
- package/dist/types/index.d.ts +231 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +9 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/ast-path-operations.d.ts.map +1 -1
- package/dist/utils/ast-path-operations.js +24 -11
- package/dist/utils/ast-path-operations.js.map +1 -1
- package/dist/utils/config.d.ts +63 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +71 -0
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/github-setup.d.ts +323 -2
- package/dist/utils/github-setup.d.ts.map +1 -1
- package/dist/utils/github-setup.js +551 -23
- package/dist/utils/github-setup.js.map +1 -1
- package/dist/utils/idempotency.d.ts +147 -7
- package/dist/utils/idempotency.d.ts.map +1 -1
- package/dist/utils/idempotency.js +143 -15
- package/dist/utils/idempotency.js.map +1 -1
- package/dist/utils/logger.d.ts +134 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +153 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/preflight.d.ts +223 -12
- package/dist/utils/preflight.d.ts.map +1 -1
- package/dist/utils/preflight.js +216 -16
- package/dist/utils/preflight.js.map +1 -1
- package/dist/utils/versioning.d.ts +160 -8
- package/dist/utils/versioning.d.ts.map +1 -1
- package/dist/utils/versioning.js +179 -15
- package/dist/utils/versioning.js.map +1 -1
- package/package.json +26 -5
- package/.claude/settings.local.json +0 -35
- package/.github/actions/calculate-version/action.yml +0 -106
- package/.github/actions/create-pr/action.yml +0 -122
- package/.github/actions/create-release/action.yml +0 -74
- package/.github/actions/create-tag/action.yml +0 -94
- package/.github/actions/detect-changes/action.yml +0 -62
- package/.github/actions/manage-branch/action.yml +0 -113
- package/.github/actions/promote-branch/action.yml +0 -352
- package/.github/example/workflows/job.analyze.code.yml +0 -26
- package/.github/example/workflows/job.analyze.docker.yml +0 -32
- package/.github/example/workflows/job.app.api.deploy.yml +0 -127
- package/.github/example/workflows/job.app.api.test.yml +0 -102
- package/.github/example/workflows/job.app.docs.deploy.yml +0 -40
- package/.github/example/workflows/job.app.docs.test.yml +0 -50
- package/.github/example/workflows/job.app.web.deploy.yml +0 -96
- package/.github/example/workflows/job.app.web.test.yml +0 -49
- package/.github/example/workflows/job.changes.yml +0 -82
- package/.github/example/workflows/job.create-pr.yml +0 -96
- package/.github/example/workflows/job.env-check.yml +0 -43
- package/.github/example/workflows/job.fast-forward.yml +0 -103
- package/.github/example/workflows/job.lint.yml +0 -64
- package/.github/example/workflows/job.pr-name.yml +0 -70
- package/.github/example/workflows/job.pr-squash-name.yml +0 -27
- package/.github/example/workflows/job.tag.yml +0 -38
- package/.github/example/workflows/job.version.yml +0 -99
- package/.github/example/workflows/lib.plugin-base.publish.yml +0 -59
- package/.github/example/workflows/pipe.yml +0 -178
- package/.github/example/workflows/scripts/fastforward.sh +0 -51
- package/.github/example/workflows/scripts/pipe-cleaner.sh +0 -70
- package/.github/scripts/fastforward.sh +0 -51
- package/.github/scripts/pipe-cleaner.sh +0 -70
- package/.github/workflows/pipeline.yml +0 -220
- package/.github/workflows/pr-title-check.yml +0 -70
- package/.github/workflows/publish.yml +0 -39
- package/.pipecraftrc.json +0 -78
- package/.release-it.cjs +0 -71
- package/PIPELINE_TESTING_PLAN.md +0 -499
- package/TRUNK_FLOW_PLAN.md +0 -401
- package/assets/logo_banner.png +0 -0
- package/assets/logo_banner.webp +0 -0
- package/docs/USER_JOURNEY_ERRORS.md +0 -352
- package/eslint.config.js +0 -77
- package/examples/basic-config.json +0 -41
- package/examples/monorepo-config.json +0 -49
- package/examples/usage.md +0 -289
- package/scripts/debug-workflows.sh +0 -339
- package/scripts/parse-pipeline.js +0 -29
- package/scripts/test-job-order.cjs +0 -140
- package/scripts/validate-pipeline.cjs +0 -379
- package/scripts/verify-job-order.sh +0 -30
- package/src/cli/index.ts +0 -414
- package/src/generators/init.tpl.ts +0 -126
- package/src/generators/workflows.tpl.ts +0 -80
- package/src/templates/actions/calculate-version.yml.tpl.ts +0 -124
- package/src/templates/actions/create-pr.yml.tpl.ts +0 -147
- package/src/templates/actions/create-tag.yml.tpl.ts +0 -112
- package/src/templates/actions/detect-changes.yml.tpl.ts +0 -87
- package/src/templates/actions/manage-branch.yml.tpl.ts +0 -132
- package/src/templates/actions/promote-branch.yml.tpl.ts +0 -364
- package/src/templates/workflows/pipeline-path-based.yml.tpl.ts +0 -706
- package/src/types/index.ts +0 -64
- package/src/utils/README-ast-path-operations.md +0 -390
- package/src/utils/ast-path-operations.ts +0 -581
- package/src/utils/config.ts +0 -64
- package/src/utils/github-setup.ts +0 -558
- package/src/utils/idempotency.ts +0 -215
- package/src/utils/preflight.ts +0 -306
- package/src/utils/versioning.ts +0 -244
- package/tests/README.md +0 -229
- package/tests/TEST_STRUCTURE.md +0 -256
- package/tests/act/run-act-tests.sh +0 -345
- package/tests/debugging/debug-utils.ts +0 -538
- package/tests/debugging/debug-workflow.test.ts +0 -339
- package/tests/debugging/debug-workflows.sh +0 -339
- package/tests/debugging/iterative-debug.ts +0 -652
- package/tests/debugging/run-debug-tests.sh +0 -431
- package/tests/fixtures/basic-config.json +0 -51
- package/tests/fixtures/invalid-config.json +0 -9
- package/tests/fixtures/pipeline-generated.yml +0 -235
- package/tests/fixtures/pipeline-preserve-comments.yml +0 -245
- package/tests/fixtures/pipeline-user-modified.yml +0 -245
- package/tests/fixtures/test-config.json +0 -58
- package/tests/github-live/README.md +0 -250
- package/tests/github-local/JOB_WORKFLOW_TESTS.md +0 -296
- package/tests/github-local/README.md +0 -240
- package/tests/github-local/run-all-tests.sh +0 -422
- package/tests/github-local/test-job-workflows.sh +0 -631
- package/tests/github-local/test-pipeline-workflow.sh +0 -440
- package/tests/integration/generators.test.ts +0 -578
- package/tests/integration/path-based-template.test.ts +0 -510
- package/tests/integration/simple-path-based.test.ts +0 -415
- package/tests/setup.ts +0 -56
- package/tests/unit/ast-path-operations-extended.test.ts +0 -302
- package/tests/unit/cli.test.ts +0 -541
- package/tests/unit/config-extended.test.ts +0 -412
- package/tests/unit/config.test.ts +0 -152
- package/tests/unit/github-setup.test.ts +0 -189
- package/tests/unit/idempotency-isolated.test.ts +0 -297
- package/tests/unit/job-order.test.ts +0 -157
- package/tests/unit/pipeline-path-based.test.ts +0 -511
- package/tests/unit/validate-pipeline.test.ts +0 -384
- package/tests/unit/versioning-extended.test.ts +0 -279
- package/tests/unit/versioning.test.ts +0 -241
- package/tsconfig.debug.json +0 -17
- package/tsconfig.json +0 -28
- package/vitest.config.ts +0 -51
package/dist/utils/config.js
CHANGED
|
@@ -1,4 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Loading and Validation Utilities
|
|
3
|
+
*
|
|
4
|
+
* This module provides functions to load and validate PipeCraft configuration files.
|
|
5
|
+
* It uses cosmiconfig to search for configuration in multiple locations:
|
|
6
|
+
* - .pipecraftrc.json
|
|
7
|
+
* - .pipecraftrc (JSON or YAML)
|
|
8
|
+
* - pipecraft.config.js
|
|
9
|
+
* - package.json (pipecraft key)
|
|
10
|
+
*
|
|
11
|
+
* The configuration is validated to ensure all required fields are present
|
|
12
|
+
* and have valid values before being used to generate workflows.
|
|
13
|
+
*
|
|
14
|
+
* @module utils/config
|
|
15
|
+
*/
|
|
1
16
|
import { cosmiconfigSync } from 'cosmiconfig';
|
|
17
|
+
/**
|
|
18
|
+
* Load PipeCraft configuration from filesystem.
|
|
19
|
+
*
|
|
20
|
+
* Uses cosmiconfig to search for configuration files in standard locations.
|
|
21
|
+
* If no path is provided, searches the current directory and ancestors for
|
|
22
|
+
* configuration files in this order:
|
|
23
|
+
* 1. .pipecraftrc.json
|
|
24
|
+
* 2. .pipecraftrc
|
|
25
|
+
* 3. pipecraft.config.js
|
|
26
|
+
* 4. package.json (pipecraft key)
|
|
27
|
+
*
|
|
28
|
+
* @param configPath - Optional explicit path to configuration file
|
|
29
|
+
* @returns Parsed configuration object
|
|
30
|
+
* @throws {Error} If no configuration file is found
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* // Search for config in current directory and ancestors
|
|
35
|
+
* const config = loadConfig()
|
|
36
|
+
*
|
|
37
|
+
* // Load from explicit path
|
|
38
|
+
* const config = loadConfig('./my-config.json')
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
2
41
|
export const loadConfig = (configPath) => {
|
|
3
42
|
const explorer = cosmiconfigSync('pipecraft');
|
|
4
43
|
const result = configPath ? explorer.load(configPath) : explorer.search();
|
|
@@ -7,25 +46,56 @@ export const loadConfig = (configPath) => {
|
|
|
7
46
|
}
|
|
8
47
|
return result.config;
|
|
9
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Validate PipeCraft configuration structure and values.
|
|
51
|
+
*
|
|
52
|
+
* Performs comprehensive validation including:
|
|
53
|
+
* - Presence of all required fields
|
|
54
|
+
* - Valid enum values (ciProvider, mergeStrategy)
|
|
55
|
+
* - Branch flow structure (minimum 2 branches)
|
|
56
|
+
* - Domain configuration (paths, testable, deployable)
|
|
57
|
+
*
|
|
58
|
+
* Also sets default values for optional domain properties:
|
|
59
|
+
* - testable defaults to true
|
|
60
|
+
* - deployable defaults to true
|
|
61
|
+
*
|
|
62
|
+
* @param config - Configuration object to validate (untyped to allow validation)
|
|
63
|
+
* @returns true if validation passes
|
|
64
|
+
* @throws {Error} If validation fails with detailed error message
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* const config = loadConfig()
|
|
69
|
+
* validateConfig(config) // Throws if invalid
|
|
70
|
+
* // Safe to use config as PipecraftConfig after this point
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
10
73
|
export const validateConfig = (config) => {
|
|
74
|
+
// Check for all required top-level fields
|
|
11
75
|
const requiredFields = ['ciProvider', 'mergeStrategy', 'requireConventionalCommits', 'initialBranch', 'finalBranch', 'branchFlow', 'domains'];
|
|
12
76
|
for (const field of requiredFields) {
|
|
13
77
|
if (!(field in config)) {
|
|
14
78
|
throw new Error(`Missing required field: ${field}`);
|
|
15
79
|
}
|
|
16
80
|
}
|
|
81
|
+
// Validate ciProvider enum
|
|
17
82
|
if (!['github', 'gitlab'].includes(config.ciProvider)) {
|
|
18
83
|
throw new Error('ciProvider must be either "github" or "gitlab"');
|
|
19
84
|
}
|
|
85
|
+
// Validate mergeStrategy enum
|
|
20
86
|
if (!['fast-forward', 'merge'].includes(config.mergeStrategy)) {
|
|
21
87
|
throw new Error('mergeStrategy must be either "fast-forward" or "merge"');
|
|
22
88
|
}
|
|
89
|
+
// Validate branchFlow is a non-empty array with at least 2 branches
|
|
90
|
+
// (minimum trunk-based flow requires at least develop → main)
|
|
23
91
|
if (!Array.isArray(config.branchFlow) || config.branchFlow.length < 2) {
|
|
24
92
|
throw new Error('branchFlow must be an array with at least 2 branches');
|
|
25
93
|
}
|
|
94
|
+
// Validate domains structure
|
|
26
95
|
if (typeof config.domains !== 'object') {
|
|
27
96
|
throw new Error('domains must be an object');
|
|
28
97
|
}
|
|
98
|
+
// Validate each domain configuration
|
|
29
99
|
for (const [domainName, domainConfig] of Object.entries(config.domains)) {
|
|
30
100
|
if (!domainConfig || typeof domainConfig !== 'object') {
|
|
31
101
|
throw new Error(`Domain "${domainName}" must be an object`);
|
|
@@ -37,6 +107,7 @@ export const validateConfig = (config) => {
|
|
|
37
107
|
throw new Error(`Domain "${domainName}" must have at least one path pattern`);
|
|
38
108
|
}
|
|
39
109
|
// Set defaults for optional properties
|
|
110
|
+
// By default, domains are both testable and deployable
|
|
40
111
|
if (domainConfig.testable === undefined) {
|
|
41
112
|
domainConfig.testable = true;
|
|
42
113
|
}
|
package/dist/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAmB,EAAE,EAAE;IAChD,MAAM,QAAQ,GAAG,eAAe,CAAC,WAAW,CAAC,CAAA;IAC7C,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;IAEzE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,0CAA0C,UAAU,IAAI,mBAAmB,EAAE,CAAC,CAAA;IAChG,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAW,EAAE,EAAE;IAC5C,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,eAAe,EAAE,4BAA4B,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,CAAC,CAAA;IAE7I,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,2BAA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KAAK,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,6BAA6B,CAAC,CAAA;QACrE,CAAC;QAED,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,uCAAuC,CAAC,CAAA;QAC/E,CAAC;QAED,uCAAuC;QACvC,uDAAuD;QACvD,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACxC,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAA;QAC9B,CAAC;QACD,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAC1C,YAAY,CAAC,UAAU,GAAG,IAAI,CAAA;QAChC,CAAC;IACH,CAAC;IAGD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
|
@@ -1,35 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Repository Setup and Configuration
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for setting up and configuring GitHub repositories
|
|
5
|
+
* for use with PipeCraft workflows. It handles:
|
|
6
|
+
* - Repository information extraction from git remotes
|
|
7
|
+
* - GitHub authentication token management
|
|
8
|
+
* - Workflow permissions configuration
|
|
9
|
+
* - Repository merge settings (strategies, auto-merge, PR updates)
|
|
10
|
+
* - Merge commit message format settings
|
|
11
|
+
* - Branch protection rules setup
|
|
12
|
+
* - Auto-merge enablement (two-layer system)
|
|
13
|
+
*
|
|
14
|
+
* These setup utilities ensure that GitHub repositories have the correct permissions
|
|
15
|
+
* and settings for PipeCraft workflows to function properly, including:
|
|
16
|
+
* - Workflows can create pull requests
|
|
17
|
+
* - Merge commits always use PR titles (not individual commit messages)
|
|
18
|
+
* - Auto-merge is enabled based on .pipecraftrc.json config
|
|
19
|
+
* - Branch protection is configured appropriately
|
|
20
|
+
* - Required status checks are enforced
|
|
21
|
+
*
|
|
22
|
+
* ## Auto-Merge Two-Layer System
|
|
23
|
+
*
|
|
24
|
+
* Auto-merge in GitHub works with two layers:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Repository-Level Setting** (`allow_auto_merge`):
|
|
27
|
+
* - Must be ON for auto-merge to be available at all
|
|
28
|
+
* - Controls whether the "Enable auto-merge" button appears on PRs
|
|
29
|
+
* - Configured by this module based on .pipecraftrc.json
|
|
30
|
+
*
|
|
31
|
+
* 2. **Per-PR Activation**:
|
|
32
|
+
* - Must be explicitly enabled on each PR (via button, CLI, or API)
|
|
33
|
+
* - Pipecraft workflows automatically enable it for configured branches
|
|
34
|
+
* - Configured per-branch in .pipecraftrc.json autoMerge setting
|
|
35
|
+
*
|
|
36
|
+
* Example config:
|
|
37
|
+
* ```json
|
|
38
|
+
* {
|
|
39
|
+
* "branchFlow": ["develop", "staging", "main"],
|
|
40
|
+
* "autoMerge": {
|
|
41
|
+
* "staging": true, // Auto-merge PRs to staging
|
|
42
|
+
* "main": true // Auto-merge PRs to main
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
* Result: develop requires manual review, staging and main auto-merge when checks pass
|
|
47
|
+
*
|
|
48
|
+
* @module utils/github-setup
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* GitHub Actions workflow permissions configuration.
|
|
52
|
+
*
|
|
53
|
+
* Controls what permissions workflows have when executing in the repository.
|
|
54
|
+
* PipeCraft workflows need 'write' permissions to create PRs and manage branches.
|
|
55
|
+
*/
|
|
1
56
|
interface WorkflowPermissions {
|
|
57
|
+
/**
|
|
58
|
+
* Default permissions for GITHUB_TOKEN in workflow runs.
|
|
59
|
+
* - 'read': Read-only access (insufficient for PipeCraft)
|
|
60
|
+
* - 'write': Read-write access (required for PipeCraft)
|
|
61
|
+
*/
|
|
2
62
|
default_workflow_permissions: 'read' | 'write';
|
|
63
|
+
/**
|
|
64
|
+
* Whether workflows can approve pull request reviews.
|
|
65
|
+
* Should be false to require human approval.
|
|
66
|
+
*/
|
|
3
67
|
can_approve_pull_request_reviews: boolean;
|
|
4
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Repository identification information extracted from git remote.
|
|
71
|
+
*
|
|
72
|
+
* Used for GitHub API calls and workflow configuration.
|
|
73
|
+
*/
|
|
5
74
|
interface RepositoryInfo {
|
|
75
|
+
/** GitHub organization or user name */
|
|
6
76
|
owner: string;
|
|
77
|
+
/** Repository name */
|
|
7
78
|
repo: string;
|
|
79
|
+
/** Full git remote URL */
|
|
8
80
|
remote: string;
|
|
9
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* GitHub repository merge and PR settings.
|
|
84
|
+
*
|
|
85
|
+
* Controls merge strategies, auto-merge, PR branch updates, and commit message formats.
|
|
86
|
+
* These settings determine how PRs can be merged and what commit messages are created.
|
|
87
|
+
*/
|
|
88
|
+
interface RepositorySettings {
|
|
89
|
+
/**
|
|
90
|
+
* Allow auto-merge feature (let PRs auto-merge when checks pass)
|
|
91
|
+
*/
|
|
92
|
+
allow_auto_merge?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Always suggest updating pull request branches (keep PRs up to date with base)
|
|
95
|
+
*/
|
|
96
|
+
allow_update_branch?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Allow merge commits (creates a merge commit)
|
|
99
|
+
*/
|
|
100
|
+
allow_merge_commit?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Allow rebase merging (rebases and fast-forwards)
|
|
103
|
+
*/
|
|
104
|
+
allow_rebase_merge?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Allow squash merging (squashes all commits into one)
|
|
107
|
+
*/
|
|
108
|
+
allow_squash_merge?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Default title format for squash merge commits.
|
|
111
|
+
* - 'PR_TITLE': Use the pull request title
|
|
112
|
+
* - 'COMMIT_OR_PR_TITLE': Use commit message if single commit, PR title otherwise
|
|
113
|
+
*/
|
|
114
|
+
squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE';
|
|
115
|
+
/**
|
|
116
|
+
* Default message format for squash merge commits.
|
|
117
|
+
* - 'PR_BODY': Use the pull request body
|
|
118
|
+
* - 'COMMIT_MESSAGES': Use all commit messages
|
|
119
|
+
* - 'BLANK': Leave message blank
|
|
120
|
+
*/
|
|
121
|
+
squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK';
|
|
122
|
+
/**
|
|
123
|
+
* Default title format for merge commits.
|
|
124
|
+
* - 'PR_TITLE': Use the pull request title
|
|
125
|
+
* - 'MERGE_MESSAGE': Use default merge message
|
|
126
|
+
*/
|
|
127
|
+
merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE';
|
|
128
|
+
/**
|
|
129
|
+
* Default message format for merge commits.
|
|
130
|
+
* - 'PR_BODY': Use the pull request body
|
|
131
|
+
* - 'PR_TITLE': Use the pull request title
|
|
132
|
+
* - 'BLANK': Leave message blank
|
|
133
|
+
*/
|
|
134
|
+
merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK';
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Type alias for backwards compatibility with existing functions.
|
|
138
|
+
* @deprecated Use RepositorySettings instead
|
|
139
|
+
*/
|
|
140
|
+
type MergeCommitSettings = RepositorySettings;
|
|
141
|
+
/**
|
|
142
|
+
* GitHub branch protection rule configuration.
|
|
143
|
+
*
|
|
144
|
+
* Defines protection requirements for a branch including status checks,
|
|
145
|
+
* review requirements, and restrictions on force pushes/deletions.
|
|
146
|
+
* PipeCraft recommends specific settings for trunk-based workflows.
|
|
147
|
+
*/
|
|
10
148
|
interface BranchProtectionRules {
|
|
149
|
+
/**
|
|
150
|
+
* Required status checks that must pass before merging.
|
|
151
|
+
* PipeCraft sets this to enforce test jobs.
|
|
152
|
+
*/
|
|
11
153
|
required_status_checks: null | {
|
|
154
|
+
/** Whether branch must be up to date before merging */
|
|
12
155
|
strict: boolean;
|
|
156
|
+
/** Names of required status checks (job names from workflow) */
|
|
13
157
|
contexts: string[];
|
|
14
158
|
};
|
|
159
|
+
/** Whether administrators are subject to branch protection rules */
|
|
15
160
|
enforce_admins: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Pull request review requirements.
|
|
163
|
+
* PipeCraft typically disables this for automated promotions.
|
|
164
|
+
*/
|
|
16
165
|
required_pull_request_reviews: null | {
|
|
166
|
+
/** Dismiss stale reviews when new commits are pushed */
|
|
17
167
|
dismiss_stale_reviews: boolean;
|
|
168
|
+
/** Require review from code owners */
|
|
18
169
|
require_code_owner_reviews: boolean;
|
|
170
|
+
/** Number of approving reviews required */
|
|
19
171
|
required_approving_review_count: number;
|
|
20
172
|
};
|
|
173
|
+
/** User/team restrictions for who can push (null = no restrictions) */
|
|
21
174
|
restrictions: null;
|
|
175
|
+
/** Allow force pushes to the branch */
|
|
22
176
|
allow_force_pushes: boolean;
|
|
177
|
+
/** Allow branch deletion */
|
|
23
178
|
allow_deletions: boolean;
|
|
179
|
+
/** Require linear commit history (no merge commits) */
|
|
24
180
|
required_linear_history: boolean;
|
|
181
|
+
/** Require all conversations to be resolved before merging */
|
|
25
182
|
required_conversation_resolution: boolean;
|
|
26
183
|
}
|
|
27
184
|
/**
|
|
28
|
-
*
|
|
185
|
+
* Extract GitHub repository information from git remote configuration.
|
|
186
|
+
*
|
|
187
|
+
* Parses the git remote URL for the 'origin' remote to extract owner and
|
|
188
|
+
* repository name. Supports both HTTPS and SSH GitHub URLs:
|
|
189
|
+
* - HTTPS: https://github.com/owner/repo.git
|
|
190
|
+
* - SSH: git@github.com:owner/repo.git
|
|
191
|
+
*
|
|
192
|
+
* This information is required for GitHub API calls to configure repository
|
|
193
|
+
* settings and permissions.
|
|
194
|
+
*
|
|
195
|
+
* @returns Repository information object
|
|
196
|
+
* @throws {Error} If origin remote is not configured
|
|
197
|
+
* @throws {Error} If remote URL is not a valid GitHub URL
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* const info = getRepositoryInfo()
|
|
202
|
+
* console.log(`Owner: ${info.owner}, Repo: ${info.repo}`)
|
|
203
|
+
* // Owner: jamesvillarrubia, Repo: pipecraft
|
|
204
|
+
* ```
|
|
29
205
|
*/
|
|
30
206
|
export declare function getRepositoryInfo(): RepositoryInfo;
|
|
31
207
|
/**
|
|
32
|
-
* Get GitHub token from environment or
|
|
208
|
+
* Get GitHub authentication token from environment or GitHub CLI.
|
|
209
|
+
*
|
|
210
|
+
* Attempts to retrieve a GitHub personal access token from multiple sources
|
|
211
|
+
* in this order:
|
|
212
|
+
* 1. GITHUB_TOKEN environment variable
|
|
213
|
+
* 2. GH_TOKEN environment variable
|
|
214
|
+
* 3. GitHub CLI (`gh auth token`) if authenticated
|
|
215
|
+
*
|
|
216
|
+
* The token is required for GitHub API calls to configure repository settings.
|
|
217
|
+
* Token must have 'repo' and 'workflow' scopes.
|
|
218
|
+
*
|
|
219
|
+
* @returns GitHub personal access token
|
|
220
|
+
* @throws {Error} If no token is found in any source
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* // Set token via environment
|
|
225
|
+
* process.env.GITHUB_TOKEN = 'ghp_xxxxxxxxxxxx'
|
|
226
|
+
* const token = getGitHubToken()
|
|
227
|
+
*
|
|
228
|
+
* // Or authenticate with GitHub CLI first
|
|
229
|
+
* // $ gh auth login
|
|
230
|
+
* const token = getGitHubToken() // Uses gh CLI token
|
|
231
|
+
* ```
|
|
33
232
|
*/
|
|
34
233
|
export declare function getGitHubToken(): string;
|
|
35
234
|
/**
|
|
@@ -50,6 +249,128 @@ export declare function getRequiredPermissionChanges(currentPermissions: Workflo
|
|
|
50
249
|
* Returns: changes object if user accepted changes, 'declined' if user declined, null if already correct
|
|
51
250
|
*/
|
|
52
251
|
export declare function promptPermissionChanges(currentPermissions: WorkflowPermissions): Promise<Partial<WorkflowPermissions> | null | 'declined'>;
|
|
252
|
+
/**
|
|
253
|
+
* Get current merge commit message settings for the repository.
|
|
254
|
+
*
|
|
255
|
+
* Retrieves the default formats for merge and squash commit messages.
|
|
256
|
+
* These settings control how GitHub formats commit messages when PRs are merged.
|
|
257
|
+
*
|
|
258
|
+
* @param owner - Repository owner (organization or user)
|
|
259
|
+
* @param repo - Repository name
|
|
260
|
+
* @param token - GitHub authentication token
|
|
261
|
+
* @returns Current merge commit settings
|
|
262
|
+
* @throws {Error} If the API call fails
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* const settings = await getMergeCommitSettings('owner', 'repo', token)
|
|
267
|
+
* console.log(settings.squash_merge_commit_title) // 'PR_TITLE' or 'COMMIT_OR_PR_TITLE'
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
export declare function getMergeCommitSettings(owner: string, repo: string, token: string): Promise<MergeCommitSettings>;
|
|
271
|
+
/**
|
|
272
|
+
* Update merge commit message settings for the repository.
|
|
273
|
+
*
|
|
274
|
+
* Configures how GitHub formats commit messages when PRs are merged.
|
|
275
|
+
* PipeCraft recommends using PR_TITLE to ensure consistent commit messages
|
|
276
|
+
* regardless of whether a PR has one or multiple commits.
|
|
277
|
+
*
|
|
278
|
+
* @param owner - Repository owner (organization or user)
|
|
279
|
+
* @param repo - Repository name
|
|
280
|
+
* @param token - GitHub authentication token
|
|
281
|
+
* @param settings - Merge commit settings to apply
|
|
282
|
+
* @throws {Error} If the API call fails
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```typescript
|
|
286
|
+
* await updateMergeCommitSettings('owner', 'repo', token, {
|
|
287
|
+
* squash_merge_commit_title: 'PR_TITLE',
|
|
288
|
+
* merge_commit_title: 'PR_TITLE'
|
|
289
|
+
* })
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
export declare function updateMergeCommitSettings(owner: string, repo: string, token: string, settings: MergeCommitSettings): Promise<void>;
|
|
293
|
+
/**
|
|
294
|
+
* Determine required merge commit setting changes without prompting.
|
|
295
|
+
*
|
|
296
|
+
* Checks if merge commit settings match PipeCraft's recommended configuration:
|
|
297
|
+
* - Always use PR title for squash and merge commits
|
|
298
|
+
* - This ensures consistent commit messages regardless of commit count
|
|
299
|
+
* - Only configures settings for enabled merge strategies
|
|
300
|
+
*
|
|
301
|
+
* @param currentSettings - Current merge commit settings
|
|
302
|
+
* @returns Changes object if changes needed, null if already correct
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```typescript
|
|
306
|
+
* const settings = await getMergeCommitSettings(owner, repo, token)
|
|
307
|
+
* const changes = getRequiredMergeCommitChanges(settings)
|
|
308
|
+
* if (changes) {
|
|
309
|
+
* await updateMergeCommitSettings(owner, repo, token, changes)
|
|
310
|
+
* }
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
export declare function getRequiredMergeCommitChanges(currentSettings: MergeCommitSettings): MergeCommitSettings | null;
|
|
314
|
+
/**
|
|
315
|
+
* Display current merge commit settings and prompt for changes.
|
|
316
|
+
*
|
|
317
|
+
* Shows the user their current merge commit message format settings and
|
|
318
|
+
* asks if they want to change them to PipeCraft's recommended configuration.
|
|
319
|
+
* Only prompts for settings that are relevant to enabled merge strategies.
|
|
320
|
+
*
|
|
321
|
+
* @param currentSettings - Current merge commit settings
|
|
322
|
+
* @returns Changes object if user accepted, 'declined' if declined, null if already correct
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* ```typescript
|
|
326
|
+
* const settings = await getMergeCommitSettings(owner, repo, token)
|
|
327
|
+
* const changes = await promptMergeCommitChanges(settings)
|
|
328
|
+
* if (changes && changes !== 'declined') {
|
|
329
|
+
* await updateMergeCommitSettings(owner, repo, token, changes)
|
|
330
|
+
* }
|
|
331
|
+
* ```
|
|
332
|
+
*/
|
|
333
|
+
export declare function promptMergeCommitChanges(currentSettings: MergeCommitSettings): Promise<MergeCommitSettings | null | 'declined'>;
|
|
334
|
+
/**
|
|
335
|
+
* Check if auto-merge should be enabled based on .pipecraftrc.json config.
|
|
336
|
+
*
|
|
337
|
+
* Auto-merge should be enabled at the repository level if ANY branch
|
|
338
|
+
* has autoMerge configured in the config file.
|
|
339
|
+
*/
|
|
340
|
+
export declare function shouldEnableAutoMerge(): boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Get Pipecraft's recommended repository settings.
|
|
343
|
+
*
|
|
344
|
+
* These are the settings that work best with Pipecraft workflows:
|
|
345
|
+
* - Allow auto-merge: ON if any branch has autoMerge in config, OFF otherwise
|
|
346
|
+
* - Always suggest updating PR branches: ON
|
|
347
|
+
* - Allow merge commits: OFF
|
|
348
|
+
* - Allow rebase merging: OFF
|
|
349
|
+
* - Allow squash merging: ON
|
|
350
|
+
* - Squash merge commit title: PR_TITLE
|
|
351
|
+
* - Squash merge commit message: COMMIT_MESSAGES (PR title + commit details)
|
|
352
|
+
*/
|
|
353
|
+
export declare function getRecommendedRepositorySettings(): RepositorySettings;
|
|
354
|
+
/**
|
|
355
|
+
* Get current repository settings from GitHub API.
|
|
356
|
+
*/
|
|
357
|
+
export declare function getRepositorySettings(owner: string, repo: string, token: string): Promise<RepositorySettings>;
|
|
358
|
+
/**
|
|
359
|
+
* Update repository settings via GitHub API.
|
|
360
|
+
*/
|
|
361
|
+
export declare function updateRepositorySettings(owner: string, repo: string, token: string, settings: Partial<RepositorySettings>): Promise<void>;
|
|
362
|
+
/**
|
|
363
|
+
* Compare current settings with recommended settings and return differences.
|
|
364
|
+
*/
|
|
365
|
+
export declare function getSettingsGaps(current: RepositorySettings, recommended: RepositorySettings): Partial<RepositorySettings>;
|
|
366
|
+
/**
|
|
367
|
+
* Display a comparison table of current vs recommended settings.
|
|
368
|
+
*/
|
|
369
|
+
export declare function displaySettingsComparison(current: RepositorySettings, recommended: RepositorySettings, gaps: Partial<RepositorySettings>): void;
|
|
370
|
+
/**
|
|
371
|
+
* Prompt user whether to apply recommended settings.
|
|
372
|
+
*/
|
|
373
|
+
export declare function promptApplySettings(gaps: Partial<RepositorySettings>): Promise<'apply' | 'declined'>;
|
|
53
374
|
/**
|
|
54
375
|
* Get branch protection rules
|
|
55
376
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-setup.d.ts","sourceRoot":"","sources":["../../src/utils/github-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-setup.d.ts","sourceRoot":"","sources":["../../src/utils/github-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAOH;;;;;GAKG;AACH,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,GAAG,OAAO,CAAA;IAE9C;;;OAGG;IACH,gCAAgC,EAAE,OAAO,CAAA;CAC1C;AAED;;;;GAIG;AACH,UAAU,cAAc;IACtB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IAEb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IAEZ,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,UAAU,kBAAkB;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,UAAU,GAAG,oBAAoB,CAAA;IAE7D;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,OAAO,CAAA;IAErE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,UAAU,GAAG,eAAe,CAAA;IAEjD;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAA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