Repository navigation
docs(ultimate-browsing): neutralize insane-search wording (우회 → neutral) #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR source guidance | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, ready_for_review] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| close-with-source-guidance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Close PR with source repository guidance | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| set -euo pipefail | |
| source_files="$(mktemp)" | |
| gh api --paginate \ | |
| "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/files" \ | |
| --jq '.[].filename' | | |
| while IFS= read -r file; do | |
| case "$file" in | |
| packages/web/lib/docs-content.generated.ts) | |
| ;; | |
| bin/*|test/*|plugins/omo/*|packages/web/app/*|packages/web/components/*|packages/web/e2e/*|packages/web/scripts/*|packages/web/lib/*|packages/web/package.json|packages/web/pnpm-lock.yaml|packages/web/next.config.ts|packages/web/open-next.config.ts|packages/web/postcss.config.mjs|packages/web/tsconfig.json|packages/web/playwright.config.ts|packages/web/wrangler.toml|packages/web/biome.json|package.json|package-lock.json) | |
| printf '%s\n' "$file" | |
| ;; | |
| esac | |
| done > "$source_files" | |
| if [[ ! -s "$source_files" ]]; then | |
| echo "No source-code files changed; leaving pull request $PR_NUMBER open." | |
| exit 0 | |
| fi | |
| PR_URL="https://github.com/$GITHUB_REPOSITORY/pull/$PR_NUMBER" | |
| body="$(mktemp)" | |
| cat > "$body" <<MARKDOWN | |
| Thanks for the PR! Changes to LazyCodex land through [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) — could you open this against [omo-codex](https://github.com/code-yeongyu/oh-my-openagent/tree/dev/packages/omo-codex) over there instead? PRs in this repository can't be merged. | |
| This PR was closed because it changes source-code paths in this repository: | |
| \`\`\`text | |
| $(cat "$source_files") | |
| \`\`\` | |
| If you're working with a coding agent, prompt it like this: | |
| > I opened $PR_URL ("$PR_TITLE") against code-yeongyu/lazycodex, but changes there land through code-yeongyu/oh-my-openagent, where the Codex implementation lives under packages/omo-codex. Read my original PR, then open an equivalent PR against code-yeongyu/oh-my-openagent. In the new PR body, link the original PR ($PR_URL), explain that it was first opened against lazycodex, and describe in detail what that PR changed and why. | |
| MARKDOWN | |
| gh pr close "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --comment "$(cat "$body")" |