pipecraft 0.0.0-releaseit

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.
Files changed (176) hide show
  1. package/.claude/settings.local.json +35 -0
  2. package/.github/actions/calculate-version/action.yml +106 -0
  3. package/.github/actions/create-pr/action.yml +122 -0
  4. package/.github/actions/create-release/action.yml +74 -0
  5. package/.github/actions/create-tag/action.yml +94 -0
  6. package/.github/actions/detect-changes/action.yml +62 -0
  7. package/.github/actions/manage-branch/action.yml +113 -0
  8. package/.github/actions/promote-branch/action.yml +352 -0
  9. package/.github/example/workflows/job.analyze.code.yml +26 -0
  10. package/.github/example/workflows/job.analyze.docker.yml +32 -0
  11. package/.github/example/workflows/job.app.api.deploy.yml +127 -0
  12. package/.github/example/workflows/job.app.api.test.yml +102 -0
  13. package/.github/example/workflows/job.app.docs.deploy.yml +40 -0
  14. package/.github/example/workflows/job.app.docs.test.yml +50 -0
  15. package/.github/example/workflows/job.app.web.deploy.yml +96 -0
  16. package/.github/example/workflows/job.app.web.test.yml +49 -0
  17. package/.github/example/workflows/job.changes.yml +82 -0
  18. package/.github/example/workflows/job.create-pr.yml +96 -0
  19. package/.github/example/workflows/job.env-check.yml +43 -0
  20. package/.github/example/workflows/job.fast-forward.yml +103 -0
  21. package/.github/example/workflows/job.lint.yml +64 -0
  22. package/.github/example/workflows/job.pr-name.yml +70 -0
  23. package/.github/example/workflows/job.pr-squash-name.yml +27 -0
  24. package/.github/example/workflows/job.tag.yml +38 -0
  25. package/.github/example/workflows/job.version.yml +99 -0
  26. package/.github/example/workflows/lib.plugin-base.publish.yml +59 -0
  27. package/.github/example/workflows/pipe.yml +178 -0
  28. package/.github/example/workflows/scripts/fastforward.sh +51 -0
  29. package/.github/example/workflows/scripts/pipe-cleaner.sh +70 -0
  30. package/.github/scripts/fastforward.sh +51 -0
  31. package/.github/scripts/pipe-cleaner.sh +70 -0
  32. package/.github/workflows/pipeline.yml +220 -0
  33. package/.github/workflows/pr-title-check.yml +70 -0
  34. package/.github/workflows/publish.yml +39 -0
  35. package/.pipecraftrc.json +78 -0
  36. package/.release-it.cjs +71 -0
  37. package/PIPELINE_TESTING_PLAN.md +499 -0
  38. package/README.md +1101 -0
  39. package/TRUNK_FLOW_PLAN.md +401 -0
  40. package/assets/logo_banner.png +0 -0
  41. package/assets/logo_banner.webp +0 -0
  42. package/dist/cli/index.d.ts +3 -0
  43. package/dist/cli/index.d.ts.map +1 -0
  44. package/dist/cli/index.js +364 -0
  45. package/dist/cli/index.js.map +1 -0
  46. package/dist/generators/init.tpl.d.ts +3 -0
  47. package/dist/generators/init.tpl.d.ts.map +1 -0
  48. package/dist/generators/init.tpl.js +117 -0
  49. package/dist/generators/init.tpl.js.map +1 -0
  50. package/dist/generators/workflows.tpl.d.ts +7 -0
  51. package/dist/generators/workflows.tpl.d.ts.map +1 -0
  52. package/dist/generators/workflows.tpl.js +73 -0
  53. package/dist/generators/workflows.tpl.js.map +1 -0
  54. package/dist/templates/actions/calculate-version.yml.tpl.d.ts +3 -0
  55. package/dist/templates/actions/calculate-version.yml.tpl.d.ts.map +1 -0
  56. package/dist/templates/actions/calculate-version.yml.tpl.js +122 -0
  57. package/dist/templates/actions/calculate-version.yml.tpl.js.map +1 -0
  58. package/dist/templates/actions/create-pr.yml.tpl.d.ts +3 -0
  59. package/dist/templates/actions/create-pr.yml.tpl.d.ts.map +1 -0
  60. package/dist/templates/actions/create-pr.yml.tpl.js +145 -0
  61. package/dist/templates/actions/create-pr.yml.tpl.js.map +1 -0
  62. package/dist/templates/actions/create-tag.yml.tpl.d.ts +3 -0
  63. package/dist/templates/actions/create-tag.yml.tpl.d.ts.map +1 -0
  64. package/dist/templates/actions/create-tag.yml.tpl.js +111 -0
  65. package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -0
  66. package/dist/templates/actions/detect-changes.yml.tpl.d.ts +3 -0
  67. package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -0
  68. package/dist/templates/actions/detect-changes.yml.tpl.js +79 -0
  69. package/dist/templates/actions/detect-changes.yml.tpl.js.map +1 -0
  70. package/dist/templates/actions/manage-branch.yml.tpl.d.ts +3 -0
  71. package/dist/templates/actions/manage-branch.yml.tpl.d.ts.map +1 -0
  72. package/dist/templates/actions/manage-branch.yml.tpl.js +130 -0
  73. package/dist/templates/actions/manage-branch.yml.tpl.js.map +1 -0
  74. package/dist/templates/actions/promote-branch.yml.tpl.d.ts +3 -0
  75. package/dist/templates/actions/promote-branch.yml.tpl.d.ts.map +1 -0
  76. package/dist/templates/actions/promote-branch.yml.tpl.js +362 -0
  77. package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -0
  78. package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts +16 -0
  79. package/dist/templates/workflows/pipeline-path-based.yml.tpl.d.ts.map +1 -0
  80. package/dist/templates/workflows/pipeline-path-based.yml.tpl.js +652 -0
  81. package/dist/templates/workflows/pipeline-path-based.yml.tpl.js.map +1 -0
  82. package/dist/types/index.d.ts +63 -0
  83. package/dist/types/index.d.ts.map +1 -0
  84. package/dist/types/index.js +2 -0
  85. package/dist/types/index.js.map +1 -0
  86. package/dist/utils/ast-path-operations.d.ts +287 -0
  87. package/dist/utils/ast-path-operations.d.ts.map +1 -0
  88. package/dist/utils/ast-path-operations.js +419 -0
  89. package/dist/utils/ast-path-operations.js.map +1 -0
  90. package/dist/utils/config.d.ts +3 -0
  91. package/dist/utils/config.d.ts.map +1 -0
  92. package/dist/utils/config.js +49 -0
  93. package/dist/utils/config.js.map +1 -0
  94. package/dist/utils/github-setup.d.ts +74 -0
  95. package/dist/utils/github-setup.d.ts.map +1 -0
  96. package/dist/utils/github-setup.js +418 -0
  97. package/dist/utils/github-setup.js.map +1 -0
  98. package/dist/utils/idempotency.d.ts +47 -0
  99. package/dist/utils/idempotency.d.ts.map +1 -0
  100. package/dist/utils/idempotency.js +176 -0
  101. package/dist/utils/idempotency.js.map +1 -0
  102. package/dist/utils/preflight.d.ts +55 -0
  103. package/dist/utils/preflight.d.ts.map +1 -0
  104. package/dist/utils/preflight.js +261 -0
  105. package/dist/utils/preflight.js.map +1 -0
  106. package/dist/utils/versioning.d.ts +41 -0
  107. package/dist/utils/versioning.d.ts.map +1 -0
  108. package/dist/utils/versioning.js +219 -0
  109. package/dist/utils/versioning.js.map +1 -0
  110. package/docs/USER_JOURNEY_ERRORS.md +352 -0
  111. package/eslint.config.js +77 -0
  112. package/examples/basic-config.json +41 -0
  113. package/examples/monorepo-config.json +49 -0
  114. package/examples/usage.md +289 -0
  115. package/package.json +58 -0
  116. package/scripts/debug-workflows.sh +339 -0
  117. package/scripts/parse-pipeline.js +29 -0
  118. package/scripts/test-job-order.cjs +140 -0
  119. package/scripts/validate-pipeline.cjs +379 -0
  120. package/scripts/verify-job-order.sh +30 -0
  121. package/src/cli/index.ts +414 -0
  122. package/src/generators/init.tpl.ts +126 -0
  123. package/src/generators/workflows.tpl.ts +80 -0
  124. package/src/templates/actions/calculate-version.yml.tpl.ts +124 -0
  125. package/src/templates/actions/create-pr.yml.tpl.ts +147 -0
  126. package/src/templates/actions/create-tag.yml.tpl.ts +112 -0
  127. package/src/templates/actions/detect-changes.yml.tpl.ts +87 -0
  128. package/src/templates/actions/manage-branch.yml.tpl.ts +132 -0
  129. package/src/templates/actions/promote-branch.yml.tpl.ts +364 -0
  130. package/src/templates/workflows/pipeline-path-based.yml.tpl.ts +706 -0
  131. package/src/types/index.ts +64 -0
  132. package/src/utils/README-ast-path-operations.md +390 -0
  133. package/src/utils/ast-path-operations.ts +581 -0
  134. package/src/utils/config.ts +64 -0
  135. package/src/utils/github-setup.ts +558 -0
  136. package/src/utils/idempotency.ts +215 -0
  137. package/src/utils/preflight.ts +306 -0
  138. package/src/utils/versioning.ts +244 -0
  139. package/tests/README.md +229 -0
  140. package/tests/TEST_STRUCTURE.md +256 -0
  141. package/tests/act/run-act-tests.sh +345 -0
  142. package/tests/debugging/debug-utils.ts +538 -0
  143. package/tests/debugging/debug-workflow.test.ts +339 -0
  144. package/tests/debugging/debug-workflows.sh +339 -0
  145. package/tests/debugging/iterative-debug.ts +652 -0
  146. package/tests/debugging/run-debug-tests.sh +431 -0
  147. package/tests/fixtures/basic-config.json +51 -0
  148. package/tests/fixtures/invalid-config.json +9 -0
  149. package/tests/fixtures/pipeline-generated.yml +235 -0
  150. package/tests/fixtures/pipeline-preserve-comments.yml +245 -0
  151. package/tests/fixtures/pipeline-user-modified.yml +245 -0
  152. package/tests/fixtures/test-config.json +58 -0
  153. package/tests/github-live/README.md +250 -0
  154. package/tests/github-local/JOB_WORKFLOW_TESTS.md +296 -0
  155. package/tests/github-local/README.md +240 -0
  156. package/tests/github-local/run-all-tests.sh +422 -0
  157. package/tests/github-local/test-job-workflows.sh +631 -0
  158. package/tests/github-local/test-pipeline-workflow.sh +440 -0
  159. package/tests/integration/generators.test.ts +578 -0
  160. package/tests/integration/path-based-template.test.ts +510 -0
  161. package/tests/integration/simple-path-based.test.ts +415 -0
  162. package/tests/setup.ts +56 -0
  163. package/tests/unit/ast-path-operations-extended.test.ts +302 -0
  164. package/tests/unit/cli.test.ts +541 -0
  165. package/tests/unit/config-extended.test.ts +412 -0
  166. package/tests/unit/config.test.ts +152 -0
  167. package/tests/unit/github-setup.test.ts +189 -0
  168. package/tests/unit/idempotency-isolated.test.ts +297 -0
  169. package/tests/unit/job-order.test.ts +157 -0
  170. package/tests/unit/pipeline-path-based.test.ts +511 -0
  171. package/tests/unit/validate-pipeline.test.ts +384 -0
  172. package/tests/unit/versioning-extended.test.ts +279 -0
  173. package/tests/unit/versioning.test.ts +241 -0
  174. package/tsconfig.debug.json +17 -0
  175. package/tsconfig.json +28 -0
  176. package/vitest.config.ts +51 -0
