From 6925fa16673a4a63d3fab951abb1d2c02182ed47 Mon Sep 17 00:00:00 2001 From: Steve Burkert <5735305+SteveBurkert@users.noreply.github.com> Date: Tue, 9 May 2023 18:27:52 +0200 Subject: [PATCH 1/2] Update ReviewBot.yml --- .github/workflows/ReviewBot.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ReviewBot.yml b/.github/workflows/ReviewBot.yml index a9a7d70..57eccb7 100644 --- a/.github/workflows/ReviewBot.yml +++ b/.github/workflows/ReviewBot.yml @@ -25,9 +25,13 @@ jobs: - run: | for base_pr_id in $(gh pr list --search "head:${{ env.BASE_PR_REF }}" --json number --jq '.[].number'); do gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This pull request seems to be child of: [$base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id)." - gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }}). Please merge this first." if [ ${{ env.MAIN_BRANCH_NAME }} == $( gh pr view $base_pr_id --json baseRefName --jq '.baseRefName') ]; then - gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open childs. I will convert this PR to a draft now." + gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be the first child Pull-Request of [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id). Merge this PR and continue with the base afterwards." + gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }}). Please merge all children first." + gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open children. I will convert this PR to a draft now." gh pr ready $base_pr_id --undo + else + gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be a child Pull-Request. Please merge [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id) before this PR." + gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }})." fi done From e8eed1c798a6f6842bdf96cec747a7160bc66863 Mon Sep 17 00:00:00 2001 From: Steve Burkert <5735305+SteveBurkert@users.noreply.github.com> Date: Tue, 9 May 2023 18:29:45 +0200 Subject: [PATCH 2/2] Update ReviewBot.yml --- .github/workflows/ReviewBot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ReviewBot.yml b/.github/workflows/ReviewBot.yml index 57eccb7..4b63530 100644 --- a/.github/workflows/ReviewBot.yml +++ b/.github/workflows/ReviewBot.yml @@ -31,7 +31,7 @@ jobs: gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open children. I will convert this PR to a draft now." gh pr ready $base_pr_id --undo else - gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be a child Pull-Request. Please merge [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id) before this PR." + gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be a child Pull-Request, but not the first. Please merge [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id) before this PR." gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }})." fi done