mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 06:57:33 +00:00
auto-close PRs
This commit is contained in:
35
.github/workflows/close_pr.yml
vendored
Normal file
35
.github/workflows/close_pr.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Auto-close PRs and guide to correct repo
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
auto-close:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'zitadel'
|
||||
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=<your-typescript-fork-org>/typescript LOGIN_REMOTE_BRANCH=<your-typescript-fork-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"
|
||||
});
|
Reference in New Issue
Block a user