Skip to content

Commit 55103d9

Browse files
authored
Merge branch 'main' into tr-translation
2 parents a3af674 + f9e74bb commit 55103d9

File tree

1,345 files changed

+33413
-25690
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,345 files changed

+33413
-25690
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: Format numbers
3+
description: Format numbers using the formatNumber function from Shade whenever someone edits a TSX file.
4+
autoTrigger:
5+
- fileEdit: "**/*.tsx"
6+
---
7+
8+
# Format Numbers
9+
10+
When editing `.tsx` files, ensure all user-facing numbers are formatted using the `formatNumber` utility from `@tryghost/shade`.
11+
12+
## Import
13+
14+
```typescript
15+
import {formatNumber} from '@tryghost/shade';
16+
```
17+
18+
## When to use formatNumber
19+
20+
Use `formatNumber()` when rendering any numeric value that is displayed to the user, including:
21+
- Member counts, visitor counts, subscriber counts
22+
- Email engagement metrics (opens, clicks, bounces)
23+
- Revenue amounts (combine with `centsToDollars()` for monetary values)
24+
- Post analytics (views, link clicks)
25+
- Any count or quantity shown in UI
26+
27+
## Correct usage
28+
29+
```tsx
30+
<span>{formatNumber(totalMembers)}</span>
31+
<span>{formatNumber(link.count || 0)}</span>
32+
<span>{`${currencySymbol}${formatNumber(centsToDollars(mrr))}`}</span>
33+
<span>{post.members > 0 ? `+${formatNumber(post.members)}` : '0'}</span>
34+
```
35+
36+
## Antipatterns to avoid
37+
38+
Do NOT use any of these patterns for formatting numbers in TSX files:
39+
40+
```tsx
41+
// BAD: raw .toLocaleString()
42+
<span>{count.toLocaleString()}</span>
43+
44+
// BAD: manual Intl.NumberFormat
45+
<span>{new Intl.NumberFormat('en-US').format(count)}</span>
46+
47+
// BAD: raw number without formatting
48+
<span>{memberCount}</span>
49+
50+
// BAD: manual regex formatting
51+
<span>{count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</span>
52+
```
53+
54+
## Related utilities
55+
56+
- `formatPercentage()` - for percentages (e.g., open rates, click rates)
57+
- `abbreviateNumber()` - for compact notation (e.g., 1.2M, 50k)
58+
- `centsToDollars()` - convert cents to dollars before passing to `formatNumber`
59+
60+
All are imported from `@tryghost/shade`.

.coderabbit.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
22
reviews:
3+
high_level_summary: false
4+
collapse_walkthrough: false
5+
changed_files_summary: false
6+
sequence_diagrams: false
37
estimate_code_review_effort: false
8+
poem: false
9+
auto_review:
10+
base_branches:
11+
- 6.x
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2+
version = 1
3+
name = "Ghost"
4+
5+
[setup]
6+
script = '''
7+
git submodule update --init --recursive
8+
yarn
9+
'''

.env.example

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
# Debug level to pass to Ghost
1010
# DEBUG=
1111

12-
# App flags to pass to the dev command
13-
## Run `yarn dev --show-flags` to see all available app flags
14-
15-
# GHOST_DEV_APP_FLAGS=
16-
17-
# Stripe keys - used to forward Stripe webhooks to the Ghost instance in `dev.js` script
12+
# Stripe keys - used to forward Stripe webhooks to Ghost
1813
## Stripe Secret Key: sk_test_*******
1914
# STRIPE_SECRET_KEY=
2015
## Stripe Publishable Key: pk_test_*******

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
*.md text eol=lf
44
*.json text eol=lf
55
*.yml text eol=lf
6-
*.hbs text eol=lf
6+
*.hbs text eol=lf
7+
8+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/actions/load-docker-image/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ inputs:
77
image-tags:
88
description: 'Docker image tags (multi-line string)'
99
required: true
10+
artifact-name:
11+
description: 'Name of the artifact to download (fork PRs only)'
12+
required: false
13+
default: 'docker-image'
1014

1115
runs:
1216
using: 'composite'
@@ -15,14 +19,14 @@ runs:
1519
if: inputs.is-fork == 'true'
1620
uses: actions/download-artifact@v4
1721
with:
18-
name: docker-image
22+
name: ${{ inputs.artifact-name }}
1923

