mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:27:32 +00:00
chore(typescript): improve close PR action (#10229)
# Which Problems Are Solved The close PR action currently fails because of unescaped backticks. # How the Problems Are Solved Backticks are escaped. # Additional Changes - Adding a login remote immediately fetches for better UX. - Adding a subtree is not necessary, as it is already added in the repo. - Fix and clarify PR migration steps. - Add workflow dispatch event
This commit is contained in:
8
Makefile
8
Makefile
@@ -191,16 +191,10 @@ login_push: login_ensure_remote
|
|||||||
login_ensure_remote:
|
login_ensure_remote:
|
||||||
@if ! git remote get-url $(LOGIN_REMOTE_NAME) > /dev/null 2>&1; then \
|
@if ! git remote get-url $(LOGIN_REMOTE_NAME) > /dev/null 2>&1; then \
|
||||||
echo "Adding remote $(LOGIN_REMOTE_NAME)"; \
|
echo "Adding remote $(LOGIN_REMOTE_NAME)"; \
|
||||||
git remote add $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_URL); \
|
git remote add --fetch $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_URL); \
|
||||||
else \
|
else \
|
||||||
echo "Remote $(LOGIN_REMOTE_NAME) already exists."; \
|
echo "Remote $(LOGIN_REMOTE_NAME) already exists."; \
|
||||||
fi
|
fi
|
||||||
@if [ ! -d login ]; then \
|
|
||||||
echo "Adding subtree for 'login' from branch $(LOGIN_REMOTE_BRANCH)"; \
|
|
||||||
git subtree add --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH); \
|
|
||||||
else \
|
|
||||||
echo "Subtree 'login' already exists."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LOGIN_DIR := ./login/
|
export LOGIN_DIR := ./login/
|
||||||
export LOGIN_BAKE_CLI_ADDITIONAL_ARGS := --set login-*.context=./login/ --file ./docker-bake.hcl
|
export LOGIN_BAKE_CLI_ADDITIONAL_ARGS := --set login-*.context=./login/ --file ./docker-bake.hcl
|
||||||
|
18
login/.github/workflows/close_pr.yml
vendored
18
login/.github/workflows/close_pr.yml
vendored
@@ -1,6 +1,7 @@
|
|||||||
name: Auto-close PRs and guide to correct repo
|
name: Auto-close PRs and guide to correct repo
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
@@ -14,14 +15,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const message = `
|
const message = `
|
||||||
👋 **Thanks for your contribution!**
|
👋 **Thanks for your contribution @${{ github.event.pull_request.user.login }}!**
|
||||||
|
|
||||||
This repository \`${{ github.repository }}\` is a read-only mirror of our internal development in [\`zitadel/zitadel\`](https://github.com/zitadel/zitadel).
|
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, but submitting your changes to the main repository is easy:
|
Therefore, we close this pull request automatically.
|
||||||
1. Fork and clone zitadel/zitadel
|
|
||||||
2. Create a new branch for your changes
|
Your changes are not lost. Submitting them to the main repository is easy:
|
||||||
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>`.
|
1. [Fork zitadel/zitadel](https://github.com/zitadel/zitadel/fork)
|
||||||
4. Push your changes and open a pull request to zitadel/zitadel
|
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();
|
`.trim();
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
...context.repo,
|
...context.repo,
|
||||||
|
Reference in New Issue
Block a user