Skip to content

Commit 49bb496

Browse files
authored
Merge branch 'main' into finnish-update
2 parents 2d9d705 + f1904b9 commit 49bb496

File tree

1,097 files changed

+29875
-13962
lines changed

Some content is hidden

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

1,097 files changed

+29875
-13962
lines changed

.claude/commands/commit.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git diff:*), Bash(git commit:*)
3+
description: Generate a Ghost-style commit message and optionally commit changes
4+
---
5+
6+
## Context
7+
- Current git status: !`git status`
8+
- Current git diff (staged and unstaged changes): !`git diff HEAD`
9+
- Stage modified files: !`git add`
10+
11+
## Your task
12+
13+
Create a commit message following Ghost's commit conventions:
14+
15+
1. Based on the uncommitted changes shown above, draft a commit message following the format and style described in @.github/CONTRIBUTING.md
16+
2. Show the commit message to the user
17+
3. Ask: "Would you like me to commit these changes? (yes/no)"
18+
4. If the user says yes:
19+
- Stage all modified files
20+
- Commit using the generated message
21+
- Run current git status to confirm
22+
5. If a user says no, just stop
23+
24+
Important:
25+
- DO NOT push to remote unless explicitly asked
26+
- Follow the exact Ghost commit format

.docker/minio/setup.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
set -euo pipefail
3+
4+
BUCKET=${MINIO_BUCKET:-ghost-dev}
5+
6+
echo "Configuring MinIO alias..."
7+
mc alias set local http://minio:9000 "${MINIO_ROOT_USER}" "${MINIO_ROOT_PASSWORD}"
8+
9+
echo "Ensuring bucket '${BUCKET}' exists..."
10+
mc mb --ignore-existing "local/${BUCKET}"
11+
12+
echo "Setting anonymous download policy on '${BUCKET}'..."
13+
mc anonymous set download "local/${BUCKET}"
14+
15+
echo "MinIO bucket '${BUCKET}' ready."

.dockerignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Dockerfile
2424
.editorconfig
2525
compose.yml
2626

27-
.docker
28-
!.docker/**/*.entrypoint.sh
29-
!.docker/**/*entrypoint.sh
27+
docker
28+
!docker/**/*.entrypoint.sh
29+
!docker/**/*entrypoint.sh
3030

3131
ghost/core/core/built/admin
3232

.github/CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ On your local repository, you should always work on a branch to make keeping up-
3131

3232
We have a handful of simple standards for commit messages which help us to generate readable changelogs. Please follow this wherever possible and mention the associated issue number.
3333

34-
- **1st line:** Max 80 character summary written in past tense
34+
- **1st line:** Max 80 character summary
35+
- Written in past tense e.g. “Fixed the thing” not “Fixes the thing”
36+
- Start with one of: Fixed, Changed, Updated, Improved, Added, Removed, Reverted, Moved, Released, Bumped, Cleaned
3537
- **2nd line:** [Always blank]
3638
- **3rd line:** `ref <issue link>`, `fixes <issue link>`, `closes <issue link>` or blank
3739
- **4th line:** Why this change was made - the code includes the what, the commit message should describe the context of why - why this, why now, why not something else?

.github/hooks/pre-commit

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ else
5050
fi
5151

5252
##
53-
## 2) Suggest shipping a new version of @tryghost/admin-x-activitypub when changes are detected
53+
## 2) Suggest shipping a new version of @tryghost/activitypub when changes are detected
5454
## The intent is to ship smaller changes more frequently to production
5555
##
5656

@@ -88,14 +88,14 @@ AP_BUMP_NEEDED=false
8888
MODIFIED_FILES=$(git diff --cached --name-only)
8989

