diff --git a/.revyl/config.yaml b/.revyl/config.yaml new file mode 100644 index 0000000..29495de --- /dev/null +++ b/.revyl/config.yaml @@ -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: [] diff --git a/README.md b/README.md index c65f343..69263dc 100644 --- a/README.md +++ b/README.md @@ -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 @@ -90,4 +91,3 @@ npm run ios:testflight ``` No private keys or production credentials should be committed. - diff --git a/docs/revyl-pr-automation-smoke.md b/docs/revyl-pr-automation-smoke.md new file mode 100644 index 0000000..5136f62 --- /dev/null +++ b/docs/revyl-pr-automation-smoke.md @@ -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. diff --git a/package.json b/package.json index 9bfdf2b..e984cf9 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/scripts/revyl-pr-automation-smoke.sh b/scripts/revyl-pr-automation-smoke.sh new file mode 100755 index 0000000..cd4224b --- /dev/null +++ b/scripts/revyl-pr-automation-smoke.sh @@ -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" <