Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .revyl/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pr_review:
enabled: true
skip_drafts: true
path_filters: []
label_filters: []
actions:
preview_link: true
proof_of_changes: true
checks: []
system_prompt: ""
workflows: []
builds:
ios:
enabled: true
framework: native_ios
app: "SweepAlert Swift"
root_dir: apps/ios-sweep-alert
use_existing_ci: false
build_command: |
xcodebuild -project SweepAlertSwift.xcodeproj -scheme SweepAlertSwift -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath build
artifact_path: build/Build/Products/Debug-iphonesimulator/SweepAlertSwift.app
env: []
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ agent edits repo -> Revyl remote iOS build -> Revyl simulator validation -> patc
```

The agent does not need a full macOS sandbox. It needs this repo, Revyl credentials, and the commands in `AGENTS.md`.
GitHub PR previews are managed by the repo-level `.revyl/config.yaml`.

## Setup

Expand Down Expand Up @@ -90,4 +91,3 @@ npm run ios:testflight
```

No private keys or production credentials should be committed.

7 changes: 7 additions & 0 deletions docs/revyl-pr-automation-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Revyl PR Automation Smoke Trigger

Smoke hash: 14b3dac5237791aaa0bf6d71

This file is intentionally updated by `scripts/revyl-pr-automation-smoke.sh`
with a random hash to create a tiny commit that re-runs Revyl GitHub PR
automation.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"convex:dev": "convex dev",
"convex:deploy": "convex deploy",
"ios:testflight": "bash scripts/ios-testflight.sh"
"ios:testflight": "bash scripts/ios-testflight.sh",
"revyl:pr-smoke": "bash scripts/revyl-pr-automation-smoke.sh"
},
"dependencies": {
"convex": "^1.38.0"
Expand Down
53 changes: 53 additions & 0 deletions scripts/revyl-pr-automation-smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
BRANCH="${REVYL_SMOKE_BRANCH:-codex/revyl-pr-automation-smoke}"
REMOTE="${REVYL_SMOKE_REMOTE:-origin}"
TARGET_FILE="${REVYL_SMOKE_FILE:-docs/revyl-pr-automation-smoke.md}"
COMMIT_MESSAGE="${REVYL_SMOKE_COMMIT_MESSAGE:-Trigger Revyl PR automation smoke}"

cd "$ROOT_DIR"

current_branch="$(git branch --show-current)"
if [[ "$current_branch" != "$BRANCH" ]]; then
if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
git switch "$BRANCH"
else
echo "Branch '$BRANCH' was not found locally." >&2
echo "Create the PR branch first, or set REVYL_SMOKE_BRANCH to an existing branch." >&2
exit 2
fi
fi

if [[ -n "$(git status --porcelain)" ]]; then
echo "Working tree has local changes. Commit or stash them before triggering the smoke commit." >&2
git status --short >&2
exit 2
fi

if command -v openssl >/dev/null 2>&1; then
smoke_hash="$(openssl rand -hex 12)"
elif command -v uuidgen >/dev/null 2>&1; then
smoke_hash="$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-')"
else
smoke_hash="$(printf '%s-%s-%s' "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" "$RANDOM" "$$" | git hash-object --stdin | cut -c1-24)"
fi

mkdir -p "$(dirname "$TARGET_FILE")"

cat >"$TARGET_FILE" <<EOF
# Revyl PR Automation Smoke Trigger

Smoke hash: $smoke_hash

This file is intentionally updated by \`scripts/revyl-pr-automation-smoke.sh\`
with a random hash to create a tiny commit that re-runs Revyl GitHub PR
automation.
EOF

git add "$TARGET_FILE"
git commit -m "$COMMIT_MESSAGE"
git push "$REMOTE" "$BRANCH"

echo "Triggered Revyl PR automation with $TARGET_FILE hash $smoke_hash."