9090
for FILE in $MODIFIED_FILES; do
91-
if [[ "$FILE" == apps/admin-x-activitypub/* ]]; then
91+
if [[ "$FILE" == apps/activitypub/* ]]; then
9292
AP_BUMP_NEEDED=true
9393
break
9494
fi
9595
done
9696

9797
if [[ "$AP_BUMP_NEEDED" == true ]]; then
98-
echo -e "\nYou have made changes to @tryghost/admin-x-activitypub."
98+
echo -e "\nYou have made changes to @tryghost/activitypub."
9999
echo -e "Would you like to ship a new version? (yes)"
100100
read -r new_version </dev/tty
101101

@@ -112,8 +112,8 @@ if [[ "$AP_BUMP_NEEDED" == true ]]; then
112112
echo -e "${red}Invalid input. Skipping version bump.${no_color}"
113113
else
114114
echo "Bumping version ($version_type)..."
115-
increment_version "apps/admin-x-activitypub/package.json" "$version_type"
116-
git add apps/admin-x-activitypub/package.json
115+
increment_version "apps/activitypub/package.json" "$version_type"
116+
git add apps/activitypub/package.json
117117
fi
118118
fi
119119
fi

.github/renovate.json5

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
],
55
// This reduces PR churn when managing lots of dependencies
66
"rebaseWhen": "never",
7+
// We have to disable platform based automerge (forcing renovate to do it manually)
8+
// as otherwise renovate wont follow our schedule
9+
"platformAutomerge": false,
10+
"timezone": "Etc/UTC",
711
"automergeSchedule": [
8-
// Allow automerge From 5pm Friday til midday Monday
9-
"* 17-23 * * 5",
10-
"* * * * 0,6,",
12+
// Allow automerge all weekend: Saturday, Sunday, and Monday morning
13+
"* * * * 0,6",
1114
"* 0-12 * * 1"
1215
],
1316
"ignoreDeps": [

.github/scripts/dev.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const COMMAND_BROWSERTESTS = {
109109
env: {}
110110
};
111111

112-
const adminXApps = '@tryghost/admin-x-settings,@tryghost/admin-x-activitypub,@tryghost/posts,@tryghost/stats';
112+
const adminXApps = '@tryghost/admin-x-settings,@tryghost/activitypub,@tryghost/posts,@tryghost/stats';
113113

114114
const COMMANDS_ADMINX = [{
115115
name: 'adminXDeps',
@@ -280,13 +280,6 @@ async function handleStripe() {
280280
}
281281
debug('at least one command provided');
282282

283-
debug('resetting nx');
284-
process.env.NX_DISABLE_DB = "true";
285-
await exec("yarn nx reset --onlyDaemon");
286-
debug('nx reset');
287-
await exec("yarn nx daemon --start");
288-
debug('nx daemon started');
289-
290283
console.log(`Running projects: ${commands.map(c => chalk.green(c.name)).join(', ')}`);
291284

292285
debug('creating concurrently promise');

.github/scripts/update-compose.js

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/scripts/update-dockerfile.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/ci-docker.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
id: build
183183
with:
184184
context: .
185-
file: .docker/Dockerfile
185+
file: Dockerfile
186186
push: ${{ steps.strategy.outputs.should-push }}
187187
load: ${{ steps.strategy.outputs.should-load }}
188188
tags: ${{ steps.meta.outputs.tags }}
@@ -286,14 +286,16 @@ jobs:
286286
} >> $GITHUB_STEP_SUMMARY
287287
288288
test_e2e:
289-
name: E2E Tests (Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
289+
name: E2E Tests (${{ matrix.shell == 'react' && 'React' || 'Ember' }} ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
290290
runs-on: ubuntu-latest
291291
needs: [build, setup]
292292
strategy:
293293
fail-fast: false
294294
matrix:
295295
shardIndex: [1, 2]
296296
shardTotal: [2]
297+
shell: [ember, react]
298+
continue-on-error: ${{ matrix.shell == 'react' }}
297299
steps:
298300
- name: Checkout
299301
uses: actions/checkout@v4
@@ -307,7 +309,7 @@ jobs:
307309
id: build
308310
with:
309311
context: .
310-
file: .docker/tb-cli/Dockerfile
312+
file: docker/tb-cli/Dockerfile
311313
push: false
312314
load: true
313315
tags: ghost-tb-cli
@@ -342,21 +344,22 @@ jobs:
342344
- name: Run e2e tests
343345
env:
344346
GHOST_IMAGE_TAG: ${{ steps.load.outputs.image-tag }}
347+
USE_REACT_SHELL: ${{ matrix.shell == 'react' && 'true' || '' }}
345348
run: yarn test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
346349

347350
- name: Upload blob report to GitHub Actions Artifacts
348351
if: failure()
349352
uses: actions/upload-artifact@v4
350353
with:
351-
name: blob-report-${{ matrix.shardIndex }}
354+
name: blob-report-${{ matrix.shell }}-${{ matrix.shardIndex }}
352355
path: e2e/blob-report
353356
retention-days: 1
354357

355358
- name: Upload test results artifacts
356359
if: failure()
357360
uses: actions/upload-artifact@v4
358361
with:
359-
name: test-results-${{ matrix.shardIndex }}
362+
name: test-results-${{ matrix.shell }}-${{ matrix.shardIndex }}
360363
path: e2e/test-results
361364
retention-days: 7
362365

@@ -410,6 +413,19 @@ jobs:
410413
path: e2e/all-test-results
411414
retention-days: 7
412415

413-
- name: Output command to view report
416+
- name: View Test Report command
414417
run: |
415-
echo "::notice::To view the Playwright report locally, run: gh run download ${{ github.run_id }} -n playwright-report -D /tmp/playwright-\$\$ && npx playwright show-report /tmp/playwright-\$\$/playwright-report"
418+
echo -e "::notice::To view the Playwright report locally, run:\n\nREPORT_DIR=\$(mktemp -d) && gh run download ${{ github.run_id }} -n playwright-report -D \"\$REPORT_DIR\" && npx playwright show-report \"\$REPORT_DIR\""
419+
420+
- name: Comment on PR with test report command
421+
if: github.event_name == 'pull_request'
422+
env:
423+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
424+
run: |
425+
gh pr comment ${{ github.event.pull_request.number }} --body "## E2E Tests Failed
426+
427+
To view the Playwright test report locally, run:
428+
429+
\`\`\`bash
430+
REPORT_DIR=\$(mktemp -d) && gh run download ${{ github.run_id }} -n playwright-report -D \"\$REPORT_DIR\" && npx playwright show-report \"\$REPORT_DIR\"
431+
\`\`\`"

0 commit comments

Comments
 (0)