mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: pr check validation in workflow
This commit is contained in:
parent
354c3d95ce
commit
16b43c7b02
7
.github/workflows/auto-merge.yml
vendored
7
.github/workflows/auto-merge.yml
vendored
@ -80,5 +80,12 @@ jobs:
|
|||||||
- name: Create PR to Target Branch
|
- name: Create PR to Target Branch
|
||||||
if: env.HAS_CONFLICTS == 'true'
|
if: env.HAS_CONFLICTS == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
# get all pull requests and check if there is already a PR
|
||||||
|
PR_EXISTS=$(gh pr list --base $TARGET_BRANCH --head $SOURCE_BRANCH --json number | jq '.[] | .number')
|
||||||
|
if [ -n "$PR_EXISTS" ]; then
|
||||||
|
echo "Pull Request already exists: $PR_EXISTS"
|
||||||
|
else
|
||||||
|
echo "Creating new pull request"
|
||||||
PR_URL=$(gh pr create --base $TARGET_BRANCH --head $SOURCE_BRANCH --title "sync: merge conflicts need to be resolved" --body "")
|
PR_URL=$(gh pr create --base $TARGET_BRANCH --head $SOURCE_BRANCH --title "sync: merge conflicts need to be resolved" --body "")
|
||||||
echo "Pull Request created: $PR_URL"
|
echo "Pull Request created: $PR_URL"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user