Skip to content

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

ci: allow docs/* branches to open PRs against main

沨沄极客79875a6e12f2
diff --git a/.github/workflows/main-pr-source.yml b/.github/workflows/main-pr-source.yml
index e9002c8..8aeefb5 100644
--- a/.github/workflows/main-pr-source.yml
+++ b/.github/workflows/main-pr-source.yml
@@ -9,9 +9,20 @@ jobs:
require-dev-source:
runs-on: ubuntu-latest
steps:
- - name: Require dev branch
+ - name: Require dev or docs branch
+ # Read through the environment rather than interpolating into the shell;
+ # a branch name is attacker-controlled on a fork PR. Same hardening as
+ # #128 applied on dev.
+ env:
+ HEAD_REF: ${{ github.head_ref }}
run: |
- if [ "${{ github.head_ref }}" != "dev" ]; then
- echo "Pull requests into main must come from the dev branch."
- exit 1
- fi
+ case "$HEAD_REF" in
+ dev|docs/*)
+ echo "Source branch '$HEAD_REF' is allowed."
+ ;;
+ *)
+ echo "Pull requests into main must come from 'dev' or a 'docs/*' branch."
+ echo "Got: '$HEAD_REF'"
+ exit 1
+ ;;
+ esac