Skip to content

Commit e5e199d

Browse files
chore(automations): add cron triggers to close bootstrap and dead-end gaps (#33)
Co-authored-by: Ona <no-reply@ona.com>
1 parent 72aa9ca commit e5e199d

5 files changed

Lines changed: 35 additions & 10 deletions

File tree

.ona/automations/bug-fixer.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ triggers:
99
webhookId: 019d8d97-eb6e-70c4-a97d-25952abbc5a7
1010
events:
1111
- PULL_REQUEST_EVENT_MERGED
12+
- context:
13+
projects:
14+
projectIds:
15+
- 019d8bf4-1ded-7317-be2f-555e8fb55ff9
16+
time:
17+
cronExpression: "*/10 * * * *"
1218
- context:
1319
projects:
1420
projectIds:

.ona/automations/feature-builder.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ triggers:
99
webhookId: 019d8d97-eb6e-70c4-a97d-25952abbc5a7
1010
events:
1111
- PULL_REQUEST_EVENT_MERGED
12+
- context:
13+
projects:
14+
projectIds:
15+
- 019d8bf4-1ded-7317-be2f-555e8fb55ff9
16+
time:
17+
cronExpression: "*/10 * * * *"
1218
- context:
1319
projects:
1420
projectIds:

.ona/automations/feature-planner.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ action:
7979
- priority:2 = core features — the product's value (editor, search, realtime)
8080
- priority:3 = polish and stretch goals (dark mode, responsive, import/export)
8181
82-
## Step 4 — Present the Plan
82+
## Step 4 — Finalize
8383
84-
After creating all issues, present a summary:
84+
After creating all issues, log a summary (do NOT wait for user input — this runs as an unattended automation):
8585
8686
Total issues created: N
8787
By priority: P1: X, P2: Y, P3: Z
@@ -91,11 +91,8 @@ action:
9191
2. #M — Title (P1, depends on #N)
9292
...
9393
94-
Ambiguities / Questions for Human:
95-
- [Any unclear requirements]
96-
- [Any scope decisions that need input]
97-
98-
Wait for the user to review before the Feature Builder starts.
94+
If there are ambiguities or scope questions, create a GitHub Issue labeled
95+
"needs-human" with the questions so a human can address them asynchronously.
9996
10097
## Do NOT
10198
- Create issues that bundle multiple unrelated changes.

.ona/automations/pr-reviewer.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ triggers:
1111
- PULL_REQUEST_EVENT_OPENED
1212
- PULL_REQUEST_EVENT_UPDATED
1313
- PULL_REQUEST_EVENT_READY_FOR_REVIEW
14+
- context:
15+
projects:
16+
projectIds:
17+
- 019d8bf4-1ded-7317-be2f-555e8fb55ff9
18+
time:
19+
cronExpression: "*/5 * * * *"
1420
action:
1521
limits:
1622
maxParallel: 1
@@ -20,15 +26,25 @@ action:
2026
prompt: |
2127
You are the PR Reviewer for the Memo repository. You review code, fix CI failures, and merge PRs that are ready.
2228
23-
The PR number is provided in the trigger context as the pull request that was opened or updated.
29+
## Determine which PR to act on
30+
31+
If a PR number is provided in the trigger context (webhook trigger), use that PR.
32+
33+
Otherwise (cron trigger), scan all open non-draft PRs:
34+
gh pr list --state open --json number,isDraft,updatedAt --jq '[.[] | select(.isDraft == false)] | sort_by(.updatedAt) | reverse'
35+
36+
For each PR, read its metadata and determine if action is needed (see states below).
37+
Act on the FIRST PR that needs action, then stop. One PR per run.
38+
39+
If no PRs need action, stop — do nothing.
2440
2541
## Determine PR state
2642
2743
Read the PR metadata:
2844
2945
gh pr view <number> --json title,body,isDraft,reviewDecision,statusCheckRollup,labels,reviews
3046
31-
Stop immediately if:
47+
Stop immediately (skip this PR) if:
3248
- The PR is a draft.
3349
- CI checks are still running (status: pending/queued).
3450

.ona/automations/tweet-drafter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ action:
7474
7575
Always end with:
7676
https://memo.software-factory.dev
77-
Built with @onadev
77+
Built with @ona_hq
7878
7979
Rules:
8080
- Describe features as a user would, not a developer.

0 commit comments

Comments
 (0)