mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-31 03:22:15 +00:00
# Which Problems Are Solved The close PR action fails https://github.com/zitadel/typescript/actions/runs/16196332400/job/45723668837?pr=511 # How the Problems Are Solved A backtick is escaped. # Additional Context - Completes #10229
40 lines
1.7 KiB
YAML
40 lines
1.7 KiB
YAML
name: Auto-close PRs and guide to correct repo
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
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 @${{ github.event.pull_request.user.login }}!**
|
|
|
|
This repository \`${{ github.repository }}\` is a read-only mirror of the git subtree at [\`zitadel/zitadel/login\`](https://github.com/zitadel/zitadel).
|
|
Therefore, we close this pull request automatically.
|
|
|
|
Your changes are not lost. Submitting them to the main repository is easy:
|
|
1. [Fork zitadel/zitadel](https://github.com/zitadel/zitadel/fork)
|
|
2. Clone your Zitadel fork \`git clone https://github.com/<your-owner>/zitadel.git\`
|
|
3. Change directory to your Zitadel forks root.
|
|
4. Pull your changes into the Zitadel fork by running \`make login_pull LOGIN_REMOTE_URL=https://github.com/<your-owner>/typescript.git LOGIN_REMOTE_BRANCH=<your-typescript-fork-branch>\`.
|
|
5. Push your changes and [open a pull request to zitadel/zitadel](https://github.com/zitadel/zitadel/compare)
|
|
`.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"
|
|
});
|