@@ -0,0 +1,122 @@
1
+ import { toFile, renderTemplate } from '@featherscloud/pinion';
2
+ import fs from 'fs';
3
+ // Template for the Version Calculation GitHub Action
4
+ const versionActionTemplate = (ctx) => {
5
+ return `name: 'Calculate Version'
6
+ description: 'Calculate semantic version using release-it and conventional commits'
7
+ author: 'Pipecraft'
8
+
9
+ inputs:
10
+ baseRef:
11
+ description: 'Base reference for version calculation'
12
+ required: false
13
+ default: 'main'
14
+
15
+ outputs:
16
+ version:
17
+ description: 'The determined version'
18
+ value: \${{ steps.set_version.outputs.version }}
19
+
20
+ runs:
21
+ using: 'composite'
22
+ steps:
23
+ - name: Checkout Code
24
+ uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+
28
+ - name: Install Node.js
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: 22
32
+
33
+ - name: Configure Git
34
+ shell: bash
35
+ run: |
36
+ git config --global user.name "github-actions[bot]"
37
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
38
+
39
+ - name: Get existing version tag
40
+ id: get_version_old
41
+ shell: bash
42
+ run: |
43
+ set -x # Enable debugging output
44
+ # Get the current commit hash
45
+ git rev-parse HEAD
46
+ COMMIT_HASH=$(git rev-parse HEAD)
47
+ echo "Current commit hash: $COMMIT_HASH"
48
+
49
+ # Check for tags on the current commit
50
+ TAG=$(git tag --points-at $COMMIT_HASH | grep -E '^v[0-9]+\\.[0-9]+\\.[0-9]+\\$' || true)
51
+ echo "Tags found: $TAG"
52
+
53
+ if [ -z "$TAG" ]; then
54
+ echo "No existing tag found on the current commit"
55
+ else
56
+ echo "Found existing tag: $TAG"
57
+ echo "version=$TAG" >> $GITHUB_OUTPUT
58
+ fi
59
+
60
+ - name: Set up minimal package.json
61
+ shell: bash
62
+ run: |
63
+ echo '{
64
+ "name": "temporary-lib",
65
+ "version": "0.0.0-release-it"
66
+ }' > package.json
67
+
68
+ - name: Install dependencies
69
+ shell: bash
70
+ run: npm install @release-it/conventional-changelog conventional-changelog-angular
71
+
72
+ - name: Get version
73
+ if: steps.get_version_old.outputs.version == ''
74
+ id: get_version_new
75
+ shell: bash
76
+ run: |
77
+ # Get version and filter out warnings
78
+ RAW_OUTPUT=$(npx release-it --ci --release-version 2>&1 || echo "")
79
+ # Extract just the version number (last line that looks like a version)
80
+ VERSION=$(echo "$RAW_OUTPUT" | grep -E '^[0-9]+\\.[0-9]+\\.[0-9]+' | tail -1 || true)
81
+
82
+ if [[ "$RAW_OUTPUT" == *"No new version to release"* || -z "$VERSION" ]]; then
83
+ echo "No new version to release"
84
+ echo "VERSION=" >> $GITHUB_ENV
85
+ echo "version=" >> $GITHUB_OUTPUT
86
+ else
87
+ echo "New version to release: $VERSION"
88
+ echo "VERSION=v$VERSION" >> $GITHUB_ENV
89
+ echo "version=v$VERSION" >> $GITHUB_OUTPUT
90
+ fi
91
+
92
+ - name: Set version output
93
+ id: set_version
94
+ shell: bash
95
+ run: |
96
+ if [ -n "\${{ steps.get_version_old.outputs.version }}" ]; then
97
+ echo "Using old version: \${{ steps.get_version_old.outputs.version }}"
98
+ echo "version=\${{ steps.get_version_old.outputs.version }}" >> $GITHUB_OUTPUT
99
+ elif [ -n "\${{ steps.get_version_new.outputs.version }}" ]; then
100
+ echo "Using new version: \${{ steps.get_version_new.outputs.version }}"
101
+ echo "version=\${{ steps.get_version_new.outputs.version }}" >> $GITHUB_OUTPUT
102
+ else
103
+ echo "No version determined"
104
+ echo "version=" >> $GITHUB_OUTPUT
105
+ fi
106
+
107
+ - name: Output version
108
+ shell: bash
109
+ run: |
110
+ echo "Version determined: \${{ steps.set_version.outputs.version }}"`;
111
+ };
112
+ export const generate = (ctx) => Promise.resolve(ctx)
113
+ .then((ctx) => {
114
+ // Check if file exists to determine merge status
115
+ const filePath = '.github/actions/calculate-version/action.yml';
116
+ const exists = fs.existsSync(filePath);
117
+ const status = exists ? '🔄 Merged with existing' : '📝 Created new';
118
+ console.log(`${status} ${filePath}`);
119
+ return ctx;
120
+ })
121
+ .then(renderTemplate(versionActionTemplate, toFile('.github/actions/calculate-version/action.yml')));
122
+ //# sourceMappingURL=calculate-version.yml.tpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculate-version.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/actions/calculate-version.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,qDAAqD;AACrD,MAAM,qBAAqB,GAAG,CAAC,GAAQ,EAAE,EAAE;IACzC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAyGoE,CAAA;AAC7E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,iDAAiD;IACjD,MAAM,QAAQ,GAAG,8CAA8C,CAAA;IAC/D,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC;KACD,IAAI,CAAC,cAAc,CAAC,qBAAqB,EAAE,MAAM,CAAC,8CAA8C,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PinionContext } from '@featherscloud/pinion';
2
+ export declare const generate: (ctx: PinionContext) => Promise<any>;
3
+ //# sourceMappingURL=create-pr.yml.tpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-pr.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/actions/create-pr.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAwI7E,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAUsD,CAAA"}
@@ -0,0 +1,145 @@
1
+ import { toFile, renderTemplate } from '@featherscloud/pinion';
2
+ import fs from 'fs';
3
+ import dedent from 'dedent';
4
+ // Template for the Create PR GitHub Action
5
+ const createprActionTemplate = (ctx) => {
6
+ return dedent `name: 'Create Pull Request'
7
+ description: 'Create a pull request between source and target branches'
8
+ author: 'Pipecraft'
9
+
10
+ inputs:
11
+ sourceBranch:
12
+ description: 'Source branch for the PR'
13
+ required: true
14
+ targetBranch:
15
+ description: 'Target branch for the PR'
16
+ required: true
17
+ title:
18
+ description: 'Title for the PR'
19
+ required: true
20
+ body:
21
+ description: 'Body/description for the PR'
22
+ required: false
23
+ labels:
24
+ description: 'Comma-separated list of labels'
25
+ required: false
26
+ token:
27
+ description: 'GitHub token for authentication'
28
+ required: false
29
+ default: \${{ github.token }}
30
+
31
+ outputs:
32
+ prNumber:
33
+ description: 'The created PR number'
34
+ value: \${{ steps.create-pr.outputs.prNumber }}
35
+ prUrl:
36
+ description: 'The created PR URL'
37
+ value: \${{ steps.create-pr.outputs.prUrl }}
38
+
39
+ runs:
40
+ using: 'composite'
41
+ steps:
42
+ - name: Checkout Code
43
+ uses: actions/checkout@v4
44
+ with:
45
+ fetch-depth: 0
46
+ token: \${{ inputs.token }}
47
+
48
+ - name: Check if PR Already Exists
49
+ id: check-existing-pr
50
+ shell: bash
51
+ run: |
52
+ SOURCE="\${{ inputs.sourceBranch }}"
53
+ TARGET="\${{ inputs.targetBranch }}"
54
+
55
+ # Check if PR already exists
56
+ EXISTING_PR=$(gh pr list --head "\$SOURCE" --base "\$TARGET" --json number --jq '.[0].number' 2>/dev/null || echo "")
57
+
58
+ if [ -n "\$EXISTING_PR" ]; then
59
+ echo "exists=true" >> \$GITHUB_OUTPUT
60
+ echo "pr_number=\$EXISTING_PR" >> \$GITHUB_OUTPUT
61
+ echo "⚠️ PR already exists: #\$EXISTING_PR"
62
+ else
63
+ echo "exists=false" >> \$GITHUB_OUTPUT
64
+ echo "✅ No existing PR found"
65
+ fi
66
+
67
+ - name: Create Pull Request
68
+ if: steps.check-existing-pr.outputs.exists == 'false'
69
+ id: create-pr
70
+ shell: bash
71
+ run: |
72
+ SOURCE="\${{ inputs.sourceBranch }}"
73
+ TARGET="\${{ inputs.targetBranch }}"
74
+ TITLE="\${{ inputs.title }}"
75
+ BODY="\${{ inputs.body }}"
76
+ LABELS="\${{ inputs.labels }}"
77
+
78
+ # Prepare labels array
79
+ LABEL_ARGS=""
80
+ if [ -n "\$LABELS" ]; then
81
+ IFS=',' read -ra LABEL_ARRAY <<< "\$LABELS"
82
+ for label in "\${LABEL_ARRAY[@]}"; do
83
+ LABEL_ARGS="\$LABEL_ARGS --label \"\${label// /}\""
84
+ done
85
+ fi
86
+
87
+ # Create the PR
88
+ PR_OUTPUT=$(gh pr create \\
89
+ --title "\$TITLE" \\
90
+ --body "\$BODY" \\
91
+ --head "\$SOURCE" \\
92
+ --base "\$TARGET" \\
93
+ \$LABEL_ARGS \\
94
+ --json number,url --jq '.number,.url' 2>&1)
95
+
96
+ if echo "\$PR_OUTPUT" | grep -q '"number":'; then
97
+ PR_NUMBER=$(echo "\$PR_OUTPUT" | jq -r '.number')
98
+ PR_URL=$(echo "\$PR_OUTPUT" | jq -r '.url')
99
+ echo "prNumber=\$PR_NUMBER" >> \$GITHUB_OUTPUT
100
+ echo "prUrl=\$PR_URL" >> \$GITHUB_OUTPUT
101
+ echo "✅ Created PR #\$PR_NUMBER"
102
+ echo "🔗 URL: \$PR_URL"
103
+ else
104
+ echo "❌ Failed to create PR"
105
+ echo "Error output:"
106
+ echo "\$PR_OUTPUT"
107
+ exit 1
108
+ fi
109
+
110
+ - name: Use Existing PR
111
+ if: steps.check-existing-pr.outputs.exists == 'true'
112
+ id: use-existing-pr
113
+ shell: bash
114
+ run: |
115
+ PR_NUMBER="\${{ steps.check-existing-pr.outputs.pr_number }}"
116
+ PR_URL="https://github.com/\${{ github.repository }}/pull/\$PR_NUMBER"
117
+ echo "prNumber=\$PR_NUMBER" >> \$GITHUB_OUTPUT
118
+ echo "prUrl=\$PR_URL" >> \$GITHUB_OUTPUT
119
+ echo "✅ Using existing PR #\$PR_NUMBER"
120
+ echo "🔗 URL: \$PR_URL"
121
+
122
+ - name: Action Summary
123
+ shell: bash
124
+ run: |
125
+ if [ "\${{ steps.create-pr.outputs.prNumber }}" != "" ]; then
126
+ echo "✅ Successfully created PR #\${{ steps.create-pr.outputs.prNumber }}"
127
+ echo "🔗 URL: \${{ steps.create-pr.outputs.prUrl }}"
128
+ elif [ "\${{ steps.use-existing-pr.outputs.prNumber }}" != "" ]; then
129
+ echo "ℹ️ Using existing PR #\${{ steps.use-existing-pr.outputs.prNumber }}"
130
+ echo "🔗 URL: \${{ steps.use-existing-pr.outputs.prUrl }}"
131
+ else
132
+ echo "❌ No PR created or found"
133
+ fi`;
134
+ };
135
+ export const generate = (ctx) => Promise.resolve(ctx)
136
+ .then((ctx) => {
137
+ // Check if file exists to determine merge status
138
+ const filePath = '.github/actions/create-pr/action.yml';
139
+ const exists = fs.existsSync(filePath);
140
+ const status = exists ? '🔄 Merged with existing' : '📝 Created new';
141
+ console.log(`${status} ${filePath}`);
142
+ return ctx;
143
+ })
144
+ .then(renderTemplate(createprActionTemplate, toFile('.github/actions/create-pr/action.yml')));
145
+ //# sourceMappingURL=create-pr.yml.tpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-pr.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/actions/create-pr.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,2CAA2C;AAC3C,MAAM,sBAAsB,GAAG,CAAC,GAAQ,EAAE,EAAE;IAC1C,OAAO,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA+HA,CAAA;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,iDAAiD;IACjD,MAAM,QAAQ,GAAG,sCAAsC,CAAA;IACvD,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC;KACD,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PinionContext } from '@featherscloud/pinion';
2
+ export declare const generate: (ctx: PinionContext) => Promise<any>;
3
+ //# sourceMappingURL=create-tag.yml.tpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-tag.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/actions/create-tag.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAqG7E,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAUkD,CAAA"}
@@ -0,0 +1,111 @@
1
+ import { toFile, renderTemplate } from '@featherscloud/pinion';
2
+ import fs from 'fs';
3
+ import dedent from 'dedent';
4
+ // Template for the Tag GitHub Action
5
+ const tagActionTemplate = (ctx) => {
6
+ return dedent `name: 'Tag Version'
7
+ description: 'Create and push a Git tag for a given version'
8
+ author: 'Pipecraft'
9
+
10
+ inputs:
11
+ version:
12
+ description: 'Version to tag'
13
+ required: true
14
+ tag_prefix:
15
+ description: 'Prefix for the tag (e.g., v)'
16
+ required: false
17
+ default: 'v'
18
+ push:
19
+ description: 'Whether to push the tag to remote'
20
+ required: false
21
+ default: 'true'
22
+
23
+ outputs:
24
+ tag_name:
25
+ description: 'The created tag name'
26
+ value: \${{ steps.tag.outputs.tag_name }}
27
+ success:
28
+ description: 'Whether the tag was created successfully'
29
+ value: \${{ steps.tag.outputs.success }}
30
+
31
+ runs:
32
+ using: 'composite'
33
+ steps:
34
+ - name: Validate Inputs
35
+ id: validate
36
+ shell: bash
37
+ run: |
38
+ if [ -z "\${{ inputs.version }}" ]; then
39
+ echo "❌ Version is required"
40
+ exit 1
41
+ fi
42
+
43
+ # Strip v prefix if present and validate version format
44
+ VERSION="\${{ inputs.version }}"
45
+ VERSION="\${VERSION#v}" # Remove v prefix
46
+
47
+ if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
48
+ echo "❌ Version must be in format [v]x.y.z (e.g., 1.0.0 or v1.0.0)"
49
+ exit 1
50
+ fi
51
+
52
+ echo "✅ Version format is valid: $VERSION"
53
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
54
+
55
+ - name: Configure Git
56
+ shell: bash
57
+ run: |
58
+ git config user.name "github-actions[bot]"
59
+ git config user.email "github-actions[bot]@users.noreply.github.com"
60
+
61
+ - name: Create Tag
62
+ id: tag
63
+ shell: bash
64
+ run: |
65
+ VERSION="\${{ steps.validate.outputs.version }}"
66
+ PREFIX="\${{ inputs.tag_prefix }}"
67
+ TAG_NAME="\${PREFIX}\${VERSION}"
68
+
69
+ # Check if tag already exists
70
+ if git tag -l | grep -q "^\${TAG_NAME}$"; then
71
+ echo "⚠️ Tag \${TAG_NAME} already exists"
72
+ echo "tag_name=\${TAG_NAME}" >> \$GITHUB_OUTPUT
73
+ echo "success=false" >> \$GITHUB_OUTPUT
74
+ exit 0
75
+ fi
76
+
77
+ # Create the tag
78
+ git tag -a "\${TAG_NAME}" -m "Release \${TAG_NAME}"
79
+ echo "✅ Created tag: \${TAG_NAME}"
80
+
81
+ echo "tag_name=\${TAG_NAME}" >> \$GITHUB_OUTPUT
82
+ echo "success=true" >> \$GITHUB_OUTPUT
83
+
84
+ - name: Push Tag
85
+ if: steps.tag.outputs.success == 'true' && inputs.push == 'true'
86
+ shell: bash
87
+ run: |
88
+ TAG_NAME="\${{ steps.tag.outputs.tag_name }}"
89
+ git push origin "\${TAG_NAME}"
90
+ echo "✅ Pushed tag \${TAG_NAME} to remote"
91
+
92
+ - name: Action Summary
93
+ shell: bash
94
+ run: |
95
+ if [ "\${{ steps.tag.outputs.success }}" == "true" ]; then
96
+ echo "✅ Successfully created and pushed tag: \${{ steps.tag.outputs.tag_name }}"
97
+ else
98
+ echo "❌ Failed to create tag: \${{ steps.tag.outputs.tag_name }}"
99
+ fi`;
100
+ };
101
+ export const generate = (ctx) => Promise.resolve(ctx)
102
+ .then((ctx) => {
103
+ // Check if file exists to determine merge status
104
+ const filePath = '.github/actions/create-tag/action.yml';
105
+ const exists = fs.existsSync(filePath);
106
+ const status = exists ? '🔄 Merged with existing' : '📝 Created new';
107
+ console.log(`${status} ${filePath}`);
108
+ return ctx;
109
+ })
110
+ .then(renderTemplate(tagActionTemplate, toFile('.github/actions/create-tag/action.yml')));
111
+ //# sourceMappingURL=create-tag.yml.tpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-tag.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/actions/create-tag.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,qCAAqC;AACrC,MAAM,iBAAiB,GAAG,CAAC,GAAQ,EAAE,EAAE;IACrC,OAAO,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6FA,CAAA;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,iDAAiD;IACjD,MAAM,QAAQ,GAAG,uCAAuC,CAAA;IACxD,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC;KACD,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PinionContext } from '@featherscloud/pinion';
2
+ export declare const generate: (ctx: PinionContext) => Promise<any>;
3
+ //# sourceMappingURL=detect-changes.yml.tpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-changes.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/actions/detect-changes.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AA4E7E,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAU0D,CAAA"}
@@ -0,0 +1,79 @@
1
+ import { toFile, renderTemplate } from '@featherscloud/pinion';
2
+ import fs from 'fs';
3
+ // Template for the Changes Detection GitHub Action
4
+ const changesActionTemplate = (ctx) => {
5
+ const domainOutputs = Object.entries(ctx.domains).map((entry) => {
6
+ const [domainName, domainConfig] = entry;
7
+ return ` ${domainName}:
8
+ description: 'Whether ${domainName} domain has changes'
9
+ value: \${{ steps.merge.outputs.${domainName} }}`;
10
+ }).join('\n');
11
+ const domainFilters = Object.entries(ctx.domains).map((entry) => {
12
+ const [domainName, domainConfig] = entry;
13
+ return ` ${domainName}:\n - '${domainConfig.paths.join("'\\n - '")}'`;
14
+ }).join('\n');
15
+ const domainEchoes = Object.entries(ctx.domains).map((entry) => {
16
+ const [domainName, domainConfig] = entry;
17
+ return ` echo "${domainName}=\${{ contains(steps.filter.outputs.changes, '${domainName}') }}" >> $GITHUB_OUTPUT`;
18
+ }).join('\n');
19
+ const domainResults = Object.entries(ctx.domains).map((entry) => {
20
+ const [domainName, domainConfig] = entry;
21
+ return ` echo " ${domainName}: \${{ contains(steps.filter.outputs.changes, '${domainName}') }}"`;
22
+ }).join('\n');
23
+ return `name: 'Detect Changes'
24
+ description: 'Detect changes in different application domains based on file paths'
25
+ author: 'Pipecraft'
26
+
27
+ inputs:
28
+ baseRef:
29
+ description: 'Base reference to compare against'
30
+ required: false
31
+ default: 'main'
32
+
33
+ outputs:
34
+ ${domainOutputs}
35
+
36
+ runs:
37
+ using: 'composite'
38
+ steps:
39
+ - name: Checkout Code
40
+ uses: actions/checkout@v4
41
+ with:
42
+ fetch-depth: 0
43
+
44
+ - name: Set Base Branch
45
+ id: set-base
46
+ shell: bash
47
+ run: |
48
+ base_branch=\${{ inputs.baseRef || 'main' }}
49
+ echo "base_branch=$base_branch" >> $GITHUB_OUTPUT
50
+ echo "base_branch=$base_branch" >> $GITHUB_ENV
51
+
52
+ - name: Detect Changes
53
+ uses: dorny/paths-filter@v3
54
+ id: filter
55
+ with:
56
+ base: \${{ steps.set-base.outputs.base_branch }}
57
+ filters: |
58
+ ${domainFilters}
59
+
60
+ - name: Merge filter outputs
61
+ id: merge
62
+ shell: bash
63
+ run: |
64
+ ${domainEchoes}
65
+
66
+ echo "📋 Change Detection Results:"
67
+ ${domainResults}`;
68
+ };
69
+ export const generate = (ctx) => Promise.resolve(ctx)
70
+ .then((ctx) => {
71
+ // Check if file exists to determine merge status
72
+ const filePath = '.github/actions/detect-changes/action.yml';
73
+ const exists = fs.existsSync(filePath);
74
+ const status = exists ? '🔄 Merged with existing' : '📝 Created new';
75
+ console.log(`${status} ${filePath}`);
76
+ return ctx;
77
+ })
78
+ .then(renderTemplate(changesActionTemplate, toFile('.github/actions/detect-changes/action.yml')));
79
+ //# sourceMappingURL=detect-changes.yml.tpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-changes.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/actions/detect-changes.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,MAAM,IAAI,CAAA;AAInB,mDAAmD;AACnD,MAAM,qBAAqB,GAAG,CAAC,GAAQ,EAAE,EAAE;IACzC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9D,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,KAA+B,CAAC;QACnE,OAAO,KAAK,UAAU;4BACE,UAAU;sCACA,UAAU,KAAK,CAAC;IACpD,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9D,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,KAA+B,CAAC;QACnE,OAAO,aAAa,UAAU,qBAAqB,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC;IACvG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7D,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,KAA+B,CAAC;QACnE,OAAO,iBAAiB,UAAU,iDAAiD,UAAU,0BAA0B,CAAA;IACzH,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9D,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,KAA+B,CAAC;QACnE,OAAO,mBAAmB,UAAU,kDAAkD,UAAU,QAAQ,CAAA;IAC1G,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;;;;;;;EAWP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;EAwBb,aAAa;;;;;;EAMb,YAAY;;;EAGZ,aAAa,EAAE,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,iDAAiD;IACjD,MAAM,QAAQ,GAAG,2CAA2C,CAAA;IAC5D,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC;KACD,IAAI,CAAC,cAAc,CAAC,qBAAqB,EAAE,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PinionContext } from '@featherscloud/pinion';
2
+ export declare const generate: (ctx: PinionContext) => Promise<any>;
3
+ //# sourceMappingURL=manage-branch.yml.tpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manage-branch.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/actions/manage-branch.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAyH7E,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAUwD,CAAA"}
@@ -0,0 +1,130 @@
1
+ import { toFile, renderTemplate } from '@featherscloud/pinion';
2
+ import fs from 'fs';
3
+ import dedent from 'dedent';
4
+ // Template for the Branch Management GitHub Action
5
+ const branchActionTemplate = (ctx) => {
6
+ return dedent `name: 'Branch Management'
7
+ description: 'Manage branches (fast-forward, create, delete)'
8
+ author: 'Pipecraft'
9
+
10
+ inputs:
11
+ action:
12
+ description: 'Action to perform (fast-forward, create, delete)'
13
+ required: true
14
+ targetBranch:
15
+ description: 'Target branch for the action'
16
+ required: true
17
+ sourceBranch:
18
+ description: 'Source branch for the action'
19
+ required: false
20
+ branchName:
21
+ description: 'Name for new branch (for create action)'
22
+ required: false
23
+
24
+ outputs:
25
+ success:
26
+ description: 'Whether the action was successful'
27
+ value: \${{ steps.branch-action.outputs.success }}
28
+ message:
29
+ description: 'Result message'
30
+ value: \${{ steps.branch-action.outputs.message }}
31
+
32
+ runs:
33
+ using: 'composite'
34
+ steps:
35
+ - name: Checkout Code
36
+ uses: actions/checkout@v4
37
+ with:
38
+ fetch-depth: 0
39
+ token: \${{ inputs.token }}
40
+
41
+ - name: Validate Inputs
42
+ id: validate
43
+ shell: bash
44
+ run: |
45
+ ACTION="\${{ inputs.action }}"
46
+ TARGET="\${{ inputs.targetBranch }}"
47
+ SOURCE="\${{ inputs.sourceBranch }}"
48
+ BRANCH_NAME="\${{ inputs.branchName }}"
49
+
50
+ case "\$ACTION" in
51
+ "fast-forward")
52
+ if [ -z "\$SOURCE" ]; then
53
+ echo "❌ Source branch is required for fast-forward"
54
+ exit 1
55
+ fi
56
+ ;;
57
+ "create")
58
+ if [ -z "\$BRANCH_NAME" ]; then
59
+ echo "❌ Branch name is required for create action"
60
+ exit 1
61
+ fi
62
+ ;;
63
+ "delete")
64
+ if [ -z "\$TARGET" ]; then
65
+ echo "❌ Target branch is required for delete action"
66
+ exit 1
67
+ fi
68
+ ;;
69
+ *)
70
+ echo "❌ Invalid action: \$ACTION. Must be fast-forward, create, or delete"
71
+ exit 1
72
+ ;;
73
+ esac
74
+
75
+ echo "✅ Input validation passed"
76
+
77
+ - name: Perform Branch Action
78
+ id: branch-action
79
+ shell: bash
80
+ run: |
81
+ ACTION="\${{ inputs.action }}"
82
+ TARGET="\${{ inputs.targetBranch }}"
83
+ SOURCE="\${{ inputs.sourceBranch }}"
84
+ BRANCH_NAME="\${{ inputs.branchName }}"
85
+
86
+ case "\$ACTION" in
87
+ "fast-forward")
88
+ echo "🔄 Fast-forwarding \$TARGET to \$SOURCE"
89
+ git checkout "\$TARGET"
90
+ git merge --ff-only "\$SOURCE"
91
+ git push origin "\$TARGET"
92
+ echo "success=true" >> \$GITHUB_OUTPUT
93
+ echo "message=Successfully fast-forwarded \$TARGET to \$SOURCE" >> \$GITHUB_OUTPUT
94
+ ;;
95
+ "create")
96
+ echo "🌱 Creating branch \$BRANCH_NAME from \$TARGET"
97
+ git checkout "\$TARGET"
98
+ git checkout -b "\$BRANCH_NAME"
99
+ git push -u origin "\$BRANCH_NAME"
100
+ echo "success=true" >> \$GITHUB_OUTPUT
101
+ echo "message=Successfully created branch \$BRANCH_NAME" >> \$GITHUB_OUTPUT
102
+ ;;
103
+ "delete")
104
+ echo "🗑️ Deleting branch \$TARGET"
105
+ git push origin --delete "\$TARGET"
106
+ echo "success=true" >> \$GITHUB_OUTPUT
107
+ echo "message=Successfully deleted branch \$TARGET" >> \$GITHUB_OUTPUT
108
+ ;;
109
+ esac
110
+
111
+ - name: Action Summary
112
+ shell: bash
113
+ run: |
114
+ if [ "\${{ steps.branch-action.outputs.success }}" == "true" ]; then
115
+ echo "✅ \${{ steps.branch-action.outputs.message }}"
116
+ else
117
+ echo "❌ \${{ steps.branch-action.outputs.message }}"
118
+ fi`;
119
+ };
120
+ export const generate = (ctx) => Promise.resolve(ctx)
121
+ .then((ctx) => {
122
+ // Check if file exists to determine merge status
123
+ const filePath = '.github/actions/manage-branch/action.yml';
124
+ const exists = fs.existsSync(filePath);
125
+ const status = exists ? '🔄 Merged with existing' : '📝 Created new';
126
+ console.log(`${status} ${filePath}`);
127
+ return ctx;
128
+ })
129
+ .then(renderTemplate(branchActionTemplate, toFile('.github/actions/manage-branch/action.yml')));
130
+ //# sourceMappingURL=manage-branch.yml.tpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manage-branch.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/actions/manage-branch.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,mDAAmD;AACnD,MAAM,oBAAoB,GAAG,CAAC,GAAQ,EAAE,EAAE;IACxC,OAAO,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgHA,CAAA;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,iDAAiD;IACjD,MAAM,QAAQ,GAAG,0CAA0C,CAAA;IAC3D,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC;KACD,IAAI,CAAC,cAAc,CAAC,oBAAoB,EAAE,MAAM,CAAC,0CAA0C,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PinionContext } from '@featherscloud/pinion';
2
+ export declare const generate: (ctx: PinionContext) => Promise<any>;
3
+ //# sourceMappingURL=promote-branch.yml.tpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promote-branch.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/actions/promote-branch.yml.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAiW7E,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAUgE,CAAA"}