2024
- name: Load image from artifact (fork PR)
2125
if: inputs.is-fork == 'true'
2226
shell: bash
2327
run: |
2428
echo "Loading Docker image from artifact..."
25-
gunzip -c docker-image.tar.gz | docker load
29+
gunzip -c ${{ inputs.artifact-name }}.tar.gz | docker load
2630
echo "Available images after load:"
2731
docker images
2832
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing
3+
disable-model-invocation: true
4+
---
5+
6+
# GitHub Agentic Workflows Agent
7+
8+
This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files.
9+
10+
## What This Agent Does
11+
12+
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
13+
14+
- **Creating new workflows**: Routes to `create` prompt
15+
- **Updating existing workflows**: Routes to `update` prompt
16+
- **Debugging workflows**: Routes to `debug` prompt
17+
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
18+
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
19+
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
20+
21+
Workflows may optionally include:
22+
23+
- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
24+
- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
25+
26+
## Files This Applies To
27+
28+
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
29+
- Workflow lock files: `.github/workflows/*.lock.yml`
30+
- Shared components: `.github/workflows/shared/*.md`
31+
- Configuration: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/github-agentic-workflows.md
32+
33+
## Problems This Solves
34+
35+
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
36+
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
37+
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
38+
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
39+
40+
## How to Use
41+
42+
When you interact with this agent, it will:
43+
44+
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
45+
2. **Route to the right prompt** - Load the specialized prompt file for your task
46+
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
47+
48+
## Available Prompts
49+
50+
### Create New Workflow
51+
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
52+
53+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/create-agentic-workflow.md
54+
55+
**Use cases**:
56+
- "Create a workflow that triages issues"
57+
- "I need a workflow to label pull requests"
58+
- "Design a weekly research automation"
59+
60+
### Update Existing Workflow
61+
**Load when**: User wants to modify, improve, or refactor an existing workflow
62+
63+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/update-agentic-workflow.md
64+
65+
**Use cases**:
66+
- "Add web-fetch tool to the issue-classifier workflow"
67+
- "Update the PR reviewer to use discussions instead of issues"
68+
- "Improve the prompt for the weekly-research workflow"
69+
70+
### Debug Workflow
71+
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
72+
73+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/debug-agentic-workflow.md
74+
75+
**Use cases**:
76+
- "Why is this workflow failing?"
77+
- "Analyze the logs for workflow X"
78+
- "Investigate missing tool calls in run #12345"
79+
80+
### Upgrade Agentic Workflows
81+
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
82+
83+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/upgrade-agentic-workflows.md
84+
85+
**Use cases**:
86+
- "Upgrade all workflows to the latest version"
87+
- "Fix deprecated fields in workflows"
88+
- "Apply breaking changes from the new release"
89+
90+
### Create Shared Agentic Workflow
91+
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
92+
93+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/create-shared-agentic-workflow.md
94+
95+
**Use cases**:
96+
- "Create a shared component for Notion integration"
97+
- "Wrap the Slack MCP server as a reusable component"
98+
- "Design a shared workflow for database queries"
99+
100+
### Fix Dependabot PRs
101+
**Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
102+
103+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/dependabot.md
104+
105+
**Use cases**:
106+
- "Fix the open Dependabot PRs for npm dependencies"
107+
- "Bundle and close the Dependabot PRs for workflow dependencies"
108+
- "Update @playwright/test to fix the Dependabot PR"
109+
110+
## Instructions
111+
112+
When a user interacts with you:
113+
114+
1. **Identify the task type** from the user's request
115+
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
116+
3. **Follow the loaded prompt's instructions** exactly
117+
4. **If uncertain**, ask clarifying questions to determine the right prompt
118+
119+
## Quick Reference
120+
121+
```bash
122+
# Initialize repository for agentic workflows
123+
gh aw init
124+
125+
# Generate the lock file for a workflow
126+
gh aw compile [workflow-name]
127+
128+
# Debug workflow runs
129+
gh aw logs [workflow-name]
130+
gh aw audit <run-id>
131+
132+
# Upgrade workflows
133+
gh aw fix --write
134+
gh aw compile --validate
135+
```
136+
137+
## Key Features of gh-aw
138+
139+
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
140+
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
141+
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
142+
- **Safe Outputs**: Structured communication between AI and GitHub API
143+
- **Strict Mode**: Security-first validation and sandboxing
144+
- **Shared Components**: Reusable workflow building blocks
145+
- **Repo Memory**: Persistent git-backed storage for agents
146+
- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
147+
148+
## Important Notes
149+
150+
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.49.3/.github/aw/github-agentic-workflows.md for complete documentation
151+
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
152+
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
153+
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
154+
- Follow security best practices: minimal permissions, explicit network access, no template injection
155+
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.49.3": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.49.3",
11+
"sha": "cb678b41a8db8dd71af0da7d4f9f8134a45bf044"
12+
}
13+
}
14+
}

.github/scripts/bump-version.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ const semver = require('semver');
2323
const bumpedVersion = semver.inc(current_version, 'minor');
2424
newVersion = `${bumpedVersion}-pre-g${buildString}`;
2525
} else {
26-
const gitVersion = await exec('git describe --long HEAD').then(({stdout}) => stdout.trim().replace(/^v/, ''));
27-
newVersion = gitVersion;
26+
newVersion = `${current_version}-0-g${buildString}`;
2827
}
2928

3029
newVersion += '+moya';

0 commit comments

Comments
 (0)