Skip to content

Commit d425434

Browse files
authored
Merge pull request #29 from Sehnya/temp-merge-pr16
Temp merge pr16
2 parents 60bdd50 + 1f77430 commit d425434

58 files changed

Lines changed: 5400 additions & 355 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Thank you for your interest in contributing to Peezy CLI! This document provides
5151
```bash
5252
npm test # Run all tests
5353
npm run build # Build TypeScript
54-
npm run pre-flight # Run pre-flight checks
54+
npm run check # Run comprehensive checks
5555
```
5656

5757
4. **Commit your changes**

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Fixes #(issue number)
4646
```bash
4747
npm test
4848
npm run build
49-
npm run pre-flight
49+
npm run check
5050
```
5151

5252
## Template Changes (if applicable)

.github/workflows/branch-protection.yml

Lines changed: 80 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -19,96 +19,100 @@ jobs:
1919

2020
- name: Setup Branch Protection Rules
2121
uses: actions/github-script@v7
22+
continue-on-error: true # Don't fail if permissions are insufficient
2223
with:
2324
github-token: ${{ secrets.GITHUB_TOKEN }}
24-
continue-on-error: true # Don't fail if permissions are insufficient
25-
script: |
26-
const owner = context.repo.owner;
27-
const repo = context.repo.repo;
28-
29-
// Main branch protection rules
30-
const mainProtection = {
31-
required_status_checks: {
32-
strict: true,
33-
contexts: [
34-
'test (20.x)',
35-
'test (22.x)',
36-
'security',
37-
'code-quality',
38-
'compatibility (ubuntu-latest, 20.x)',
39-
'compatibility (windows-latest, 20.x)',
40-
'compatibility (macos-latest, 20.x)'
41-
]
42-
},
43-
enforce_admins: false, // Allow admins to bypass for emergency fixes
44-
required_pull_request_reviews: {
45-
required_approving_review_count: 1,
46-
dismiss_stale_reviews: true,
47-
require_code_owner_reviews: false,
48-
require_last_push_approval: false
49-
},
50-
restrictions: null, // No user/team restrictions
51-
allow_force_pushes: false,
52-
allow_deletions: false,
53-
block_creations: false,
54-
required_conversation_resolution: true,
55-
lock_branch: false,
56-
allow_fork_syncing: true
57-
};
58-
59-
try {
60-
await github.rest.repos.updateBranchProtection({
61-
owner,
62-
repo,
63-
branch: 'main',
64-
...mainProtection
65-
});
66-
console.log('✅ Main branch protection rules updated successfully');
67-
} catch (error) {
68-
console.error('❌ Failed to update main branch protection:', error.message);
69-
// Don't fail the workflow if branch protection can't be set
70-
// This might happen due to permissions or repository settings
71-
}
25+
script: |
26+
const owner = context.repo.owner;
27+
const repo = context.repo.repo;
7228
73-
// Develop branch protection rules (if it exists)
74-
try {
75-
await github.rest.repos.getBranch({
76-
owner,
77-
repo,
78-
branch: 'develop'
79-
});
80-
81-
const developProtection = {
29+
// Main branch protection rules
30+
const mainProtection = {
8231
required_status_checks: {
8332
strict: true,
8433
contexts: [
8534
'test (20.x)',
35+
'test (22.x)',
8636
'security',
87-
'code-quality'
37+
'code-quality',
38+
'compatibility (ubuntu-latest, 20.x)',
39+
'compatibility (windows-latest, 20.x)',
40+
'compatibility (macos-latest, 20.x)',
41+
'pr-validation',
42+
'template-integrity',
43+
'version-consistency',
44+
'registry-validation'
8845
]
8946
},
90-
enforce_admins: false,
47+
enforce_admins: false, // Allow admins to bypass for emergency fixes
9148
required_pull_request_reviews: {
9249
required_approving_review_count: 1,
93-
dismiss_stale_reviews: false,
94-
require_code_owner_reviews: false
50+
dismiss_stale_reviews: true,
51+
require_code_owner_reviews: false,
52+
require_last_push_approval: false
9553
},
96-
restrictions: null,
54+
restrictions: null, // No user/team restrictions
9755
allow_force_pushes: false,
98-
allow_deletions: false
56+
allow_deletions: false,
57+
block_creations: false,
58+
required_conversation_resolution: true,
59+
lock_branch: false,
60+
allow_fork_syncing: true
9961
};
10062
101-
await github.rest.repos.updateBranchProtection({
102-
owner,
103-
repo,
104-
branch: 'develop',
105-
...developProtection
106-
});
107-
console.log('✅ Develop branch protection rules updated successfully');
108-
} catch (error) {
109-
if (error.status === 404) {
110-
console.log('ℹ️ Develop branch does not exist, skipping protection setup');
111-
} else {
112-
console.error('❌ Failed to update develop branch protection:', error.message);
63+
try {
64+
await github.rest.repos.updateBranchProtection({
65+
owner,
66+
repo,
67+
branch: 'main',
68+
...mainProtection
69+
});
70+
console.log('✅ Main branch protection rules updated successfully');
71+
} catch (error) {
72+
console.error('❌ Failed to update main branch protection:', error.message);
73+
// Don't fail the workflow if branch protection can't be set
74+
// This might happen due to permissions or repository settings
75+
}
76+
77+
// Develop branch protection rules (if it exists)
78+
try {
79+
await github.rest.repos.getBranch({
80+
owner,
81+
repo,
82+
branch: 'develop'
83+
});
84+
85+
const developProtection = {
86+
required_status_checks: {
87+
strict: true,
88+
contexts: [
89+
'test (20.x)',
90+
'security',
91+
'code-quality'
92+
]
93+
},
94+
enforce_admins: false,
95+
required_pull_request_reviews: {
96+
required_approving_review_count: 1,
97+
dismiss_stale_reviews: false,
98+
require_code_owner_reviews: false
99+
},
100+
restrictions: null,
101+
allow_force_pushes: false,
102+
allow_deletions: false
103+
};
104+
105+
await github.rest.repos.updateBranchProtection({
106+
owner,
107+
repo,
108+
branch: 'develop',
109+
...developProtection
110+
});
111+
console.log('✅ Develop branch protection rules updated successfully');
112+
} catch (error) {
113+
if (error.status === 404) {
114+
console.log('ℹ️ Develop branch does not exist, skipping protection setup');
115+
} else {
116+
console.error('❌ Failed to update develop branch protection:', error.message);
117+
}
113118
}
114-
}

.github/workflows/ci.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,23 +193,33 @@ jobs:
193193
- name: Check TypeScript types
194194
run: npx tsc --noEmit
195195

196-
- name: Run pre-flight checks
197-
run: npm run pre-flight
196+
- name: Run comprehensive checks
197+
run: npm run check
198198

199199
- name: Test template structures
200200
run: |
201-
# Verify hero templates have required directories
202-
test -d templates/nextjs-fullstack/src/components
203-
test -d templates/nextjs-fullstack/src/app
204-
test -d templates/nextjs-fullstack/public
205-
206-
test -d templates/express-fullstack/src/client/components
207-
test -d templates/express-fullstack/src/client/pages
208-
test -d templates/express-fullstack/public
201+
echo "🔍 Testing template structures..."
209202
210-
test -d templates/react-spa-advanced/src/components
211-
test -d templates/react-spa-advanced/src/pages
212-
test -d templates/react-spa-advanced/public
203+
# Verify hero templates have required directories
204+
echo "Checking nextjs-fullstack..."
205+
test -d templates/nextjs-fullstack/src/components || { echo "❌ Missing components dir"; exit 1; }
206+
test -d templates/nextjs-fullstack/src/app || { echo "❌ Missing app dir"; exit 1; }
207+
test -d templates/nextjs-fullstack/public || { echo "❌ Missing public dir"; exit 1; }
208+
echo "✅ nextjs-fullstack structure valid"
209+
210+
echo "Checking express-fullstack..."
211+
test -d templates/express-fullstack/src/client/components || { echo "❌ Missing client components dir"; exit 1; }
212+
test -d templates/express-fullstack/src/client/pages || { echo "❌ Missing client pages dir"; exit 1; }
213+
test -d templates/express-fullstack/public || { echo "❌ Missing public dir"; exit 1; }
214+
echo "✅ express-fullstack structure valid"
215+
216+
echo "Checking react-spa-advanced..."
217+
test -d templates/react-spa-advanced/src/components || { echo "❌ Missing components dir"; exit 1; }
218+
test -d templates/react-spa-advanced/src/pages || { echo "❌ Missing pages dir"; exit 1; }
219+
test -d templates/react-spa-advanced/public || { echo "❌ Missing public dir"; exit 1; }
220+
echo "✅ react-spa-advanced structure valid"
221+
222+
echo "✅ All template structures validated"
213223
214224
compatibility:
215225
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)