name: Auto-close PRs and guide to correct repo on: pull_request_target: types: [opened] jobs: auto-close: runs-on: ubuntu-latest if: github.repository_id == '622995060' steps: - name: Comment and close PR uses: actions/github-script@v7 with: script: | const message = ` 👋 **Thanks for your contribution!** This repository \`${{ github.repository }}\` is a read-only mirror of our internal development in [\`zitadel/zitadel\`](https://github.com/zitadel/zitadel). Therefore, we close this pull request automatically, but submitting your changes to the main repository is easy: 1. Fork and clone zitadel/zitadel 2. Create a new branch for your changes 3. Pull your changes into the new fork by running `make login_pull LOGIN_REMOTE_URL=/typescript LOGIN_REMOTE_BRANCH=`. 4. Push your changes and open a pull request to zitadel/zitadel `.trim(); await github.rest.issues.createComment({ ...context.repo, issue_number: context.issue.number, body: message }); await github.rest.pulls.update({ ...context.repo, pull_number: context.issue.number, state: "closed" });